diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index b89ada2f..d7105d15 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1 +1 @@
-* @clickingbuttons @Darcy-Linde
+* @justinpolygon @penelopus @davidwf-polygonio
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 313c2716..f0767d70 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -7,7 +7,7 @@ on:
branches:
- master
schedule:
- - cron: '33 12 * * 3'
+ - cron: "33 12 * * 3"
jobs:
analyze:
name: analyze
@@ -19,15 +19,15 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'python' ]
+ language: ["python"]
steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ - name: Checkout repository
+ uses: actions/checkout@v3
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: ${{ matrix.language }}
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v3
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 76bc9a45..f524111b 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -23,7 +23,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
- uses: abatilo/actions-poetry@v2.0.0
+ uses: abatilo/actions-poetry@v2
- name: Install pypi deps
run: poetry install
- name: Style lint
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 83f8b848..2c573262 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,22 +6,53 @@ on:
permissions:
contents: read
jobs:
- test:
+ release:
runs-on: ubuntu-latest
name: Release to PyPi
steps:
- uses: actions/checkout@v3
+ - name: Fetch all branches
+ run: git fetch --prune --unshallow
+ - name: Check if commit is on allowed branch
+ run: |
+ if git branch -r --contains ${{ github.sha }} | grep -Eq 'origin/master|origin/polygon-lts'; then
+ echo "Allowed branch"
+ else
+ echo "Commit not on master or polygon-lts; skipping"
+ exit 1
+ fi
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Poetry
- uses: abatilo/actions-poetry@v2.0.0
- with:
- poetry-version: "1.1.13"
+ uses: abatilo/actions-poetry@v2
+ - name: Get package name
+ id: package
+ run: |
+ echo "name=$(python - <<'PY'
+ import sys
+ with open('pyproject.toml', 'r', encoding='utf-8') as f:
+ for line in f:
+ s = line.strip()
+ if s.startswith('name'):
+ # supports: name="foo" or name = "foo" and ignores inline comments
+ val = s.split('=', 1)[1].split('#', 1)[0].strip().strip('"').strip("'")
+ print(val)
+ break
+ PY
+ )" >> "$GITHUB_OUTPUT"
- name: Configure Poetry
- run: poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
- - name: Install pypi deps
+ run: |
+ if [ "${{ steps.package.outputs.name }}" = "polygon-api-client" ]; then
+ poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
+ elif [ "${{ steps.package.outputs.name }}" = "massive" ]; then
+ poetry config pypi-token.pypi ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD_MASSIVE }}
+ else
+ echo "Unknown package name: ${{ steps.package.outputs.name }}; skipping publish"
+ exit 1
+ fi
+ - name: Install deps
run: poetry install
- name: Get tag
id: tag
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index baecc7a2..602340ce 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
- python-version: ['3.8', '3.9', '3.10']
+ python-version: ['3.9', '3.10', '3.11']
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Unit test ${{ matrix.python-version }}
steps:
@@ -27,7 +27,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
- uses: abatilo/actions-poetry@v2.0.0
+ uses: abatilo/actions-poetry@v2
- name: Install pypi deps
run: poetry install
- name: Unit tests
diff --git a/.polygon/rest.json b/.massive/rest.json
similarity index 72%
rename from .polygon/rest.json
rename to .massive/rest.json
index 354de4e2..3d088556 100644
--- a/.polygon/rest.json
+++ b/.massive/rest.json
@@ -12,7 +12,7 @@
},
"AggregateDate": {
"description": "The beginning date for the aggregate window.",
- "example": "2020-10-14",
+ "example": "2023-01-09",
"in": "path",
"name": "date",
"required": true,
@@ -21,7 +21,7 @@
}
},
"AggregateLimitMax50000": {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \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",
@@ -53,7 +53,7 @@
},
"AggregateTimeFrom": {
"description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
+ "example": "2023-01-09",
"in": "path",
"name": "from",
"required": true,
@@ -63,7 +63,7 @@
},
"AggregateTimeTo": {
"description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
+ "example": "2023-02-10",
"in": "path",
"name": "to",
"required": true,
@@ -79,6 +79,7 @@
"required": true,
"schema": {
"enum": [
+ "second",
"minute",
"hour",
"day",
@@ -100,6 +101,17 @@
"type": "string"
}
},
+ "CryptoTickersQueryParam": {
+ "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, X:BTCUSD, X:ETHBTC, and X:BOBAUSD. Empty string defaults to querying all tickers.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
"ForexTickerPathParam": {
"description": "The ticker symbol of the currency pair.",
"example": "C:EURUSD",
@@ -110,6 +122,17 @@
"type": "string"
}
},
+ "ForexTickersQueryParam": {
+ "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, C:EURUSD, C:GBPCAD, and C:AUDINR. Empty string defaults to querying all tickers.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
"GeneralTickerPathParam": {
"description": "The ticker symbol of the asset.",
"example": "AAPL",
@@ -128,6 +151,36 @@
"type": "boolean"
}
},
+ "IndicesAggregateTimeFrom": {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-13",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "IndicesAggregateTimeTo": {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-24",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "IndicesTickerPathParam": {
+ "description": "The ticker symbol of Index.",
+ "example": "I:NDX",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
"LimitMax10000": {
"description": "Limit the size of the response, max 10000.",
"example": 100,
@@ -157,7 +210,7 @@
},
"OptionsTickerPathParam": {
"description": "The ticker symbol of the options contract.",
- "example": "O:TSLA210903C00700000",
+ "example": "O:SPY251219C00650000",
"in": "path",
"name": "optionsTicker",
"required": true,
@@ -189,7 +242,7 @@
}
},
"StocksTickerPathParam": {
- "description": "The ticker symbol of the stock/equity.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"example": "AAPL",
"in": "path",
"name": "stocksTicker",
@@ -199,7 +252,7 @@
}
},
"TickersQueryParam": {
- "description": "A comma separated list of tickers to get snapshots for.",
+ "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, AAPL,TSLA,GOOG. Empty string defaults to querying all tickers.",
"in": "query",
"name": "tickers",
"schema": {
@@ -232,7 +285,7 @@
"AskExchangeId": {
"allOf": [
{
- "description": "The exchange ID. See 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"
},
{
@@ -252,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"
},
{
@@ -274,6 +327,11 @@
"format": "double",
"type": "number"
},
+ "CloseIndices": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
"Company": {
"properties": {
"active": {
@@ -385,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": {
@@ -403,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"
}
},
@@ -412,7 +470,7 @@
"Conditions": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
@@ -425,7 +483,7 @@
"items": {
"properties": {
"id": {
- "description": "The exchange ID. See 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": {
@@ -445,6 +503,13 @@
"type": "string"
}
},
+ "required": [
+ "id",
+ "type",
+ "market",
+ "name",
+ "url"
+ ],
"type": "object"
},
"type": "array"
@@ -497,6 +562,15 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
"type": "object"
},
"type": "array"
@@ -529,7 +603,7 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
@@ -553,15 +627,30 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee 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"
}
},
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
"type": "object"
},
"type": "array"
}
},
+ "required": [
+ "day",
+ "map",
+ "msLatency",
+ "symbol",
+ "ticks"
+ ],
"type": "object"
},
"CryptoLastTrade": {
@@ -571,13 +660,13 @@
"conditions": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
},
"exchange": {
- "description": "The exchange that this crypto trade happened on. \nSee 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": {
@@ -595,6 +684,13 @@
"type": "integer"
}
},
+ "required": [
+ "conditions",
+ "exchange",
+ "price",
+ "size",
+ "timestamp"
+ ],
"type": "object"
},
"symbol": {
@@ -602,6 +698,9 @@
"type": "string"
}
},
+ "required": [
+ "symbol"
+ ],
"type": "object"
},
"CryptoOpenClose": {
@@ -617,7 +716,7 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
@@ -641,10 +740,18 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee 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"
}
},
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
"type": "object"
},
"type": "array"
@@ -669,7 +776,7 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
@@ -693,10 +800,18 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee 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"
}
},
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
"type": "object"
},
"type": "array"
@@ -706,6 +821,15 @@
"type": "string"
}
},
+ "required": [
+ "symbol",
+ "isUTC",
+ "day",
+ "open",
+ "close",
+ "openTrades",
+ "closingTrades"
+ ],
"type": "object"
},
"CryptoSnapshotMinute": {
@@ -725,11 +849,19 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -741,6 +873,16 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
"type": "object"
},
"CryptoSnapshotTicker": {
@@ -781,8 +923,21 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
"lastTrade": {
"allOf": [
{
@@ -793,7 +948,7 @@
"c": {
"description": "The trade conditions.",
"items": {
- "type": "string"
+ "type": "integer"
},
"type": "array"
},
@@ -808,26 +963,26 @@
},
"s": {
"description": "The size (volume) of the trade.",
- "type": "integer"
+ "type": "number"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
"type": "integer"
},
"x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
"type": "object"
- },
- {
- "properties": {
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- }
}
]
},
@@ -849,11 +1004,19 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -865,6 +1028,16 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
"type": "object"
},
"prevDay": {
@@ -901,6 +1074,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"ticker": {
@@ -908,7 +1089,7 @@
"type": "string"
},
"todaysChange": {
- "description": "The value of the change the from previous day.",
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
},
@@ -922,6 +1103,16 @@
"type": "integer"
}
},
+ "required": [
+ "day",
+ "lastTrade",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
"type": "object"
}
},
@@ -949,6 +1140,10 @@
"type": "object"
}
},
+ "required": [
+ "p",
+ "x"
+ ],
"type": "object"
},
"type": "array"
@@ -971,12 +1166,16 @@
"type": "object"
}
},
+ "required": [
+ "p",
+ "x"
+ ],
"type": "object"
},
"type": "array"
},
"spread": {
- "description": "The difference between the best bid and the best ask price accross exchanges.",
+ "description": "The difference between the best bid and the best ask price across exchanges.",
"format": "double",
"type": "number"
},
@@ -989,6 +1188,15 @@
"type": "integer"
}
},
+ "required": [
+ "ticker",
+ "bids",
+ "asks",
+ "bidCount",
+ "askCount",
+ "spread",
+ "updated"
+ ],
"type": "object"
}
},
@@ -1033,8 +1241,21 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
"lastTrade": {
"allOf": [
{
@@ -1045,7 +1266,7 @@
"c": {
"description": "The trade conditions.",
"items": {
- "type": "string"
+ "type": "integer"
},
"type": "array"
},
@@ -1060,26 +1281,26 @@
},
"s": {
"description": "The size (volume) of the trade.",
- "type": "integer"
+ "type": "number"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
"type": "integer"
},
"x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
"type": "integer"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
"type": "object"
- },
- {
- "properties": {
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- }
}
]
},
@@ -1101,11 +1322,19 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -1117,6 +1346,16 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
"type": "object"
},
"prevDay": {
@@ -1153,6 +1392,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"ticker": {
@@ -1160,7 +1407,7 @@
"type": "string"
},
"todaysChange": {
- "description": "The value of the change the from previous day.",
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
},
@@ -1174,6 +1421,16 @@
"type": "integer"
}
},
+ "required": [
+ "day",
+ "lastTrade",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
"type": "object"
},
"type": "array"
@@ -1186,7 +1443,7 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
@@ -1210,14 +1467,22 @@
"type": "integer"
},
"x": {
- "description": "The exchange that this crypto trade happened on. \nSee 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"
}
},
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
"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": {
@@ -1236,7 +1501,7 @@
"items": {
"properties": {
"code": {
- "description": "A unique identifier for the exchange internal to Polygon.io. This is not an industry code or ISO standard.",
+ "description": "A unique identifier for the exchange internal to Massive.com. This is not an industry code or ISO standard.",
"type": "string"
},
"id": {
@@ -1269,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": {
@@ -1754,6 +2019,11 @@
],
"type": "object"
},
+ "Fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
"ForexConversion": {
"properties": {
"converted": {
@@ -1783,7 +2053,7 @@
"type": "number"
},
"exchange": {
- "description": "The exchange ID. See 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": {
@@ -1791,6 +2061,12 @@
"type": "integer"
}
},
+ "required": [
+ "ask",
+ "bid",
+ "exchange",
+ "timestamp"
+ ],
"type": "object"
},
"to": {
@@ -1798,10 +2074,16 @@
"type": "string"
}
},
+ "required": [
+ "from",
+ "to",
+ "initialAmount",
+ "converted"
+ ],
"type": "object"
},
"ForexExchangeId": {
- "description": "The exchange ID. See 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": {
@@ -1852,6 +2134,15 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
"type": "object"
},
"type": "array"
@@ -1896,15 +2187,28 @@
"type": "integer"
},
"x": {
- "description": "The exchange ID. See 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"
}
},
+ "required": [
+ "a",
+ "b",
+ "x",
+ "t"
+ ],
"type": "object"
},
"type": "array"
}
},
+ "required": [
+ "day",
+ "map",
+ "msLatency",
+ "pair",
+ "ticks"
+ ],
"type": "object"
},
"ForexPairLastQuote": {
@@ -1922,7 +2226,7 @@
"type": "number"
},
"exchange": {
- "description": "The exchange ID. See 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": {
@@ -1930,6 +2234,12 @@
"type": "integer"
}
},
+ "required": [
+ "ask",
+ "bid",
+ "exchange",
+ "timestamp"
+ ],
"type": "object"
},
"symbol": {
@@ -1937,6 +2247,9 @@
"type": "string"
}
},
+ "required": [
+ "symbol"
+ ],
"type": "object"
},
"ForexPreviousClose": {
@@ -1987,6 +2300,15 @@
"type": "number"
}
},
+ "required": [
+ "T",
+ "v",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -2007,7 +2329,7 @@
"type": "number"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The millisecond accuracy timestamp of the quote.",
"type": "integer"
},
"x": {
@@ -2015,6 +2337,12 @@
"type": "integer"
}
},
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
"type": "object"
},
"ForexSnapshotPrevDay": {
@@ -2050,6 +2378,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"ForexSnapshotTicker": {
@@ -2085,8 +2421,20 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
"type": "object"
},
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker.",
"properties": {
@@ -2101,7 +2449,7 @@
"type": "number"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The millisecond accuracy timestamp of the quote.",
"type": "integer"
},
"x": {
@@ -2109,6 +2457,12 @@
"type": "integer"
}
},
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
"type": "object"
},
"min": {
@@ -2129,11 +2483,19 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -2176,6 +2538,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"ticker": {
@@ -2183,7 +2553,7 @@
"type": "string"
},
"todaysChange": {
- "description": "The value of the change the from previous day.",
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
},
@@ -2197,6 +2567,16 @@
"type": "integer"
}
},
+ "required": [
+ "day",
+ "lastQuote",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
"type": "object"
}
},
@@ -2236,8 +2616,20 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
"type": "object"
},
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker.",
"properties": {
@@ -2252,7 +2644,7 @@
"type": "number"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The millisecond accuracy timestamp of the quote.",
"type": "integer"
},
"x": {
@@ -2260,6 +2652,12 @@
"type": "integer"
}
},
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
"type": "object"
},
"min": {
@@ -2280,11 +2678,19 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -2327,6 +2733,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"ticker": {
@@ -2334,7 +2748,7 @@
"type": "string"
},
"todaysChange": {
- "description": "The value of the change the from previous day.",
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
},
@@ -2348,6 +2762,16 @@
"type": "integer"
}
},
+ "required": [
+ "day",
+ "lastQuote",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
"type": "object"
},
"type": "array"
@@ -2399,6 +2823,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -2411,38 +2843,223 @@
"format": "double",
"type": "number"
},
+ "HighIndices": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "IndexAggsBase": {
+ "properties": {
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
"Indicators": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n",
"items": {
"description": "The indicator code.\n",
"type": "integer"
},
"type": "array"
},
- "Locales": {
+ "IndicesGroupedResults": {
"properties": {
"results": {
"items": {
"properties": {
- "locale": {
- "description": "An abbreviated country name.",
- "type": "string"
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "name": {
- "description": "The name of the country.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- },
- "Low": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "IndicesOpenClose": {
+ "properties": {
+ "afterHours": {
+ "description": "The close value of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "preMarket": {
+ "description": "The open value of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "object"
+ },
+ "IndicesTickerResults": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Locales": {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "locale": {
+ "description": "An abbreviated country name.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the country.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "Low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "LowIndices": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
"type": "number"
},
"Map": {
@@ -2646,6 +3263,11 @@
"format": "double",
"type": "number"
},
+ "OpenIndices": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
"PaginationHooksBase": {
"properties": {
"next_url": {
@@ -2716,6 +3338,9 @@
"type": "string"
}
},
+ "required": [
+ "request_id"
+ ],
"type": "object"
},
"SequenceNumber": {
@@ -2728,35 +3353,40 @@
"format": "double",
"type": "number"
},
- "SnapshotLastTrade": {
+ "SnapshotMinOHLCV": {
"properties": {
"c": {
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- },
- "type": "array"
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "s": {
- "description": "The size (volume) of the trade.",
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
"type": "integer"
},
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
"t": {
"description": "The Unix Msec timestamp for the start of the aggregate window.",
"type": "integer"
},
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
}
},
"type": "object"
@@ -2789,6 +3419,13 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
"type": "object"
},
"SnapshotOHLCVVW": {
@@ -2824,6 +3461,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"SnapshotOHLCVVWOtc": {
@@ -2863,6 +3508,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"StandardBase": {
@@ -2874,6 +3527,9 @@
"type": "string"
}
},
+ "required": [
+ "request_id"
+ ],
"type": "object"
},
{
@@ -2887,6 +3543,9 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
}
]
@@ -2902,6 +3561,9 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
},
"StatusCountBase": {
@@ -2915,6 +3577,9 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
},
"StockSymbol": {
@@ -2959,7 +3624,7 @@
"type": "boolean"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The Unix Msec timestamp for the end of the aggregate window.",
"type": "integer"
},
"v": {
@@ -2973,6 +3638,15 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t",
+ "v",
+ "T"
+ ],
"type": "object"
},
"type": "array"
@@ -3034,6 +3708,16 @@
"type": "number"
}
},
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close",
+ "volume"
+ ],
"type": "object"
},
"StocksSnapshotLastQuote": {
@@ -3057,10 +3741,17 @@
"type": "integer"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
"type": "integer"
}
},
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
"type": "object"
},
"StocksSnapshotMinute": {
@@ -3084,11 +3775,19 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -3100,6 +3799,17 @@
"type": "number"
}
},
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
"type": "object"
},
"StocksSnapshotMinuteOTC": {
@@ -3123,6 +3833,10 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
@@ -3132,6 +3846,10 @@
"description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
"type": "boolean"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -3143,6 +3861,17 @@
"type": "number"
}
},
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
"type": "object"
},
"StocksSnapshotTicker": {
@@ -3187,8 +3916,21 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
"properties": {
@@ -3211,10 +3953,17 @@
"type": "integer"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
"type": "integer"
}
},
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
"type": "object"
},
"lastTrade": {
@@ -3223,7 +3972,7 @@
"c": {
"description": "The trade conditions.",
"items": {
- "type": "string"
+ "type": "integer"
},
"type": "array"
},
@@ -3241,14 +3990,22 @@
"type": "integer"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
"type": "integer"
},
"x": {
- "description": "The exchange ID. See 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"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
"type": "object"
},
"min": {
@@ -3273,6 +4030,10 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
@@ -3282,6 +4043,10 @@
"description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
"type": "boolean"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -3293,6 +4058,17 @@
"type": "number"
}
},
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
"type": "object"
},
"prevDay": {
@@ -3333,6 +4109,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
"ticker": {
@@ -3340,7 +4124,7 @@
"type": "string"
},
"todaysChange": {
- "description": "The value of the change the from previous day.",
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
},
@@ -3402,8 +4186,21 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
"type": "object"
},
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
"lastQuote": {
"description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
"properties": {
@@ -3426,10 +4223,17 @@
"type": "integer"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
"type": "integer"
}
},
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
"type": "object"
},
"lastTrade": {
@@ -3438,7 +4242,7 @@
"c": {
"description": "The trade conditions.",
"items": {
- "type": "string"
+ "type": "integer"
},
"type": "array"
},
@@ -3456,14 +4260,22 @@
"type": "integer"
},
"t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
"type": "integer"
},
"x": {
- "description": "The exchange ID. See 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"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
"type": "object"
},
"min": {
@@ -3488,6 +4300,10 @@
"format": "double",
"type": "number"
},
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
"o": {
"description": "The open price for the symbol in the given time period.",
"format": "double",
@@ -3497,6 +4313,10 @@
"description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
"type": "boolean"
},
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
"v": {
"description": "The trading volume of the symbol in the given time period.",
"format": "double",
@@ -3508,6 +4328,17 @@
"type": "number"
}
},
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
"type": "object"
},
"prevDay": {
@@ -3548,14 +4379,22 @@
"type": "number"
}
},
- "type": "object"
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
},
"ticker": {
"description": "The exchange symbol that this item is traded under.",
"type": "string"
},
"todaysChange": {
- "description": "The value of the change the from previous day.",
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
},
@@ -3624,6 +4463,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -3655,6 +4502,13 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
"type": "object"
},
"StocksV2NBBO": {
@@ -3683,6 +4537,13 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
"type": "object"
},
{
@@ -3699,7 +4560,7 @@
"X": {
"allOf": [
{
- "description": "The exchange ID. See 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"
},
{
@@ -3710,13 +4571,13 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
},
"i": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n",
"items": {
"description": "The indicator code.\n",
"type": "integer"
@@ -3735,7 +4596,7 @@
"x": {
"allOf": [
{
- "description": "The exchange ID. See 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"
},
{
@@ -3748,6 +4609,17 @@
"type": "integer"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "x",
+ "P",
+ "S",
+ "X",
+ "z"
+ ],
"type": "object"
}
]
@@ -3781,6 +4653,13 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
"type": "object"
},
{
@@ -3797,7 +4676,7 @@
"X": {
"allOf": [
{
- "description": "The exchange ID. See 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"
},
{
@@ -3808,13 +4687,13 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
},
"i": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n",
"items": {
"description": "The indicator code.\n",
"type": "integer"
@@ -3833,7 +4712,7 @@
"x": {
"allOf": [
{
- "description": "The exchange ID. See 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"
},
{
@@ -3846,6 +4725,17 @@
"type": "integer"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "x",
+ "P",
+ "S",
+ "X",
+ "z"
+ ],
"type": "object"
}
]
@@ -3881,6 +4771,13 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
"type": "object"
},
{
@@ -3888,7 +4785,7 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
@@ -3916,7 +4813,7 @@
"type": "number"
},
"x": {
- "description": "The exchange ID. See 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": {
@@ -3924,6 +4821,16 @@
"type": "integer"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "e",
+ "x",
+ "r",
+ "z"
+ ],
"type": "object"
}
]
@@ -3957,6 +4864,13 @@
"type": "integer"
}
},
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
"type": "object"
},
{
@@ -3964,7 +4878,7 @@
"c": {
"description": "A list of condition codes.\n",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
"type": "integer"
},
"type": "array"
@@ -3992,7 +4906,7 @@
"type": "number"
},
"x": {
- "description": "The exchange ID. See 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": {
@@ -4000,6 +4914,16 @@
"type": "integer"
}
},
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "e",
+ "x",
+ "r",
+ "z"
+ ],
"type": "object"
}
]
@@ -4024,6 +4948,9 @@
"type": "string"
}
},
+ "required": [
+ "ticker"
+ ],
"type": "object"
},
"TickerResults": {
@@ -4070,6 +4997,14 @@
"type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -4098,7 +5033,7 @@
"type": "integer"
},
"TodaysChange": {
- "description": "The value of the change the from previous day.",
+ "description": "The value of the change from the previous day.",
"format": "double",
"type": "number"
},
@@ -4147,6 +5082,11 @@
"type": "string"
}
},
+ "required": [
+ "symbol",
+ "status",
+ "request_id"
+ ],
"type": "object"
},
"V2AggsBase": {
@@ -4172,6 +5112,13 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
"V2LastBase": {
@@ -4185,6 +5132,10 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id"
+ ],
"type": "object"
},
"V2TicksBase": {
@@ -4217,253 +5168,6 @@
"description": "The volume weighted average price.",
"format": "double",
"type": "number"
- },
- "v3TickerDetails": {
- "properties": {
- "results": {
- "description": "Ticker with details.\n",
- "properties": {
- "active": {
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
- "type": "boolean"
- },
- "address": {
- "properties": {
- "address1": {
- "description": "The first line of the company's headquarters address.",
- "type": "string"
- },
- "city": {
- "description": "The city of the company's headquarters address.",
- "type": "string"
- },
- "postal_code": {
- "description": "The postal code of the company's headquarters address.",
- "type": "string"
- },
- "state": {
- "description": "The state of the company's headquarters address.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "branding": {
- "properties": {
- "icon_url": {
- "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n",
- "type": "string"
- },
- "logo_url": {
- "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n",
- "type": "string"
- }
- },
- "type": "object"
- },
- "cik": {
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
- "type": "string"
- },
- "composite_figi": {
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "currency_name": {
- "description": "The name of the currency that this asset is traded with.",
- "type": "string"
- },
- "delisted_utc": {
- "description": "The last date that the asset was traded.",
- "format": "date-time",
- "type": "string"
- },
- "description": {
- "description": "A description of the company and what they do/offer.",
- "type": "string"
- },
- "homepage_url": {
- "description": "The URL of the company's website homepage.",
- "type": "string"
- },
- "list_date": {
- "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.",
- "type": "string"
- },
- "locale": {
- "description": "The locale of the asset.",
- "enum": [
- "us",
- "global"
- ],
- "type": "string"
- },
- "market": {
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ],
- "type": "string"
- },
- "market_cap": {
- "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.",
- "format": "double",
- "type": "number"
- },
- "name": {
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
- "type": "string"
- },
- "phone_number": {
- "description": "The phone number for the company behind this ticker.",
- "type": "string"
- },
- "primary_exchange": {
- "description": "The ISO code of the primary listing exchange for this asset.",
- "type": "string"
- },
- "share_class_figi": {
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "share_class_shares_outstanding": {
- "description": "The recorded number of outstanding shares for this particular share class.",
- "format": "double",
- "type": "number"
- },
- "sic_code": {
- "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's SIC Code List.\n",
- "type": "string"
- },
- "sic_description": {
- "description": "A description of this ticker's SIC code.",
- "type": "string"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "ticker_root": {
- "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.",
- "type": "string"
- },
- "ticker_suffix": {
- "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.",
- "type": "string"
- },
- "total_employees": {
- "description": "The approximate number of employees for the company.",
- "type": "number"
- },
- "type": {
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
- "type": "string"
- },
- "weighted_shares_outstanding": {
- "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n",
- "format": "double",
- "type": "number"
- }
- },
- "required": [
- "ticker",
- "name",
- "market",
- "locale",
- "active",
- "currency_name"
- ],
- "type": "object"
- }
- },
- "type": "object"
- },
- "v3Tickers": {
- "properties": {
- "results": {
- "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
- "items": {
- "properties": {
- "active": {
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
- "type": "boolean"
- },
- "cik": {
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
- "type": "string"
- },
- "composite_figi": {
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "currency_name": {
- "description": "The name of the currency that this asset is traded with.",
- "type": "string"
- },
- "delisted_utc": {
- "description": "The last date that the asset was traded.",
- "format": "date-time",
- "type": "string"
- },
- "last_updated_utc": {
- "description": "The information is accurate up to this time.",
- "format": "date-time",
- "type": "string"
- },
- "locale": {
- "description": "The locale of the asset.",
- "enum": [
- "us",
- "global"
- ],
- "type": "string"
- },
- "market": {
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ],
- "type": "string"
- },
- "name": {
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
- "type": "string"
- },
- "primary_exchange": {
- "description": "The ISO code of the primary listing exchange for this asset.",
- "type": "string"
- },
- "share_class_figi": {
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "type": {
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
- "type": "string"
- }
- },
- "required": [
- "ticker",
- "name",
- "market",
- "locale"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
}
},
"securitySchemes": {
@@ -4476,7 +5180,7 @@
},
"info": {
"description": "The future of fintech.",
- "title": "Polygon API",
+ "title": "Massive API",
"version": "1.0.0"
},
"openapi": "3.0.3",
@@ -4511,9 +5215,8 @@
"example": 100,
"in": "query",
"name": "amount",
- "required": true,
"schema": {
- "default": 100,
+ "default": 1,
"type": "number"
}
},
@@ -4549,7 +5252,9 @@
"exchange": 48,
"timestamp": 1605555313000
},
+ "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
"status": "success",
+ "symbol": "AUD/USD",
"to": "USD"
},
"schema": {
@@ -4567,7 +5272,7 @@
"description": "The amount to convert.",
"format": "double",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -4584,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"
}
},
@@ -4618,6 +5329,15 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id",
+ "from",
+ "to",
+ "symbol",
+ "initialAmount",
+ "converted"
+ ],
"type": "object"
}
},
@@ -4638,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"
}
@@ -4770,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"
@@ -4794,15 +5514,30 @@
"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"
}
},
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
"type": "object"
},
"type": "array"
}
},
+ "required": [
+ "day",
+ "map",
+ "msLatency",
+ "symbol",
+ "ticks"
+ ],
"type": "object"
}
]
@@ -4819,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"
}
@@ -4934,6 +5669,9 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
},
{
@@ -4973,15 +5711,28 @@
"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"
}
},
+ "required": [
+ "a",
+ "b",
+ "x",
+ "t"
+ ],
"type": "object"
},
"type": "array"
}
},
+ "required": [
+ "day",
+ "map",
+ "msLatency",
+ "pair",
+ "ticks"
+ ],
"type": "object"
}
]
@@ -4998,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"
}
@@ -5022,14 +5773,14 @@
"parameters": [
{
"description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "X:BTC-USD",
+ "example": "X:BTCUSD",
"in": "path",
"name": "cryptoTicker",
"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.",
@@ -5038,7 +5789,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -5121,7 +5872,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -5129,7 +5880,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -5137,7 +5888,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -5145,7 +5896,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -5158,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": [
{
@@ -5245,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"
@@ -5266,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"
}
}
@@ -5286,7 +6037,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -5310,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": {
@@ -5330,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.",
@@ -5346,7 +6097,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -5439,7 +6190,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -5447,7 +6198,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -5455,7 +6206,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -5463,7 +6214,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -5476,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": [
{
@@ -5563,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"
@@ -5584,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"
}
}
@@ -5604,7 +6355,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -5630,32 +6381,32 @@
"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/{optionsTicker}": {
+ "/v1/indicators/ema/{indicesTicker}": {
"get": {
"description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
- "operationId": "OptionsEMA",
+ "operationId": "IndicesEMA",
"parameters": [
{
"description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "O:SPY241220P00720000",
+ "example": "I:NDX",
"in": "path",
- "name": "optionsTicker",
+ "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.",
@@ -5664,7 +6415,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -5708,7 +6459,7 @@
}
},
{
- "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
+ "description": "The value in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close values to \ncalculate the exponential moving average (EMA).",
"example": "close",
"in": "query",
"name": "series_type",
@@ -5757,7 +6508,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -5765,7 +6516,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -5773,7 +6524,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -5781,7 +6532,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -5794,16 +6545,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/ema/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "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/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366449650?limit=226&sort=desc"
},
"values": [
{
- "timestamp": 1517562000016,
- "value": 140.139
+ "timestamp": 1687237200000,
+ "value": 14452.002555459003
}
]
},
@@ -5881,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"
@@ -5902,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"
}
}
@@ -5922,7 +6673,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -5933,12 +6684,6 @@
},
"type": "object"
}
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,286.1730473491824 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,285.60990642465924 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,285.023780156278 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,284.4137303667383 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,282.43007426223943 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.7141043158811 O:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,286.0778649309446 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,283.77878058578887 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,283.11791448724966 O:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.7544192473781",
- "schema": {
- "type": "string"
- }
}
},
"description": "Exponential Moving Average (EMA) data for each period."
@@ -5946,34 +6691,35 @@
},
"summary": "Exponential Moving Average (EMA)",
"tags": [
- "options:aggregates"
+ "indices:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-allowed-limited-tickers": true,
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
- "/v1/indicators/ema/{stockTicker}": {
+ "/v1/indicators/ema/{optionsTicker}": {
"get": {
"description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
- "operationId": "EMA",
+ "operationId": "OptionsEMA",
"parameters": [
{
"description": "The ticker symbol for which to get exponential moving average (EMA) data.",
- "example": "AAPL",
+ "example": "O:SPY241220P00720000",
"in": "path",
- "name": "stockTicker",
+ "name": "optionsTicker",
"required": true,
"schema": {
"type": "string"
},
- "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.",
@@ -5982,7 +6728,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -6006,7 +6752,7 @@
}
},
{
- "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
+ "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
"example": true,
"in": "query",
"name": "adjusted",
@@ -6075,7 +6821,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -6083,7 +6829,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -6091,7 +6837,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -6099,7 +6845,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -6112,11 +6858,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/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -6199,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"
@@ -6220,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"
}
}
@@ -6240,7 +6986,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "EMAResults"
}
},
@@ -6253,7 +6999,7 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.17972071441582\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,160.92194334973746\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,162.5721451116157\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,162.93345715698777\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,161.72552880161066\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,162.18657079351314\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.53481135582055\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,159.78118646009983\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,160.48735733602226\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,161.29590022115534\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,286.1730473491824 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,285.60990642465924 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,285.023780156278 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,284.4137303667383 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,282.43007426223943 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.7141043158811 O:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,286.0778649309446 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,283.77878058578887 O:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,283.11791448724966 O:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.7544192473781",
"schema": {
"type": "string"
}
@@ -6264,33 +7010,34 @@
},
"summary": "Exponential Moving Average (EMA)",
"tags": [
- "stocks:aggregates"
+ "options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
- }
+ },
+ "x-massive-ignore": true
},
- "/v1/indicators/macd/{cryptoTicker}": {
+ "/v1/indicators/ema/{stockTicker}": {
"get": {
- "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
- "operationId": "CryptoMACD",
+ "description": "Get the exponential moving average (EMA) for a ticker symbol over a given time range.",
+ "operationId": "EMA",
"parameters": [
{
- "description": "The ticker symbol for which to get MACD data.",
- "example": "X:BTC-USD",
+ "description": "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": "cryptoTicker",
+ "name": "stockTicker",
"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.",
@@ -6299,7 +7046,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -6323,37 +7070,27 @@
}
},
{
- "description": "The short window size used to calculate MACD data.",
- "example": 12,
- "in": "query",
- "name": "short_window",
- "schema": {
- "default": 12,
- "type": "integer"
- }
- },
- {
- "description": "The long window size used to calculate MACD data.",
- "example": 26,
+ "description": "Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
+ "example": true,
"in": "query",
- "name": "long_window",
+ "name": "adjusted",
"schema": {
- "default": 26,
- "type": "integer"
+ "default": true,
+ "type": "boolean"
}
},
{
- "description": "The window size used to calculate the MACD signal line.",
- "example": 9,
+ "description": "The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
"in": "query",
- "name": "signal_window",
+ "name": "window",
"schema": {
- "default": 9,
+ "default": 50,
"type": "integer"
}
},
{
- "description": "The price in the aggregate which will be used to calculate MACD data. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "description": "The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to \ncalculate the exponential moving average (EMA).",
"example": "close",
"in": "query",
"name": "series_type",
@@ -6402,7 +7139,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -6410,7 +7147,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -6418,7 +7155,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -6426,7 +7163,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -6439,24 +7176,16 @@
"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/ema/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
- "histogram": 38.3801666667,
- "signal": 106.9811666667,
"timestamp": 1517562000016,
- "value": 145.3613333333
- },
- {
- "histogram": 41.098859136,
- "signal": 102.7386283473,
- "timestamp": 1517562001016,
- "value": 143.8374874833
+ "value": 140.139
}
]
},
@@ -6534,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"
@@ -6551,36 +7280,20 @@
"values": {
"items": {
"properties": {
- "histogram": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
- "signal": {
- "description": "The indicator value for this period.",
- "format": "float",
- "type": "number",
- "x-polygon-go-type": {
- "name": "*float64"
- }
- },
"timestamp": {
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"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"
}
}
@@ -6591,8 +7304,8 @@
}
},
"type": "object",
- "x-polygon-go-type": {
- "name": "MACDResults"
+ "x-massive-go-type": {
+ "name": "EMAResults"
}
},
"status": {
@@ -6604,45 +7317,44 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,-200.79662915774315,-281.5009533935604,80.70432423581724\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,-264.55324270273195,-316.4388906203941,51.88564791766214\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,-317.75700272815084,-339.5909474061525,21.83394467800167\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,-350.23805379084297,-345.0494335756529,-5.188620215190042\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,-347.75055091027025,-343.7522785218554,-3.9982723884148754\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,-339.51740285673077,-342.7527104247516,3.2353075680208576\nX:BTCUSD,11337.77105153,19346.509,0,19527.23,19487.24,19640,18846.95,1664409600000,142239,,0,,0,0,0,0,0,false,1664409600000,-130.70646519456568,-232.81921860513586,102.11275341057018\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,-165.73322121465026,-258.3474069577784,92.61418574312813\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,-242.62960978099727,-301.6770344525147,59.04742467151743\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,-288.68772337443806,-329.4103025998096,40.72257922537153\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.17972071441582\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,160.92194334973746\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,162.5721451116157\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,162.93345715698777\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,161.72552880161066\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,162.18657079351314\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.53481135582055\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,159.78118646009983\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,160.48735733602226\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,161.29590022115534\n",
"schema": {
"type": "string"
}
}
},
- "description": "Moving Average Convergence/Divergence (MACD) data for each period."
+ "description": "Exponential Moving Average (EMA) data for each period."
}
},
- "summary": "Moving Average Convergence/Divergence (MACD)",
+ "summary": "Exponential Moving Average (EMA)",
"tags": [
- "crypto:aggregates"
+ "stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "x-polygon-ignore": true
+ }
},
- "/v1/indicators/macd/{fxTicker}": {
+ "/v1/indicators/macd/{cryptoTicker}": {
"get": {
"description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
- "operationId": "ForexMACD",
+ "operationId": "CryptoMACD",
"parameters": [
{
"description": "The ticker symbol for which to get MACD data.",
- "example": "C:EUR-USD",
+ "example": "X:BTCUSD",
"in": "path",
- "name": "fxTicker",
+ "name": "cryptoTicker",
"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.",
@@ -6651,7 +7363,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -6674,16 +7386,6 @@
"type": "string"
}
},
- {
- "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
{
"description": "The short window size used to calculate MACD data.",
"example": 12,
@@ -6715,7 +7417,7 @@
}
},
{
- "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "description": "The price in the aggregate which will be used to calculate MACD data. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
"example": "close",
"in": "query",
"name": "series_type",
@@ -6764,7 +7466,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -6772,7 +7474,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -6780,7 +7482,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -6788,7 +7490,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -6801,11 +7503,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/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -6896,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"
@@ -6917,7 +7619,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -6925,7 +7627,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -6933,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"
}
}
@@ -6953,7 +7655,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -6966,7 +7668,7 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nC:USDAUD,687,1.5442,0,1.53763,1.5386983,1.5526022,1.537279,1664409600000,687,,0,,0,0,0,0,0,false,1664409600000,0.0160095063995076,0.016240853664654657,-0.0002313472651470569\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,0.019060448457087098,0.015690709670065223,0.0033697387870218753\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,0.017190795754692623,0.013971241529748895,0.003219554224943728\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,0.014349509127189686,0.010792069356789809,0.0035574397703998766\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,0.0169083298713677,0.016298690480941423,0.0006096393904262767\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,0.017968564486413374,0.016146280633334852,0.001822283853078522\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,0.018356408747553177,0.014848274973309752,0.0035081337742434247\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,0.016441299960100686,0.01316635297351296,0.0032749469865877255\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,0.015245524601038118,0.012347616226866026,0.002897908374172092\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,0.014947418239455779,0.011623139133323003,0.0033242791061327756\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,-200.79662915774315,-281.5009533935604,80.70432423581724\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,-264.55324270273195,-316.4388906203941,51.88564791766214\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,-317.75700272815084,-339.5909474061525,21.83394467800167\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,-350.23805379084297,-345.0494335756529,-5.188620215190042\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,-347.75055091027025,-343.7522785218554,-3.9982723884148754\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,-339.51740285673077,-342.7527104247516,3.2353075680208576\nX:BTCUSD,11337.77105153,19346.509,0,19527.23,19487.24,19640,18846.95,1664409600000,142239,,0,,0,0,0,0,0,false,1664409600000,-130.70646519456568,-232.81921860513586,102.11275341057018\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,-165.73322121465026,-258.3474069577784,92.61418574312813\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,-242.62960978099727,-301.6770344525147,59.04742467151743\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,-288.68772337443806,-329.4103025998096,40.72257922537153\n",
"schema": {
"type": "string"
}
@@ -6977,34 +7679,34 @@
},
"summary": "Moving Average Convergence/Divergence (MACD)",
"tags": [
- "fx:aggregates"
+ "crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
- "/v1/indicators/macd/{optionsTicker}": {
+ "/v1/indicators/macd/{fxTicker}": {
"get": {
- "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.",
- "operationId": "OptionsMACD",
+ "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
+ "operationId": "ForexMACD",
"parameters": [
{
"description": "The ticker symbol for which to get MACD data.",
- "example": "O:SPY241220P00720000",
+ "example": "C:EURUSD",
"in": "path",
- "name": "optionsTicker",
+ "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.",
@@ -7013,7 +7715,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -7126,7 +7828,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -7134,7 +7836,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -7142,7 +7844,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -7150,7 +7852,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -7163,11 +7865,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/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -7258,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"
@@ -7279,7 +7981,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7287,7 +7989,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7295,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"
}
}
@@ -7315,7 +8017,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -7328,7 +8030,7 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,-0.05105556065990413,3.5771695836806834,-3.6282251443405875\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,4.047960862047148,5.247666286053219,-1.199705424006071\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,5.255380647906861,6.466477305754766,-1.2110966578479045\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,5.591072756938104,6.769251470216741,-1.178178713278637\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,1.4304642046162712,4.48422586976583,-3.053761665149559\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,4.32835898317461,5.547592642054737,-1.2192336588801274\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,4.623290999840208,5.852401056774768,-1.2291100569345605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,4.932483632022979,6.159678571008409,-1.2271949389854298\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,5.93821326327344,7.063796148536399,-1.1255828852629595\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,6.294916771166584,7.345191869852139,-1.050275098685555\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nC:USDAUD,687,1.5442,0,1.53763,1.5386983,1.5526022,1.537279,1664409600000,687,,0,,0,0,0,0,0,false,1664409600000,0.0160095063995076,0.016240853664654657,-0.0002313472651470569\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,0.019060448457087098,0.015690709670065223,0.0033697387870218753\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,0.017190795754692623,0.013971241529748895,0.003219554224943728\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,0.014349509127189686,0.010792069356789809,0.0035574397703998766\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,0.0169083298713677,0.016298690480941423,0.0006096393904262767\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,0.017968564486413374,0.016146280633334852,0.001822283853078522\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,0.018356408747553177,0.014848274973309752,0.0035081337742434247\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,0.016441299960100686,0.01316635297351296,0.0032749469865877255\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,0.015245524601038118,0.012347616226866026,0.002897908374172092\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,0.014947418239455779,0.011623139133323003,0.0033242791061327756\n",
"schema": {
"type": "string"
}
@@ -7339,34 +8041,34 @@
},
"summary": "Moving Average Convergence/Divergence (MACD)",
"tags": [
- "options:aggregates"
+ "fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
- "/v1/indicators/macd/{stockTicker}": {
+ "/v1/indicators/macd/{indicesTicker}": {
"get": {
- "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
- "operationId": "MACD",
+ "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.",
+ "operationId": "IndicesMACD",
"parameters": [
{
"description": "The ticker symbol for which to get MACD data.",
- "example": "AAPL",
+ "example": "I:NDX",
"in": "path",
- "name": "stockTicker",
+ "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.",
@@ -7375,7 +8077,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -7399,7 +8101,7 @@
}
},
{
- "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
+ "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
"example": true,
"in": "query",
"name": "adjusted",
@@ -7439,7 +8141,7 @@
}
},
{
- "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "description": "The value in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close values to \ncalculate the MACD.",
"example": "close",
"in": "query",
"name": "series_type",
@@ -7488,7 +8190,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -7496,7 +8198,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -7504,7 +8206,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -7512,7 +8214,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -7525,24 +8227,24 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/macd/AAPL?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/AAPL/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366537196?limit=121&sort=desc"
},
"values": [
{
- "histogram": 38.3801666667,
- "signal": 106.9811666667,
- "timestamp": 1517562000016,
- "value": 145.3613333333
+ "histogram": -4.7646219788108795,
+ "signal": 220.7596784587801,
+ "timestamp": 1687237200000,
+ "value": 215.9950564799692
},
{
- "histogram": 41.098859136,
- "signal": 102.7386283473,
- "timestamp": 1517562001016,
- "value": 143.8374874833
+ "histogram": 3.4518937661882205,
+ "signal": 221.9508339534828,
+ "timestamp": 1687219200000,
+ "value": 225.40272771967102
}
]
},
@@ -7620,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"
@@ -7641,7 +8343,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7649,7 +8351,7 @@
"description": "The indicator value for this period.",
"format": "float",
"type": "number",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "*float64"
}
},
@@ -7657,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"
}
}
@@ -7677,7 +8379,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "MACDResults"
}
},
@@ -7688,12 +8390,6 @@
},
"type": "object"
}
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,-5.413804946923619,-3.8291158739479005,-1.5846890729757188\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,-4.63165683097526,-3.098305244715017,-1.5333515862602427\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,-4.581291216131007,-2.7149673481499565,-1.86632386798105\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,-3.6311474313744156,-1.1648824074663984,-2.4662650239080173\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,-2.533545758578896,0.9308104167079131,-3.464356175286809\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,-4.771497049659786,-3.432943605703971,-1.3385534439558149\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,-4.349569413677017,-2.2483863811546936,-2.1011830325223233\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,-3.9559234852549707,-1.7230906230241128,-2.232832862230858\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,-3.2635802145105117,-0.548316151489394,-2.7152640630211176\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,-3.070742345502225,0.13049986426588545,-3.2012422097681106\n",
- "schema": {
- "type": "string"
- }
}
},
"description": "Moving Average Convergence/Divergence (MACD) data for each period."
@@ -7701,33 +8397,35 @@
},
"summary": "Moving Average Convergence/Divergence (MACD)",
"tags": [
- "stocks:aggregates"
+ "indices:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-allowed-limited-tickers": true,
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
- }
+ },
+ "x-massive-ignore": true
},
- "/v1/indicators/rsi/{cryptoTicker}": {
+ "/v1/indicators/macd/{optionsTicker}": {
"get": {
- "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "CryptoRSI",
+ "description": "Get moving average convergence/divergence (MACD) for a ticker symbol over a given time range.",
+ "operationId": "OptionsMACD",
"parameters": [
{
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "X:BTC-USD",
+ "description": "The ticker symbol for which to get MACD data.",
+ "example": "O:SPY241220P00720000",
"in": "path",
- "name": "cryptoTicker",
+ "name": "optionsTicker",
"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.",
@@ -7736,7 +8434,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -7760,17 +8458,47 @@
}
},
{
- "description": "The window size used to calculate the relative strength index (RSI). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 14,
+ "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
"in": "query",
- "name": "window",
+ "name": "adjusted",
"schema": {
- "default": 14,
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The short window size used to calculate MACD data.",
+ "example": 12,
+ "in": "query",
+ "name": "short_window",
+ "schema": {
+ "default": 12,
"type": "integer"
}
},
{
- "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
+ "description": "The long window size used to calculate MACD data.",
+ "example": 26,
+ "in": "query",
+ "name": "long_window",
+ "schema": {
+ "default": 26,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The window size used to calculate the MACD signal line.",
+ "example": 9,
+ "in": "query",
+ "name": "signal_window",
+ "schema": {
+ "default": 9,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
"example": "close",
"in": "query",
"name": "series_type",
@@ -7819,7 +8547,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -7827,7 +8555,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -7835,7 +8563,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -7843,7 +8571,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -7856,16 +8584,24 @@
"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/macd/O:SPY241220P00720000?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/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
+ "histogram": 38.3801666667,
+ "signal": 106.9811666667,
"timestamp": 1517562000016,
- "value": 140.139
+ "value": 145.3613333333
+ },
+ {
+ "histogram": 41.098859136,
+ "signal": 102.7386283473,
+ "timestamp": 1517562001016,
+ "value": 143.8374874833
}
]
},
@@ -7943,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"
@@ -7960,20 +8696,36 @@
"values": {
"items": {
"properties": {
+ "histogram": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ },
+ "signal": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ },
"timestamp": {
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-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"
}
}
@@ -7984,8 +8736,8 @@
}
},
"type": "object",
- "x-polygon-go-type": {
- "name": "RSIResults"
+ "x-massive-go-type": {
+ "name": "MACDResults"
}
},
"status": {
@@ -7997,45 +8749,45 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,52.040915721136884\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,44.813590401722564\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,44.813590401722564\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,45.22751170711286\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,45.22751170711286\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,37.361825384231004\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,37.361825384231004\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,50.74235333598462\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,50.74235333598462\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,39.159457782344376\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,-0.05105556065990413,3.5771695836806834,-3.6282251443405875\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,4.047960862047148,5.247666286053219,-1.199705424006071\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,5.255380647906861,6.466477305754766,-1.2110966578479045\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,5.591072756938104,6.769251470216741,-1.178178713278637\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,1.4304642046162712,4.48422586976583,-3.053761665149559\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,4.32835898317461,5.547592642054737,-1.2192336588801274\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,4.623290999840208,5.852401056774768,-1.2291100569345605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,4.932483632022979,6.159678571008409,-1.2271949389854298\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,5.93821326327344,7.063796148536399,-1.1255828852629595\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,6.294916771166584,7.345191869852139,-1.050275098685555\n",
"schema": {
"type": "string"
}
}
},
- "description": "Relative strength index data for each period."
+ "description": "Moving Average Convergence/Divergence (MACD) data for each period."
}
},
- "summary": "Relative Strength Index (RSI)",
+ "summary": "Moving Average Convergence/Divergence (MACD)",
"tags": [
- "crpyto:aggregates"
+ "options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
- "/v1/indicators/rsi/{fxTicker}": {
+ "/v1/indicators/macd/{stockTicker}": {
"get": {
- "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "ForexRSI",
+ "description": "Get moving average convergence/divergence (MACD) data for a ticker symbol over a given time range.",
+ "operationId": "MACD",
"parameters": [
{
- "description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "C:EUR-USD",
+ "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": "fxTicker",
+ "name": "stockTicker",
"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.",
@@ -8044,7 +8796,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -8068,7 +8820,7 @@
}
},
{
- "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "description": "Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
"example": true,
"in": "query",
"name": "adjusted",
@@ -8078,19 +8830,39 @@
}
},
{
- "description": "The window size used to calculate the relative strength index (RSI).",
- "example": 14,
+ "description": "The short window size used to calculate MACD data.",
+ "example": 12,
"in": "query",
- "name": "window",
+ "name": "short_window",
"schema": {
- "default": 14,
+ "default": 12,
"type": "integer"
}
},
{
- "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
- "example": "close",
- "in": "query",
+ "description": "The long window size used to calculate MACD data.",
+ "example": 26,
+ "in": "query",
+ "name": "long_window",
+ "schema": {
+ "default": 26,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The window size used to calculate the MACD signal line.",
+ "example": 9,
+ "in": "query",
+ "name": "signal_window",
+ "schema": {
+ "default": 9,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to \ncalculate the MACD.",
+ "example": "close",
+ "in": "query",
"name": "series_type",
"schema": {
"default": "close",
@@ -8137,7 +8909,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -8145,7 +8917,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -8153,7 +8925,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -8161,7 +8933,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -8174,16 +8946,24 @@
"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/macd/AAPL?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/AAPL/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
+ "histogram": 38.3801666667,
+ "signal": 106.9811666667,
"timestamp": 1517562000016,
- "value": 140.139
+ "value": 145.3613333333
+ },
+ {
+ "histogram": 41.098859136,
+ "signal": 102.7386283473,
+ "timestamp": 1517562001016,
+ "value": 143.8374874833
}
]
},
@@ -8261,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"
@@ -8278,20 +9058,36 @@
"values": {
"items": {
"properties": {
+ "histogram": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ },
+ "signal": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ },
"timestamp": {
"description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
"format": "int64",
"type": "integer",
- "x-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"
}
}
@@ -8302,8 +9098,8 @@
}
},
"type": "object",
- "x-polygon-go-type": {
- "name": "RSIResults"
+ "x-massive-go-type": {
+ "name": "MACDResults"
}
},
"status": {
@@ -8315,45 +9111,44 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,65.97230488287764\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,79.3273623194404\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,79.32736231944038\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,74.64770184023104\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,64.43214811875563\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,64.43214811875563\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,81.95981214984681\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,81.95981214984683\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,74.64770184023104\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,74.98028072374902\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value,signal,histogram\nAAPL,1.27842348E+08,142.9013,0,146.1,142.48,146.72,140.68,1664424000000,1061605,,0,,0,0,0,0,0,false,1664424000000,-5.413804946923619,-3.8291158739479005,-1.5846890729757188\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,-4.63165683097526,-3.098305244715017,-1.5333515862602427\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,-4.581291216131007,-2.7149673481499565,-1.86632386798105\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,-3.6311474313744156,-1.1648824074663984,-2.4662650239080173\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,-2.533545758578896,0.9308104167079131,-3.464356175286809\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,-4.771497049659786,-3.432943605703971,-1.3385534439558149\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,-4.349569413677017,-2.2483863811546936,-2.1011830325223233\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,-3.9559234852549707,-1.7230906230241128,-2.232832862230858\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,-3.2635802145105117,-0.548316151489394,-2.7152640630211176\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,-3.070742345502225,0.13049986426588545,-3.2012422097681106\n",
"schema": {
"type": "string"
}
}
},
- "description": "Relative strength index data for each period."
+ "description": "Moving Average Convergence/Divergence (MACD) data for each period."
}
},
- "summary": "Relative Strength Index (RSI)",
+ "summary": "Moving Average Convergence/Divergence (MACD)",
"tags": [
- "fx:aggregates"
+ "stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "x-polygon-ignore": true
+ }
},
- "/v1/indicators/rsi/{optionsTicker}": {
+ "/v1/indicators/rsi/{cryptoTicker}": {
"get": {
"description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "OptionsRSI",
+ "operationId": "CryptoRSI",
"parameters": [
{
"description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "O:SPY241220P00720000",
+ "example": "X:BTCUSD",
"in": "path",
- "name": "optionsTicker",
+ "name": "cryptoTicker",
"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.",
@@ -8362,7 +9157,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -8386,17 +9181,7 @@
}
},
{
- "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
- {
- "description": "The window size used to calculate the relative strength index (RSI).",
+ "description": "The window size used to calculate the relative strength index (RSI). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
"example": 14,
"in": "query",
"name": "window",
@@ -8455,7 +9240,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -8463,7 +9248,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -8471,7 +9256,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -8479,7 +9264,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -8492,16 +9277,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/X:BTCUSD?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/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
"timestamp": 1517562000016,
- "value": 140.139
+ "value": 82.19
}
]
},
@@ -8579,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"
@@ -8600,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"
}
}
@@ -8620,7 +9405,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "RSIResults"
}
},
@@ -8633,45 +9418,45 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,30.837887188419387\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,15.546598157051605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,88.61520575036505\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,52.040915721136884\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,44.813590401722564\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,44.813590401722564\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,45.22751170711286\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,45.22751170711286\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,37.361825384231004\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,37.361825384231004\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,50.74235333598462\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,50.74235333598462\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,39.159457782344376\n",
"schema": {
"type": "string"
}
}
},
- "description": "Relative Strength Index (RSI) data for each period."
+ "description": "Relative strength index data for each period."
}
},
"summary": "Relative Strength Index (RSI)",
"tags": [
- "options:aggregates"
+ "crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
- "/v1/indicators/rsi/{stockTicker}": {
+ "/v1/indicators/rsi/{fxTicker}": {
"get": {
"description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
- "operationId": "RSI",
+ "operationId": "ForexRSI",
"parameters": [
{
"description": "The ticker symbol for which to get relative strength index (RSI) data.",
- "example": "AAPL",
+ "example": "C:EURUSD",
"in": "path",
- "name": "stockTicker",
+ "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.",
@@ -8680,7 +9465,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -8704,7 +9489,7 @@
}
},
{
- "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
"example": true,
"in": "query",
"name": "adjusted",
@@ -8773,7 +9558,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -8781,7 +9566,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -8789,7 +9574,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -8797,7 +9582,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -8810,16 +9595,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/C:USDAUD?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/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
"timestamp": 1517562000016,
- "value": 140.139
+ "value": 82.19
}
]
},
@@ -8897,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"
@@ -8918,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"
}
}
@@ -8938,7 +9723,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "RSIResults"
}
},
@@ -8951,44 +9736,45 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,23.065352237561996\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,29.877761913419718\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,29.58201330468151\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,30.233508748331047\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,19.857312489527956\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,32.18008680069761\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,28.71109953239781\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,31.140902927103383\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,32.21491128713248\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,35.950871523070575\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,65.97230488287764\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,79.3273623194404\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,79.32736231944038\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,74.64770184023104\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,64.43214811875563\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,64.43214811875563\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,81.95981214984681\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,81.95981214984683\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,74.64770184023104\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,74.98028072374902\n",
"schema": {
"type": "string"
}
}
},
- "description": "Relative strength Index data for each period."
+ "description": "Relative strength index data for each period."
}
},
"summary": "Relative Strength Index (RSI)",
"tags": [
- "stocks:aggregates"
+ "fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- }
+ },
+ "x-massive-ignore": true
},
- "/v1/indicators/sma/{cryptoTicker}": {
+ "/v1/indicators/rsi/{indicesTicker}": {
"get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "CryptoSMA",
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "IndicesRSI",
"parameters": [
{
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "X:BTC-USD",
+ "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "example": "I:NDX",
"in": "path",
- "name": "cryptoTicker",
+ "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.",
@@ -8997,7 +9783,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -9021,17 +9807,27 @@
}
},
{
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the relative strength index (RSI).",
+ "example": 14,
"in": "query",
"name": "window",
"schema": {
- "default": 50,
+ "default": 14,
"type": "integer"
}
},
{
- "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "description": "The value in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close values to \ncalculate the relative strength index (RSI).",
"example": "close",
"in": "query",
"name": "series_type",
@@ -9080,7 +9876,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -9088,7 +9884,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -9096,7 +9892,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -9104,7 +9900,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -9117,38 +9913,16 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v1/indicators/sma/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "next_url": "https://api.massive.com/v1/indicators/rsi/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz0xNA",
+ "request_id": "28a8417f521f98e1d08f6ed7d1fbcad3",
"results": {
"underlying": {
- "aggregates": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "url": "https://api.polygon.io/v2/aggs/ticker/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366658253?limit=66&sort=desc"
},
"values": [
{
- "timestamp": 1517562000016,
- "value": 140.139
+ "timestamp": 1687237200000,
+ "value": 73.98019439047955
}
]
},
@@ -9226,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"
@@ -9247,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"
}
}
@@ -9267,8 +10041,8 @@
}
},
"type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
+ "x-massive-go-type": {
+ "name": "RSIResults"
}
},
"status": {
@@ -9278,47 +10052,42 @@
},
"type": "object"
}
- },
- "text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n",
- "schema": {
- "type": "string"
- }
}
},
- "description": "Simple Moving Average (SMA) data for each period."
+ "description": "Relative Strength Index (RSI) data for each period."
}
},
- "summary": "Simple Moving Average (SMA)",
+ "summary": "Relative Strength Index (RSI)",
"tags": [
- "crpyto:aggregates"
+ "indices:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-allowed-limited-tickers": true,
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
- "/v1/indicators/sma/{fxTicker}": {
+ "/v1/indicators/rsi/{optionsTicker}": {
"get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "ForexSMA",
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "OptionsRSI",
"parameters": [
{
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "C:EUR-USD",
+ "description": "The ticker symbol for which to get relative strength index (RSI) data.",
+ "example": "O:SPY241220P00720000",
"in": "path",
- "name": "fxTicker",
+ "name": "optionsTicker",
"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.",
@@ -9327,7 +10096,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -9351,7 +10120,7 @@
}
},
{
- "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
"example": true,
"in": "query",
"name": "adjusted",
@@ -9361,17 +10130,17 @@
}
},
{
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
+ "description": "The window size used to calculate the relative strength index (RSI).",
+ "example": 14,
"in": "query",
"name": "window",
"schema": {
- "default": 50,
+ "default": 14,
"type": "integer"
}
},
{
- "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
"example": "close",
"in": "query",
"name": "series_type",
@@ -9420,7 +10189,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -9428,7 +10197,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -9436,7 +10205,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -9444,7 +10213,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -9457,38 +10226,16 @@
"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/rsi/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "aggregates": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "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/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
"timestamp": 1517562000016,
- "value": 140.139
+ "value": 82.19
}
]
},
@@ -9566,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"
@@ -9587,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"
}
}
@@ -9607,8 +10354,8 @@
}
},
"type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
+ "x-massive-go-type": {
+ "name": "RSIResults"
}
},
"status": {
@@ -9620,45 +10367,45 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,30.837887188419387\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,15.546598157051605\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,88.61520575036505\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,88.61520575036505\n",
"schema": {
"type": "string"
}
}
},
- "description": "Simple Moving Average (SMA) data for each period."
+ "description": "Relative Strength Index (RSI) data for each period."
}
},
- "summary": "Simple Moving Average (SMA)",
+ "summary": "Relative Strength Index (RSI)",
"tags": [
- "fx:aggregates"
+ "options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
},
- "x-polygon-ignore": true
+ "x-massive-ignore": true
},
- "/v1/indicators/sma/{optionsTicker}": {
+ "/v1/indicators/rsi/{stockTicker}": {
"get": {
- "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "OptionsSMA",
+ "description": "Get the relative strength index (RSI) for a ticker symbol over a given time range.",
+ "operationId": "RSI",
"parameters": [
{
- "description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "O:SPY241220P00720000",
+ "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": "optionsTicker",
+ "name": "stockTicker",
"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.",
@@ -9667,7 +10414,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -9691,7 +10438,7 @@
}
},
{
- "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "description": "Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.",
"example": true,
"in": "query",
"name": "adjusted",
@@ -9701,17 +10448,17 @@
}
},
{
- "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
- "example": 50,
- "in": "query",
+ "description": "The window size used to calculate the relative strength index (RSI).",
+ "example": 14,
+ "in": "query",
"name": "window",
"schema": {
- "default": 50,
+ "default": 14,
"type": "integer"
}
},
{
- "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "description": "The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to \ncalculate the relative strength index (RSI).",
"example": "close",
"in": "query",
"name": "series_type",
@@ -9760,7 +10507,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -9768,7 +10515,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -9776,7 +10523,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -9784,7 +10531,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -9797,38 +10544,16 @@
"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/rsi/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
- "aggregates": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "url": "https://api.polygon.io/v2/aggs/ticker/O:SPY241220P00720000/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
}
]
},
@@ -9906,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"
@@ -9927,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"
}
}
@@ -9947,8 +10672,8 @@
}
},
"type": "object",
- "x-polygon-go-type": {
- "name": "SMAResults"
+ "x-massive-go-type": {
+ "name": "RSIResults"
}
},
"status": {
@@ -9960,45 +10685,44 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.0121999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,284.61099999999965\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,282.50919999999974\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,281.80859999999973\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,281.1079999999998\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.4949999999996\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,285.6801999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,285.31159999999966\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,283.9103999999997\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,283.2097999999997\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,23.065352237561996\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,29.877761913419718\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,29.58201330468151\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,30.233508748331047\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,19.857312489527956\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,32.18008680069761\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,28.71109953239781\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,31.140902927103383\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,32.21491128713248\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,35.950871523070575\n",
"schema": {
"type": "string"
}
}
},
- "description": "Simple Moving Average (SMA) data for each period."
+ "description": "Relative strength Index data for each period."
}
},
- "summary": "Simple Moving Average (SMA)",
+ "summary": "Relative Strength Index (RSI)",
"tags": [
- "options:aggregates"
+ "stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "x-polygon-ignore": true
+ }
},
- "/v1/indicators/sma/{stockTicker}": {
+ "/v1/indicators/sma/{cryptoTicker}": {
"get": {
"description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
- "operationId": "SMA",
+ "operationId": "CryptoSMA",
"parameters": [
{
"description": "The ticker symbol for which to get simple moving average (SMA) data.",
- "example": "AAPL",
+ "example": "X:BTCUSD",
"in": "path",
- "name": "stockTicker",
+ "name": "cryptoTicker",
"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.",
@@ -10007,7 +10731,7 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
@@ -10030,16 +10754,6 @@
"type": "string"
}
},
- {
- "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "default": true,
- "type": "boolean"
- }
- },
{
"description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
"example": 50,
@@ -10100,7 +10814,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -10108,7 +10822,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -10116,7 +10830,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -10124,7 +10838,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -10137,7 +10851,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/X:BTCUSD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
@@ -10163,7 +10877,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/X:BTCUSD/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
@@ -10246,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"
@@ -10267,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"
}
}
@@ -10287,7 +11001,7 @@
}
},
"type": "object",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "SMAResults"
}
},
@@ -10300,7 +11014,7 @@
}
},
"text/csv": {
- "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,164.19240000000005\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,164.40360000000007\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,164.42680000000007\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,164.33300000000006\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,164.13680000000005\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,164.32100000000005\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,164.28180000000003\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,163.97960000000006\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.73900000000006\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.59020000000007\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664164800000,297389,,0,,0,0,0,0,0,false,1664164800000,19846.01135387188\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664078400000,78936,,0,,0,0,0,0,0,false,1664078400000,19902.65703099573\nX:BTCUSD,4798.38258637,18914.0766,0,18928,18784.41,19184.3,18636,1664064000000,78936,,0,,0,0,0,0,0,false,1664064000000,19948.29976695474\nX:BTCUSD,15457.24362826,19317.486,0,19529.04,19475.84,19651.2772302,18846.67,1664409600000,191936,,0,,0,0,0,0,0,false,1664409600000,19751.714760699124\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664337600000,225076,,0,,0,0,0,0,0,false,1664337600000,19762.974955013375\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664251200000,183075,,0,,0,0,0,0,0,false,1664251200000,19791.86053850303\nX:BTCUSD,2868.09828007,19069.8521,0,19210.31,18925.87,19400,18805.1,1663992000000,58721,,0,,0,0,0,0,0,false,1663992000000,19995.805471728403\nX:BTCUSD,23180.93663313,19103.9189,0,19090,19416.20352522,19791,18461,1664323200000,225076,,0,,0,0,0,0,0,false,1664323200000,19777.128890923308\nX:BTCUSD,17479.00092209,19776.6697,0,19228.2,19141.78,20372.17374536,18821.55,1664236800000,183075,,0,,0,0,0,0,0,false,1664236800000,19818.394438033767\nX:BTCUSD,55188.33773657,18970.3019,0,18816.66899332,19165.98,19333,18690,1664150400000,297389,,0,,0,0,0,0,0,false,1664150400000,19873.767735662568\n",
"schema": {
"type": "string"
}
@@ -10311,39 +11025,162 @@
},
"summary": "Simple Moving Average (SMA)",
"tags": [
- "stocks:aggregates"
+ "crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
- }
+ },
+ "x-massive-ignore": true
},
- "/v1/last/crypto/{from}/{to}": {
+ "/v1/indicators/sma/{fxTicker}": {
"get": {
- "description": "Get the last trade tick for a cryptocurrency pair.",
- "operationId": "LastTradeCrypto",
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "ForexSMA",
"parameters": [
{
- "description": "The \"from\" symbol of the pair.",
- "example": "BTC",
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "C:EURUSD",
"in": "path",
- "name": "from",
+ "name": "fxTicker",
"required": true,
"schema": {
"type": "string"
+ },
+ "x-massive-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
+ "schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
}
},
{
- "description": "The \"to\" symbol of the pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "default": true,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
+ "schema": {
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
+ "in": "query",
+ "name": "expand_underlying",
+ "schema": {
+ "default": false,
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
"schema": {
"type": "string"
}
@@ -10354,686 +11191,338 @@
"content": {
"application/json": {
"example": {
- "last": {
- "conditions": [
- 1
- ],
- "exchange": 4,
- "price": 16835.42,
- "size": 0.006909,
- "timestamp": 1605560885027
+ "next_url": "https://api.massive.com/v1/indicators/sma/C:USDAUD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "aggregates": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "url": "https://api.massive.com/v2/aggs/ticker/C:USDAUD/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
},
- "request_id": "d2d779df015fe2b7fbb8e58366610ef7",
- "status": "success",
- "symbol": "BTC-USD"
+ "status": "OK"
},
"schema": {
"properties": {
- "last": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
"properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
},
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "exchange": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.",
- "type": "integer"
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
+ "type": "object"
},
- "timestamp": {
- "description": "The Unix millisecond timestamp.",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMilliseconds",
- "path": "github.com/polygon-io/ptime"
- }
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
},
"type": "object",
- "x-polygon-go-type": {
- "name": "LastTradeCrypto"
+ "x-massive-go-type": {
+ "name": "SMAResults"
}
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
"status": {
"description": "The status of this request's response.",
"type": "string"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
}
},
"type": "object"
}
},
"text/csv": {
- "example": "conditions,exchange,price,size,timestamp\n1,4,16835.42,0.006909,1605560885027\n",
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664323200000,685,,0,,0,0,0,0,0,false,1664323200000,1.4915199239999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664164800000,550,,0,,0,0,0,0,0,false,1664164800000,1.4863299679999997\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664078400000,10,,0,,0,0,0,0,0,false,1664078400000,1.4826388699999997\nC:USDAUD,686,1.5442,0,1.53763,1.5404,1.5526022,1.537279,1664409600000,686,,0,,0,0,0,0,0,false,1664409600000,1.4942168479999998\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664251200000,536,,0,,0,0,0,0,0,false,1664251200000,1.4900704799999993\nC:USDAUD,536,1.5459,0,1.5446162,1.5550165,1.5587,1.5364287,1664236800000,536,,0,,0,0,0,0,0,false,1664236800000,1.4882634499999994\nC:USDAUD,550,1.5405,0,1.5298,1.54531,1.5526263,1.5298,1664150400000,550,,0,,0,0,0,0,0,false,1664150400000,1.4845906159999998\nC:USDAUD,10,1.5312,0,1.5324261,1.53107,1.5326375,1.5301,1664064000000,10,,0,,0,0,0,0,0,false,1664064000000,1.4809719239999999\nC:USDAUD,1,1.5314,0,1.5313936,1.5313936,1.5313936,1.5313936,1663977600000,1,,0,,0,0,0,0,0,false,1663977600000,1.4794745239999998\nC:USDAUD,685,1.5537,0,1.5539533,1.5371372,1.5705737,1.5316281,1664337600000,685,,0,,0,0,0,0,0,false,1664337600000,1.4928357579999996\n",
"schema": {
"type": "string"
}
}
},
- "description": "The last tick for this currency pair."
- },
- "default": {
- "description": "Unexpected error"
+ "description": "Simple Moving Average (SMA) data for each period."
}
},
- "summary": "Last Trade for a Crypto Pair",
+ "summary": "Simple Moving Average (SMA)",
"tags": [
- "crypto:last:trade"
+ "fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
- }
+ },
+ "x-massive-ignore": true
},
- "/v1/last_quote/currencies/{from}/{to}": {
+ "/v1/indicators/sma/{indicesTicker}": {
"get": {
- "description": "Get the last quote tick for a forex currency pair.",
- "operationId": "LastQuoteCurrencies",
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "IndicesSMA",
"parameters": [
{
- "description": "The \"from\" symbol of the pair.",
- "example": "AUD",
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "I:NDX",
"in": "path",
- "name": "from",
+ "name": "indicesTicker",
"required": true,
"schema": {
"type": "string"
- }
+ },
+ "x-massive-go-id": "Ticker"
},
{
- "description": "The \"to\" symbol of the pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
"schema": {
"type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "last": {
- "ask": 0.73124,
- "bid": 0.73122,
- "exchange": 48,
- "timestamp": 1605557756000
- },
- "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
- "status": "success",
- "symbol": "AUD/USD"
- },
- "schema": {
- "properties": {
- "last": {
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "exchange": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "timestamp": {
- "description": "The Unix millisecond timestamp.",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "IMilliseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuoteCurrencies"
- }
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask,bid,exchange,timestamp\n0.73124,0.73122,48,1605557756000\n",
- "schema": {
- "type": "string"
- }
- }
},
- "description": "The last quote tick for this currency pair."
+ "x-massive-filter-field": {
+ "range": true
+ }
},
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Last Quote for a Currency Pair",
- "tags": [
- "fx:last:quote"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- }
- }
- },
- "/v1/marketstatus/now": {
- "get": {
- "description": "Get the current trading status of the exchanges and overall financial markets.\n",
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "afterHours": true,
- "currencies": {
- "crypto": "open",
- "fx": "open"
- },
- "earlyHours": false,
- "exchanges": {
- "nasdaq": "extended-hours",
- "nyse": "extended-hours",
- "otc": "closed"
- },
- "market": "extended-hours",
- "serverTime": "2020-11-10T22:37:37.000Z"
- },
- "schema": {
- "properties": {
- "afterHours": {
- "description": "Whether or not the market is in post-market hours.",
- "type": "boolean"
- },
- "currencies": {
- "properties": {
- "crypto": {
- "description": "The status of the crypto market.",
- "type": "string"
- },
- "fx": {
- "description": "The status of the forex market.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "earlyHours": {
- "description": "Whether or not the market is in pre-market hours.",
- "type": "boolean"
- },
- "exchanges": {
- "properties": {
- "nasdaq": {
- "description": "The status of the Nasdaq market.",
- "type": "string"
- },
- "nyse": {
- "description": "The status of the NYSE market.",
- "type": "string"
- },
- "otc": {
- "description": "The status of the OTC market.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "market": {
- "description": "The status of the market as a whole.",
- "type": "string"
- },
- "serverTime": {
- "description": "The current time of the server.",
- "format": "date-time",
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "description": "Status of the market and each exchange"
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- },
- "409": {
- "description": "Parameter is invalid or incorrect."
- }
- },
- "summary": "Market Status",
- "tags": [
- "reference:stocks:market"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v1/marketstatus/upcoming": {
- "get": {
- "description": "Get upcoming market holidays and their open/close times.\n",
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": [
- {
- "date": "2020-11-26T00:00:00.000Z",
- "exchange": "NYSE",
- "name": "Thanksgiving",
- "status": "closed"
- },
- {
- "date": "2020-11-26T00:00:00.000Z",
- "exchange": "NASDAQ",
- "name": "Thanksgiving",
- "status": "closed"
- },
- {
- "date": "2020-11-26T00:00:00.000Z",
- "exchange": "OTC",
- "name": "Thanksgiving",
- "status": "closed"
- },
- {
- "close": "2020-11-27T18:00:00.000Z",
- "date": "2020-11-27T00:00:00.000Z",
- "exchange": "NASDAQ",
- "name": "Thanksgiving",
- "open": "2020-11-27T14:30:00.000Z",
- "status": "early-close"
- },
- {
- "close": "2020-11-27T18:00:00.000Z",
- "date": "2020-11-27T00:00:00.000Z",
- "exchange": "NYSE",
- "name": "Thanksgiving",
- "open": "2020-11-27T14:30:00.000Z",
- "status": "early-close"
- }
- ],
- "schema": {
- "items": {
- "properties": {
- "close": {
- "description": "The market close time on the holiday (if it's not closed).",
- "format": "date-time",
- "type": "string"
- },
- "date": {
- "description": "The date of the holiday.",
- "format": "date",
- "type": "string"
- },
- "exchange": {
- "description": "Which market the record is for.",
- "type": "string"
- },
- "name": {
- "description": "The name of the holiday.",
- "type": "string"
- },
- "open": {
- "description": "The market open time on the holiday (if it's not closed).",
- "format": "date-time",
- "type": "string"
- },
- "status": {
- "description": "The status of the market on the holiday.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- }
- },
- "description": "Holidays for each market in the near future."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
- },
- "409": {
- "description": "Parameter is invalid or incorrect."
- }
- },
- "summary": "Market Holidays",
- "tags": [
- "reference:stocks:market"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v1/open-close/crypto/{from}/{to}/{date}": {
- "get": {
- "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n",
- "parameters": [
{
- "description": "The \"from\" symbol of the pair.",
- "example": "BTC",
- "in": "path",
- "name": "from",
- "required": true,
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
"schema": {
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
"type": "string"
}
},
{
- "description": "The \"to\" symbol of the pair.",
- "example": "USD",
- "in": "path",
- "name": "to",
- "required": true,
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
"schema": {
- "type": "string"
+ "default": true,
+ "type": "boolean"
}
},
{
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
+ "in": "query",
+ "name": "window",
"schema": {
- "format": "date",
+ "default": 50,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The value in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close values to \ncalculate the simple moving average (SMA).",
+ "example": "close",
+ "in": "query",
+ "name": "series_type",
+ "schema": {
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
"type": "string"
}
},
{
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
"in": "query",
- "name": "adjusted",
+ "name": "expand_underlying",
"schema": {
+ "default": false,
"type": "boolean"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "close": 11050.64,
- "closingTrades": [
- {
- "c": [
- 2
- ],
- "i": "973323250",
- "p": 11050.64,
- "s": 0.006128,
- "t": 1602287999795,
- "x": 4
- },
- {
- "c": [
- 1
- ],
- "i": "105717893",
- "p": 11049.4,
- "s": 0.014,
- "t": 1602287999659,
- "x": 17
- }
- ],
- "day": "2020-10-09T00:00:00.000Z",
- "isUTC": true,
- "open": 10932.44,
- "openTrades": [
- {
- "c": [
- 2
- ],
- "i": "511235746",
- "p": 10932.44,
- "s": 0.002,
- "t": 1602201600056,
- "x": 1
- },
- {
- "c": [
- 2
- ],
- "i": "511235751",
- "p": 10923.76,
- "s": 0.02,
- "t": 1602201600141,
- "x": 4
- }
- ],
- "symbol": "BTC-USD"
- },
- "schema": {
- "properties": {
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "closingTrades": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "day": {
- "description": "The date requested.",
- "format": "date",
- "type": "string"
- },
- "isUTC": {
- "description": "Whether or not the timestamps are in UTC timezone.",
- "type": "boolean"
- },
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "openTrades": {
- "items": {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "symbol": {
- "description": "The symbol pair that was evaluated from the request.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "isUTC,day,open,close,openTrades,closingTrades\ntrue,2020-10-09,10932.44,11050.64,\"[{\\\"s\\\":0.002,\\\"p\\\":10932.44,\\\"x\\\":1,\\\"t\\\":1602201600056,\\\"c\\\":[2],\\\"i\\\":\\\"511235746\\\"},{\\\"s\\\":0.02,\\\"p\\\":10923.76,\\\"x\\\":4,\\\"t\\\":1602201600141,\\\"c\\\":[2],\\\"i\\\":\\\"511235751\\\"}]\",\"[{\\\"s\\\":0.006128,\\\"p\\\":11050.64,\\\"x\\\":4,\\\"t\\\":1602287999795,\\\"c\\\":[2],\\\"i\\\":\\\"973323250\\\"},{\\\"s\\\":0.014,\\\"p\\\":11049.4,\\\"x\\\":17,\\\"t\\\":1602287999659,\\\"c\\\":[1],\\\"i\\\":\\\"105717893\\\"}]\"\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The open/close of this symbol."
},
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Daily Open/Close",
- "tags": [
- "crypto:open-close"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
- }
- }
- },
- "/v1/open-close/{optionsTicker}/{date}": {
- "get": {
- "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n",
- "parameters": [
{
- "description": "The ticker symbol of the options contract.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
+ "in": "query",
+ "name": "order",
"schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
"type": "string"
}
},
{
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "example": "2021-07-22",
- "in": "path",
- "name": "date",
- "required": true,
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
+ "description": "Range by timestamp.",
"in": "query",
- "name": "adjusted",
+ "name": "timestamp.gt",
"schema": {
- "type": "boolean"
+ "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"
}
}
],
@@ -11042,463 +11531,310 @@
"content": {
"application/json": {
"example": {
- "afterHours": 26.35,
- "close": 26.35,
- "from": "2021-07-22",
- "high": 26.35,
- "low": 25,
- "open": 25,
- "preMarket": 25,
- "status": "OK",
- "symbol": "O:TSLA210903C00700000",
- "volume": 2
+ "next_url": "https://api.massive.com/v1/indicators/sma/I:NDX?cursor=YWRqdXN0ZWQ9dHJ1ZSZhcD0lN0IlMjJ2JTIyJTNBMCUyQyUyMm8lMjIlM0EwJTJDJTIyYyUyMiUzQTE1MDg0Ljk5OTM4OTgyMDAzJTJDJTIyaCUyMiUzQTAlMkMlMjJsJTIyJTNBMCUyQyUyMnQlMjIlM0ExNjg3MjE5MjAwMDAwJTdEJmFzPSZleHBhbmRfdW5kZXJseWluZz1mYWxzZSZsaW1pdD0xJm9yZGVyPWRlc2Mmc2VyaWVzX3R5cGU9Y2xvc2UmdGltZXNwYW49ZGF5JnRpbWVzdGFtcC5sdD0xNjg3MjM3MjAwMDAwJndpbmRvdz01Mw",
+ "request_id": "4cae270008cb3f947e3f92c206e3888a",
+ "results": {
+ "underlying": {
+ "url": "https://api.massive.com/v2/aggs/ticker/I:NDX/range/1/day/1678338000000/1687366378997?limit=240&sort=desc"
+ },
+ "values": [
+ {
+ "timestamp": 1687237200000,
+ "value": 14362.676417589264
+ }
+ ]
+ },
+ "status": "OK"
},
"schema": {
"properties": {
- "afterHours": {
- "description": "The close price of the ticker symbol in after hours trading.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "from": {
- "description": "The requested date.",
- "format": "date",
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
- "high": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "low": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
},
- "preMarket": {
- "description": "The open price of the ticker symbol in pre-market trading.",
- "type": "integer"
+ "results": {
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SMAResults"
+ }
},
"status": {
"description": "The status of this request's response.",
"type": "string"
- },
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "volume": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
}
},
"type": "object"
}
- },
- "text/csv": {
- "example": "from,open,high,low,close,volume,afterHours,preMarket\n2021-07-22,25,26.35,25,26.35,2,26.35,25\n",
- "schema": {
- "type": "string"
- }
}
},
- "description": "The open/close of this stock symbol."
- },
- "default": {
- "description": "Unexpected error"
+ "description": "Simple Moving Average (SMA) data for each period."
}
},
- "summary": "Daily Open/Close",
+ "summary": "Simple Moving Average (SMA)",
"tags": [
- "options:open-close"
+ "indices:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-allowed-limited-tickers": true,
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
- }
+ },
+ "x-massive-ignore": true
},
- "/v1/open-close/{stocksTicker}/{date}": {
+ "/v1/indicators/sma/{optionsTicker}": {
"get": {
- "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n",
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "OptionsSMA",
"parameters": [
{
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
+ "description": "The ticker symbol for which to get simple moving average (SMA) data.",
+ "example": "O:SPY241220P00720000",
"in": "path",
- "name": "stocksTicker",
+ "name": "optionsTicker",
"required": true,
"schema": {
"type": "string"
+ },
+ "x-massive-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
}
},
{
- "description": "The date of the requested open/close in the format YYYY-MM-DD.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
+ "description": "The size of the aggregate time window.",
+ "example": "day",
+ "in": "query",
+ "name": "timespan",
"schema": {
- "format": "date",
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
"type": "string"
}
},
{
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
"example": true,
"in": "query",
"name": "adjusted",
"schema": {
+ "default": true,
"type": "boolean"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "afterHours": 322.1,
- "close": 325.12,
- "from": "2020-10-14T00:00:00.000Z",
- "high": 326.2,
- "low": 322.3,
- "open": 324.66,
- "preMarket": 324.5,
- "status": "OK",
- "symbol": "AAPL",
- "volume": 26122646
- },
- "schema": {
- "properties": {
- "afterHours": {
- "description": "The close price of the ticker symbol in after hours trading.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "from": {
- "description": "The requested date.",
- "format": "date",
- "type": "string"
- },
- "high": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "low": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "preMarket": {
- "description": "The open price of the ticker symbol in pre-market trading.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- },
- "symbol": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "volume": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "from,open,high,low,close,volume,afterHours,preMarket\n2020-10-14,324.66,326.2,322.3,325.12,26122646,322.1,324.5\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The open/close of this stock symbol."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Daily Open/Close",
- "tags": [
- "stocks:open-close"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v1/reference/sec/filings": {
- "get": {
- "description": "List filings",
- "operationId": "ListFilings",
- "parameters": [
- {
- "description": "Query by filing type.",
- "in": "query",
- "name": "type",
- "schema": {
- "description": "Filing Type",
- "enum": [
- "10-K",
- "10-Q"
- ],
- "type": "string"
- }
},
{
- "description": "Query by filing date.",
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
"in": "query",
- "name": "filing_date",
+ "name": "window",
"schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
+ "default": 50,
+ "type": "integer"
}
},
{
- "description": "Query by period of report.",
+ "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "example": "close",
"in": "query",
- "name": "period_of_report_date",
+ "name": "series_type",
"schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
}
},
{
- "description": "If true, query only for filings with an XBRL instance file.\nIf false, query for filings without an XBRL instance file.\nIf this parameter is not provided, query for filings with or without XBRL instance files.",
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
"in": "query",
- "name": "has_xbrl",
+ "name": "expand_underlying",
"schema": {
- "nullable": true,
+ "default": false,
"type": "boolean"
- },
- "x-polygon-go-id": "HasXBRL"
- },
- {
- "description": "Query by entity company name.",
- "in": "query",
- "name": "entities.company_data.name",
- "schema": {
- "example": "Facebook Inc",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "search": true
- }
- },
- {
- "description": "Query by entity company CIK.",
- "in": "query",
- "name": "entities.company_data.cik",
- "schema": {
- "description": "Central Index Key (CIK) Number",
- "type": "string"
- }
- },
- {
- "description": "Query by entity company ticker.",
- "in": "query",
- "name": "entities.company_data.ticker",
- "schema": {
- "description": "Ticker",
- "type": "string"
- }
- },
- {
- "description": "Query by entity company SIC.",
- "in": "query",
- "name": "entities.company_data.sic",
- "schema": {
- "description": "Standard Industrial Classification (SIC)",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gte",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gt",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lte",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lt",
- "schema": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- }
- },
- {
- "description": "Search by period_of_report_date.",
- "in": "query",
- "name": "period_of_report_date.gte",
- "schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
"in": "query",
- "name": "period_of_report_date.gt",
+ "name": "order",
"schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
"type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
"in": "query",
- "name": "period_of_report_date.lte",
+ "name": "limit",
"schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "period_of_report_date.lt",
+ "name": "timestamp.gte",
"schema": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
"type": "string"
}
},
{
- "description": "Search by entities.company_data.name.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "entities.company_data.name.search",
+ "name": "timestamp.gt",
"schema": {
"type": "string"
}
},
{
- "description": "Order results based on the `sort` field.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "order",
+ "name": "timestamp.lte",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
"type": "string"
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "sort",
+ "name": "timestamp.lt",
"schema": {
- "default": "filing_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ],
- "example": "filing_date",
"type": "string"
}
}
@@ -11507,483 +11843,338 @@
"200": {
"content": {
"application/json": {
- "description": "FIXME",
- "example": {},
+ "example": {
+ "next_url": "https://api.massive.com/v1/indicators/sma/O:SPY241220P00720000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "aggregates": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "url": "https://api.massive.com/v2/aggs/ticker/O:SPY241220P00720000/range/1/day/2003-01-01/2022-07-25"
+ },
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
+ },
"schema": {
"properties": {
- "count": {
- "type": "integer"
- },
"next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
"request_id": {
+ "description": "A request id assigned by the server.",
"type": "string"
},
"results": {
- "items": {
- "properties": {
- "accession_number": {
- "description": "Filing Accession Number",
- "type": "string"
- },
- "entities": {
- "description": "Entities related to the filing (e.g. the document filers).",
- "items": {
- "description": "A filing entity (e.g. the document filer).",
- "properties": {
- "company_data": {
- "properties": {
- "cik": {
- "description": "Central Index Key (CIK) Number",
- "type": "string"
- },
- "name": {
- "example": "Facebook Inc",
- "type": "string"
- },
- "sic": {
- "description": "Standard Industrial Classification (SIC)",
- "type": "string"
- },
- "ticker": {
- "description": "Ticker",
- "type": "string"
- }
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
},
- "required": [
- "name",
- "cik",
- "sic"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECCompanyData",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
}
},
- "relation": {
- "description": "Relationship of this entity to the filing.",
- "enum": [
- "filer"
- ],
- "type": "string"
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
- "required": [
- "relation"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingEntity",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
+ "type": "array"
},
- "type": "array"
- },
- "files_count": {
- "description": "The number of files associated with the filing.",
- "format": "int64",
- "type": "integer"
- },
- "filing_date": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "id": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- },
- "period_of_report_date": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
- "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
- "format": "uri",
- "type": "string"
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
},
- "type": {
- "description": "Filing Type",
- "enum": [
- "10-K",
- "10-Q"
- ],
- "type": "string"
- }
+ "type": "object"
},
- "required": [
- "id",
- "accession_number",
- "type",
- "filing_date",
- "period_of_report_date",
- "files_count",
- "source_url",
- "download_url",
- "entities"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFiling",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
},
- "type": "array"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SMAResults"
+ }
},
"status": {
+ "description": "The status of this request's response.",
"type": "string"
}
},
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
"type": "object"
}
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649304000000,1,,0,,0,0,0,0,0,false,1649304000000,286.0121999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649131200000,1,,0,,0,0,0,0,0,false,1649131200000,284.61099999999965\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648699200000,1,,0,,0,0,0,0,0,false,1648699200000,282.50919999999974\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648612800000,1,,0,,0,0,0,0,0,false,1648612800000,281.80859999999973\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648526400000,1,,0,,0,0,0,0,0,false,1648526400000,281.1079999999998\nO:SPY241220P00720000,3,277.8267,0,277.82,277.83,277.83,277.82,1649649600000,2,,0,,0,0,0,0,0,false,1649649600000,285.4949999999996\nO:SPY241220P00720000,2,270.49,0,270.49,270.49,270.49,270.49,1649390400000,1,,0,,0,0,0,0,0,false,1649390400000,285.6801999999996\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649217600000,1,,0,,0,0,0,0,0,false,1649217600000,285.31159999999966\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1649044800000,1,,0,,0,0,0,0,0,false,1649044800000,283.9103999999997\nO:SPY241220P00720000,1,299.97,0,299.97,299.97,299.97,299.97,1648785600000,1,,0,,0,0,0,0,0,false,1648785600000,283.2097999999997\n",
+ "schema": {
+ "type": "string"
+ }
}
},
- "description": "FIXME"
+ "description": "Simple Moving Average (SMA) data for each period."
}
},
- "summary": "SEC Filings",
+ "summary": "Simple Moving Average (SMA)",
"tags": [
- "reference:sec:filings"
+ "options:aggregates"
],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
},
- "x-polygon-paginate": {
- "sort": {
- "default": "filing_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ]
- }
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
},
- "x-polygon-draft": true
+ "x-massive-ignore": true
},
- "/v1/reference/sec/filings/{filing_id}": {
+ "/v1/indicators/sma/{stockTicker}": {
"get": {
- "description": "Get filing",
- "operationId": "GetFiling",
+ "description": "Get the simple moving average (SMA) for a ticker symbol over a given time range.",
+ "operationId": "SMA",
"parameters": [
{
- "description": "Select by filing id.",
+ "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": "filing_id",
+ "name": "stockTicker",
+ "required": true,
"schema": {
- "description": "Unique identifier for the filing.",
"type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "description": "FIXME",
- "example": {},
- "schema": {
- "properties": {
- "accession_number": {
- "description": "Filing Accession Number",
- "type": "string"
- },
- "entities": {
- "description": "Entities related to the filing (e.g. the document filers).",
- "items": {
- "description": "A filing entity (e.g. the document filer).",
- "properties": {
- "company_data": {
- "properties": {
- "cik": {
- "description": "Central Index Key (CIK) Number",
- "type": "string"
- },
- "name": {
- "example": "Facebook Inc",
- "type": "string"
- },
- "sic": {
- "description": "Standard Industrial Classification (SIC)",
- "type": "string"
- },
- "ticker": {
- "description": "Ticker",
- "type": "string"
- }
- },
- "required": [
- "name",
- "cik",
- "sic"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECCompanyData",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "relation": {
- "description": "Relationship of this entity to the filing.",
- "enum": [
- "filer"
- ],
- "type": "string"
- }
- },
- "required": [
- "relation"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingEntity",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- },
- "type": "array"
- },
- "files_count": {
- "description": "The number of files associated with the filing.",
- "format": "int64",
- "type": "integer"
- },
- "filing_date": {
- "description": "The date when the filing was filed in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "id": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- },
- "period_of_report_date": {
- "description": "The period of report for the filing in YYYYMMDD format.",
- "example": "20210101",
- "pattern": "^[0-9]{8}$",
- "type": "string"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
- "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
- "format": "uri",
- "type": "string"
- },
- "type": {
- "description": "Filing Type",
- "enum": [
- "10-K",
- "10-Q"
- ],
- "type": "string"
- }
- },
- "required": [
- "id",
- "accession_number",
- "type",
- "filing_date",
- "period_of_report_date",
- "files_count",
- "source_url",
- "download_url",
- "entities"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFiling",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
- }
- }
- }
},
- "description": "FIXME"
- }
- },
- "summary": "SEC Filing",
- "tags": [
- "reference:sec:filing"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- },
- "x-polygon-draft": true
- },
- "/v1/reference/sec/filings/{filing_id}/files": {
- "get": {
- "description": "List filing files",
- "operationId": "ListFilingFiles",
- "parameters": [
- {
- "description": "Select by filing id.",
- "in": "path",
- "name": "filing_id",
- "schema": {
- "description": "Unique identifier for the filing.",
- "type": "string"
- }
+ "x-massive-go-id": "Ticker"
},
{
- "description": "Query by file sequence number.",
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
"in": "query",
- "name": "sequence",
+ "name": "timestamp",
"schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
+ "type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
{
- "description": "Query by file name.",
+ "description": "The size of the aggregate time window.",
+ "example": "day",
"in": "query",
- "name": "filename",
+ "name": "timespan",
"schema": {
- "description": "The name for the file.",
+ "default": "day",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
}
},
{
- "description": "Search by sequence.",
+ "description": "Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted.\nSet this to false to get results that are NOT adjusted for splits.",
+ "example": true,
"in": "query",
- "name": "sequence.gte",
+ "name": "adjusted",
"schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
+ "default": true,
+ "type": "boolean"
}
},
{
- "description": "Search by sequence.",
+ "description": "The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.",
+ "example": 50,
"in": "query",
- "name": "sequence.gt",
+ "name": "window",
"schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
+ "default": 50,
"type": "integer"
}
},
{
- "description": "Search by sequence.",
+ "description": "The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to \ncalculate the simple moving average (SMA).",
+ "example": "close",
"in": "query",
- "name": "sequence.lte",
+ "name": "series_type",
"schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
+ "default": "close",
+ "enum": [
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "string"
}
},
{
- "description": "Search by sequence.",
+ "description": "Whether or not to include the aggregates used to calculate this indicator in the response.",
"in": "query",
- "name": "sequence.lt",
+ "name": "expand_underlying",
"schema": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
+ "default": false,
+ "type": "boolean"
}
},
{
- "description": "Search by filename.",
+ "description": "The order in which to return the results, ordered by timestamp.",
+ "example": "desc",
"in": "query",
- "name": "filename.gte",
+ "name": "order",
"schema": {
- "description": "The name for the file.",
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
"type": "string"
}
},
{
- "description": "Search by filename.",
+ "description": "Limit the number of results returned, default is 10 and max is 5000",
"in": "query",
- "name": "filename.gt",
+ "name": "limit",
"schema": {
- "description": "The name for the file.",
- "type": "string"
+ "default": 10,
+ "maximum": 5000,
+ "type": "integer"
}
},
{
- "description": "Search by filename.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "filename.lte",
+ "name": "timestamp.gte",
"schema": {
- "description": "The name for the file.",
"type": "string"
}
},
{
- "description": "Search by filename.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "filename.lt",
+ "name": "timestamp.gt",
"schema": {
- "description": "The name for the file.",
"type": "string"
}
},
{
- "description": "Order results based on the `sort` field.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "order",
+ "name": "timestamp.lte",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
"type": "string"
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "sort",
+ "name": "timestamp.lt",
"schema": {
- "default": "sequence",
- "enum": [
- "sequence",
- "filename"
- ],
- "example": "sequence",
"type": "string"
}
}
@@ -11992,409 +12183,358 @@
"200": {
"content": {
"application/json": {
- "description": "FIXME",
- "example": {},
- "schema": {
- "properties": {
- "count": {
- "type": "integer"
+ "example": {
+ "next_url": "https://api.massive.com/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": {
+ "underlying": {
+ "aggregates": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
},
+ "values": [
+ {
+ "timestamp": 1517562000016,
+ "value": 140.139
+ }
+ ]
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
"next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
"request_id": {
+ "description": "A request id assigned by the server.",
"type": "string"
},
"results": {
- "items": {
- "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
- "properties": {
- "description": {
- "description": "A description for the contents of the file.",
- "type": "string"
- },
- "filename": {
- "description": "The name for the file.",
- "type": "string"
- },
- "id": {
- "description": "An identifier unique to the filing for this data entry.",
- "example": "1",
- "type": "string"
- },
- "sequence": {
- "description": "File Sequence Number",
- "format": "int64",
- "max": 999,
- "min": 1,
- "type": "integer"
- },
- "size_bytes": {
- "description": "The size of the file in bytes.",
- "format": "int64",
- "type": "integer"
- },
- "source_url": {
- "description": "The source URL is a link back to the upstream source for this file.",
- "format": "uri",
- "type": "string"
+ "properties": {
+ "underlying": {
+ "properties": {
+ "aggregates": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "format": "float",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "float",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "float",
+ "type": "number"
+ }
+ },
+ "required": [
+ "v",
+ "vw",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t",
+ "n"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Aggregate",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
+ "url": {
+ "description": "The URL which can be used to request the underlying aggregates used in this request.",
+ "type": "string"
+ }
},
- "type": {
- "description": "The type of document contained in the file.",
- "type": "string"
- }
+ "type": "object"
},
- "required": [
- "id",
- "file",
- "description",
- "type",
- "size_bytes",
- "sequence",
- "source_url"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "SECFilingFile",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "values": {
+ "items": {
+ "properties": {
+ "timestamp": {
+ "description": "The Unix Msec timestamp from the last aggregate used in this calculation.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "IMicroseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "value": {
+ "description": "The indicator value for this period.",
+ "format": "float",
+ "type": "number",
+ "x-massive-go-type": {
+ "name": "*float64"
+ }
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
}
},
- "type": "array"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SMAResults"
+ }
},
"status": {
+ "description": "The status of this request's response.",
"type": "string"
}
},
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
"type": "object"
}
+ },
+ "text/csv": {
+ "example": "aggregate_T,aggregate_v,aggregate_vw,aggregate_a,aggregate_o,aggregate_c,aggregate_h,aggregate_l,aggregate_t,aggregate_n,aggregate_m,aggregate_x,aggregate_g,aggregate_op,aggregate_z,aggregate_av,aggregate_s,aggregate_e,aggregate_otc,timestamp,value\nAAPL,1.27849501E+08,142.9012,0,146.1,142.48,146.72,140.68,1664424000000,1061692,,0,,0,0,0,0,0,false,1664424000000,164.19240000000005\nAAPL,1.46755122E+08,147.599,0,147.64,149.84,150.6414,144.84,1664337600000,1140818,,0,,0,0,0,0,0,false,1664337600000,164.40360000000007\nAAPL,8.4461761E+07,152.1354,0,152.74,151.76,154.72,149.945,1664251200000,683781,,0,,0,0,0,0,0,false,1664251200000,164.42680000000007\nAAPL,9.3339409E+07,151.5222,0,149.66,150.77,153.7701,149.64,1664164800000,747666,,0,,0,0,0,0,0,false,1664164800000,164.33300000000006\nAAPL,9.3308449E+07,156.1877,0,157.34,153.72,158.61,153.6,1663732800000,712645,,0,,0,0,0,0,0,false,1663732800000,164.13680000000005\nAAPL,9.6031641E+07,150.0222,0,151.19,150.43,151.47,148.56,1663905600000,766888,,0,,0,0,0,0,0,false,1663905600000,164.32100000000005\nAAPL,8.6651514E+07,152.5709,0,152.38,152.74,154.47,150.91,1663819200000,686866,,0,,0,0,0,0,0,false,1663819200000,164.28180000000003\nAAPL,1.07691097E+08,156.1317,0,153.4,156.9,158.08,153.08,1663646400000,792177,,0,,0,0,0,0,0,false,1663646400000,163.97960000000006\nAAPL,8.1599225E+07,152.5505,0,149.31,154.48,154.56,149.1,1663560000000,671961,,0,,0,0,0,0,0,false,1663560000000,163.73900000000006\nAAPL,1.64879031E+08,150.2387,0,151.21,150.7,151.35,148.37,1663300800000,850358,,0,,0,0,0,0,0,false,1663300800000,163.59020000000007\n",
+ "schema": {
+ "type": "string"
+ }
}
},
- "description": "FIXME"
+ "description": "Simple Moving Average (SMA) data for each period."
}
},
- "summary": "SEC Filing Files",
+ "summary": "Simple Moving Average (SMA)",
"tags": [
- "reference:sec:filing:files"
+ "stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
},
- "x-polygon-paginate": {
- "sort": {
- "default": "sequence",
- "enum": [
- "sequence",
- "filename"
- ]
- }
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
- },
- "x-polygon-draft": true
+ }
},
- "/v1/reference/sec/filings/{filing_id}/files/{file_id}": {
+ "/v1/last/crypto/{from}/{to}": {
"get": {
- "description": "Get filing file",
- "operationId": "GetFilingFile",
+ "description": "Get the last trade tick for a cryptocurrency pair.",
+ "operationId": "LastTradeCrypto",
"parameters": [
{
- "description": "Select by filing id.",
+ "description": "The \"from\" symbol of the pair.",
+ "example": "BTC",
"in": "path",
- "name": "filing_id",
+ "name": "from",
+ "required": true,
"schema": {
- "description": "Unique identifier for the filing.",
"type": "string"
}
},
{
- "description": "Select by file id.",
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
"in": "path",
- "name": "file_id",
+ "name": "to",
+ "required": true,
"schema": {
- "description": "An identifier unique to the filing for this data entry.",
- "example": "1",
"type": "string"
}
}
],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "description": "JavaScript Object Notation (JSON)",
- "example": {}
- },
- "application/octet-stream": {
- "description": "Binary format",
- "example": {}
- },
- "application/pdf": {
- "description": "Adobe Portable Document Format (PDF)",
- "example": {}
- },
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
- "description": "Microsoft Excel (OpenXML)",
- "example": {}
- },
- "application/xml": {
- "description": "Extensible Markup Language (XML)",
- "example": {}
- },
- "application/zip": {
- "description": "ZIP archive",
- "example": {}
- },
- "image/gif": {
- "description": "Graphics Interchange Format (GIF)",
- "example": {}
- },
- "image/jpeg": {
- "description": "Joint Photographic Experts Group (JPEG) image",
- "example": {}
- },
- "image/png": {
- "description": "Portable Network Graphics (PNG)",
- "example": {}
- },
- "text/css": {
- "description": "Cascading Style Sheets (CSS)",
- "example": {}
- },
- "text/html": {
- "description": "HyperText Markup Language (HTML)",
- "example": {}
- },
- "text/javascript": {
- "description": "JavaScript",
- "example": {}
- },
- "text/plain": {
- "description": "Text",
- "example": {}
- }
- },
- "description": "The file data."
- }
- },
- "summary": "SEC Filing File",
- "tags": [
- "reference:sec:filing:file"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- },
- "x-polygon-draft": true
- },
- "/v2/aggs/grouped/locale/global/market/crypto/{date}": {
- "get": {
- "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n",
- "parameters": [
- {
- "description": "The beginning date for the aggregate window.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- }
- ],
"responses": {
"200": {
"content": {
"application/json": {
"example": {
- "adjusted": true,
- "queryCount": 3,
- "results": [
- {
- "T": "X:ARDRUSD",
- "c": 0.0550762,
- "h": 0.0550762,
- "l": 0.0550762,
- "n": 18388,
- "o": 0.0550762,
- "t": 1580676480000,
- "v": 2,
- "vw": 0.0551
- },
- {
- "T": "X:NGCUSD",
- "c": 0.0272983,
- "h": 0.0273733,
- "l": 0.0272983,
- "n": 18,
- "o": 0.0273733,
- "t": 1580674080000,
- "v": 4734,
- "vw": 0.0273
- },
- {
- "T": "X:ZSCUSD",
- "c": 0.00028531,
- "h": 0.00028531,
- "l": 0.00028531,
- "n": 151,
- "o": 0.00028531,
- "t": 1580671080000,
- "v": 390,
- "vw": 0.0003
- }
- ],
- "resultsCount": 3,
- "status": "OK"
+ "last": {
+ "conditions": [
+ 1
+ ],
+ "exchange": 4,
+ "price": 16835.42,
+ "size": 0.006909,
+ "timestamp": 1605560885027
+ },
+ "request_id": "d2d779df015fe2b7fbb8e58366610ef7",
+ "status": "success",
+ "symbol": "BTC-USD"
},
"schema": {
- "allOf": [
- {
+ "properties": {
+ "last": {
"properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
+ "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"
+ }
},
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
+ "exchange": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.",
"type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
},
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/massive-com/ptime"
+ }
}
},
- "type": "object"
+ "required": [
+ "exchange",
+ "price",
+ "size",
+ "timestamp"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "LastTradeCrypto"
+ }
},
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
- ]
+ },
+ "required": [
+ "status",
+ "request_id",
+ "symbol"
+ ],
+ "type": "object"
}
},
"text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nX:ARDRUSD,0.0550762,0.0550762,0.0550762,18388,0.0550762,1580676480000,2,0.0551\nX:NGCUSD,0.0272983,0.0273733,0.0272983,18,0.0273733,1580674080000,4734,0.0273\nX:ZSCUSD,0.00028531,0.00028531,0.00028531,151,0.00028531,1580671080000,390,0.0003\n",
+ "example": "conditions,exchange,price,size,timestamp\n1,4,16835.42,0.006909,1605560885027\n",
"schema": {
"type": "string"
}
}
},
- "description": "The previous day OHLC for the ticker."
+ "description": "The last tick for this currency pair."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Grouped Daily (Bars)",
+ "summary": "Last Trade for a Crypto Pair",
"tags": [
- "crypto:aggregates"
+ "crypto:last:trade"
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Crypto data",
"name": "crypto"
}
}
},
- "/v2/aggs/grouped/locale/global/market/fx/{date}": {
+ "/v1/last_quote/currencies/{from}/{to}": {
"get": {
- "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n",
+ "description": "Get the last quote tick for a forex currency pair.",
+ "operationId": "LastQuoteCurrencies",
"parameters": [
{
- "description": "The beginning date for the aggregate window.",
- "example": "2020-10-14",
+ "description": "The \"from\" symbol of the pair.",
+ "example": "AUD",
"in": "path",
- "name": "date",
+ "name": "from",
"required": true,
"schema": {
"type": "string"
}
},
{
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
"schema": {
- "type": "boolean"
+ "type": "string"
}
}
],
@@ -12403,362 +12543,376 @@
"content": {
"application/json": {
"example": {
- "adjusted": true,
- "queryCount": 3,
- "results": [
- {
- "T": "C:ILSCHF",
- "c": 0.2704,
- "h": 0.2706,
- "l": 0.2693,
- "n": 689,
- "o": 0.2698,
- "t": 1602719999999,
- "v": 689,
- "vw": 0.2702
- },
- {
- "T": "C:GBPCAD",
- "c": 1.71103,
- "h": 1.71642,
- "l": 1.69064,
- "n": 407324,
- "o": 1.69955,
- "t": 1602719999999,
- "v": 407324,
- "vw": 1.7062
- },
- {
- "T": "C:DKKAUD",
- "c": 0.2214,
- "h": 0.2214,
- "l": 0.2195,
- "n": 10639,
- "o": 0.22,
- "t": 1602719999999,
- "v": 10639,
- "vw": 0.2202
- }
- ],
- "resultsCount": 3,
- "status": "OK"
+ "last": {
+ "ask": 0.73124,
+ "bid": 0.73122,
+ "exchange": 48,
+ "timestamp": 1605557756000
+ },
+ "request_id": "a73a29dbcab4613eeaf48583d3baacf0",
+ "status": "success",
+ "symbol": "AUD/USD"
},
"schema": {
- "allOf": [
- {
+ "properties": {
+ "last": {
"properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
},
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
},
- "resultsCount": {
- "description": "The total number of results for this request.",
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
"type": "integer"
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
+ "timestamp": {
+ "description": "The Unix millisecond timestamp.",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "IMilliseconds",
+ "path": "github.com/massive-com/ptime"
+ }
}
},
- "type": "object"
+ "required": [
+ "ask",
+ "bid",
+ "exchange",
+ "timestamp"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "LastQuoteCurrencies"
+ }
},
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
- ]
+ },
+ "required": [
+ "status",
+ "request_id",
+ "symbol"
+ ],
+ "type": "object"
}
},
"text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nC:ILSCHF,0.2704,0.2706,0.2693,689,0.2698,1602719999999,689,0.2702\nC:GBPCAD,1.71103,1.71642,1.69064,407324,1.69955,1602719999999,407324,1.7062\nC:DKKAUD,0.2214,0.2214,0.2195,10639,0.22,1602719999999,10639,0.2202\n",
+ "example": "ask,bid,exchange,timestamp\n0.73124,0.73122,48,1605557756000\n",
"schema": {
"type": "string"
}
}
},
- "description": "Previous day OHLC for ticker"
+ "description": "The last quote tick for this currency pair."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Grouped Daily (Bars)",
+ "summary": "Last Quote for a Currency Pair",
"tags": [
- "fx:aggregates"
+ "fx:last:quote"
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-massive-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Forex data",
"name": "fx"
}
}
},
- "/v2/aggs/grouped/locale/us/market/stocks/{date}": {
+ "/v1/marketstatus/now": {
"get": {
- "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n",
- "parameters": [
- {
- "description": "The beginning date for the aggregate window.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "in": "query",
- "name": "include_otc",
- "schema": {
- "type": "boolean"
- }
- }
- ],
+ "description": "Get the current trading status of the exchanges and overall financial markets.",
+ "operationId": "GetMarketStatus",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
- "adjusted": true,
- "queryCount": 3,
- "results": [
- {
- "T": "KIMpL",
- "c": 25.9102,
- "h": 26.25,
- "l": 25.91,
- "n": 74,
- "o": 26.07,
- "t": 1602705600000,
- "v": 4369,
- "vw": 26.0407
- },
- {
- "T": "TANH",
- "c": 23.4,
- "h": 24.763,
- "l": 22.65,
- "n": 1096,
- "o": 24.5,
- "t": 1602705600000,
- "v": 25933.6,
- "vw": 23.493
- },
- {
- "T": "VSAT",
- "c": 34.24,
- "h": 35.47,
- "l": 34.21,
- "n": 4966,
- "o": 34.9,
- "t": 1602705600000,
- "v": 312583,
- "vw": 34.4736
- }
- ],
- "resultsCount": 3,
- "status": "OK"
+ "afterHours": true,
+ "currencies": {
+ "crypto": "open",
+ "fx": "open"
+ },
+ "earlyHours": false,
+ "exchanges": {
+ "nasdaq": "extended-hours",
+ "nyse": "extended-hours",
+ "otc": "closed"
+ },
+ "market": "extended-hours",
+ "serverTime": "2020-11-10T17:37:37-05:00"
},
"schema": {
- "allOf": [
- {
+ "properties": {
+ "afterHours": {
+ "description": "Whether or not the market is in post-market hours.",
+ "type": "boolean",
+ "x-massive-go-type": {
+ "name": "*bool"
+ }
+ },
+ "currencies": {
"properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
+ "crypto": {
+ "description": "The status of the crypto market.",
+ "type": "string"
},
- "request_id": {
- "description": "A request id assigned by the server.",
+ "fx": {
+ "description": "The status of the forex market.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Currencies"
+ }
+ },
+ "earlyHours": {
+ "description": "Whether or not the market is in pre-market hours.",
+ "type": "boolean",
+ "x-massive-go-type": {
+ "name": "*bool"
+ }
+ },
+ "exchanges": {
+ "properties": {
+ "nasdaq": {
+ "description": "The status of the Nasdaq market.",
"type": "string"
},
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "nyse": {
+ "description": "The status of the NYSE market.",
+ "type": "string"
},
- "status": {
- "description": "The status of this request's response.",
+ "otc": {
+ "description": "The status of the OTC market.",
"type": "string"
}
},
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Exchanges"
+ }
},
- {
+ "indicesGroups": {
"properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
+ "cccy": {
+ "description": "The status of Cboe Streaming Market Indices Cryptocurrency (\"CCCY\") indices trading hours.",
+ "type": "string"
+ },
+ "cgi": {
+ "description": "The status of Cboe Global Indices (\"CGI\") trading hours.",
+ "type": "string"
+ },
+ "dow_jones": {
+ "description": "The status of Dow Jones indices trading hours",
+ "type": "string"
+ },
+ "ftse_russell": {
+ "description": "The status of Financial Times Stock Exchange Group (\"FTSE\") Russell indices trading hours.",
+ "type": "string"
+ },
+ "msci": {
+ "description": "The status of Morgan Stanley Capital International (\"MSCI\") indices trading hours.",
+ "type": "string"
+ },
+ "mstar": {
+ "description": "The status of Morningstar (\"MSTAR\") indices trading hours.",
+ "type": "string"
+ },
+ "mstarc": {
+ "description": "The status of Morningstar Customer (\"MSTARC\") indices trading hours."
+ },
+ "nasdaq": {
+ "description": "The status of National Association of Securities Dealers Automated Quotations (\"Nasdaq\") indices trading hours.",
+ "type": "string"
+ },
+ "s_and_p": {
+ "description": "The status of Standard & Poors's (\"S&P\") indices trading hours.",
+ "type": "string"
+ },
+ "societe_generale": {
+ "description": "The status of Societe Generale indices trading hours.",
+ "type": "string"
}
},
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "IndicesGroups"
+ }
+ },
+ "market": {
+ "description": "The status of the market as a whole.",
+ "type": "string"
+ },
+ "serverTime": {
+ "description": "The current time of the server, returned as a date-time in RFC3339 format.",
+ "type": "string"
}
- ]
+ },
+ "type": "object"
}
- },
- "text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nKIMpL,25.9102,26.25,25.91,74,26.07,1602705600000,4369,26.0407\nTANH,23.4,24.763,22.65,1096,24.5,1602705600000,25933.6,23.493\nVSAT,34.24,35.47,34.21,4966,34.9,1602705600000,312583,34.4736\n",
+ }
+ },
+ "description": "OK"
+ }
+ },
+ "summary": "Market Status",
+ "tags": [
+ "reference:stocks:market"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v1/marketstatus/upcoming": {
+ "get": {
+ "description": "Get upcoming market holidays and their open/close times.",
+ "operationId": "GetMarketHolidays",
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": [
+ {
+ "date": "2020-11-26",
+ "exchange": "NYSE",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "date": "2020-11-26",
+ "exchange": "NASDAQ",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "date": "2020-11-26",
+ "exchange": "OTC",
+ "name": "Thanksgiving",
+ "status": "closed"
+ },
+ {
+ "close": "2020-11-27T18:00:00.000Z",
+ "date": "2020-11-27",
+ "exchange": "NASDAQ",
+ "name": "Thanksgiving",
+ "open": "2020-11-27T14:30:00.000Z",
+ "status": "early-close"
+ },
+ {
+ "close": "2020-11-27T18:00:00.000Z",
+ "date": "2020-11-27",
+ "exchange": "NYSE",
+ "name": "Thanksgiving",
+ "open": "2020-11-27T14:30:00.000Z",
+ "status": "early-close"
+ }
+ ],
"schema": {
- "type": "string"
+ "items": {
+ "properties": {
+ "close": {
+ "description": "The market close time on the holiday (if it's not closed).",
+ "type": "string"
+ },
+ "date": {
+ "description": "The date of the holiday.",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "Which market the record is for.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the holiday.",
+ "type": "string"
+ },
+ "open": {
+ "description": "The market open time on the holiday (if it's not closed).",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of the market on the holiday.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "MarketHoliday"
+ }
+ },
+ "type": "array"
}
}
},
- "description": "Previous day OHLC for ticker"
- },
- "default": {
- "description": "Unexpected error"
+ "description": "OK"
}
},
- "summary": "Grouped Daily (Bars)",
+ "summary": "Market Holidays",
"tags": [
- "stocks:aggregates"
+ "reference:stocks:market"
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
}
}
},
- "/v2/aggs/ticker/{cryptoTicker}/prev": {
+ "/v1/open-close/crypto/{from}/{to}/{date}": {
"get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n",
+ "description": "Get the open, close prices of a cryptocurrency symbol on a certain day.\n",
"parameters": [
{
- "description": "The ticker symbol of the currency pair.",
- "example": "X:BTCUSD",
+ "description": "The \"from\" symbol of the pair.",
+ "example": "BTC",
"in": "path",
- "name": "cryptoTicker",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The \"to\" symbol of the pair.",
+ "example": "USD",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
"required": true,
"schema": {
+ "format": "date",
"type": "string"
}
},
@@ -12777,237 +12931,235 @@
"content": {
"application/json": {
"example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "b2170df985474b6d21a6eeccfb6bee67",
- "results": [
+ "close": 11050.64,
+ "closingTrades": [
{
- "T": "X:BTCUSD",
- "c": 16035.9,
- "h": 16180,
- "l": 15639.2,
- "o": 15937.1,
- "t": 1605416400000,
- "v": 95045.16897951,
- "vw": 15954.2111
+ "c": [
+ 2
+ ],
+ "i": "973323250",
+ "p": 11050.64,
+ "s": 0.006128,
+ "t": 1602287999795,
+ "x": 4
+ },
+ {
+ "c": [
+ 1
+ ],
+ "i": "105717893",
+ "p": 11049.4,
+ "s": 0.014,
+ "t": 1602287999659,
+ "x": 17
}
],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "X:BTCUSD"
- },
- "schema": {
- "allOf": [
+ "day": "2020-10-09T00:00:00.000Z",
+ "isUTC": true,
+ "open": 10932.44,
+ "openTrades": [
{
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
+ "c": [
+ 2
+ ],
+ "i": "511235746",
+ "p": 10932.44,
+ "s": 0.002,
+ "t": 1602201600056,
+ "x": 1
},
{
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
+ "c": [
+ 2
+ ],
+ "i": "511235751",
+ "p": 10923.76,
+ "s": 0.02,
+ "t": 1602201600141,
+ "x": 4
+ }
+ ],
+ "symbol": "BTC-USD"
+ },
+ "schema": {
+ "properties": {
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "closingTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
},
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
},
- "type": "object"
+ "type": "array"
},
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "day": {
+ "description": "The date requested.",
+ "format": "date",
+ "type": "string"
+ },
+ "isUTC": {
+ "description": "Whether or not the timestamps are in UTC timezone.",
+ "type": "boolean"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "openTrades": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
},
- "type": "object"
+ "type": "array"
},
- "type": "array"
- }
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "x",
+ "c",
+ "t",
+ "i"
+ ],
+ "type": "object"
},
- "type": "object"
+ "type": "array"
+ },
+ "symbol": {
+ "description": "The symbol pair that was evaluated from the request.",
+ "type": "string"
}
- ]
+ },
+ "required": [
+ "symbol",
+ "isUTC",
+ "day",
+ "open",
+ "close",
+ "openTrades",
+ "closingTrades"
+ ],
+ "type": "object"
}
},
"text/csv": {
- "example": "T,c,h,l,o,t,v,vw\nX:BTCUSD,16035.9,16180,15639.2,15937.1,1605416400000,95045.16897951,15954.2111\n",
+ "example": "isUTC,day,open,close,openTrades,closingTrades\ntrue,2020-10-09,10932.44,11050.64,\"[{\\\"s\\\":0.002,\\\"p\\\":10932.44,\\\"x\\\":1,\\\"t\\\":1602201600056,\\\"c\\\":[2],\\\"i\\\":\\\"511235746\\\"},{\\\"s\\\":0.02,\\\"p\\\":10923.76,\\\"x\\\":4,\\\"t\\\":1602201600141,\\\"c\\\":[2],\\\"i\\\":\\\"511235751\\\"}]\",\"[{\\\"s\\\":0.006128,\\\"p\\\":11050.64,\\\"x\\\":4,\\\"t\\\":1602287999795,\\\"c\\\":[2],\\\"i\\\":\\\"973323250\\\"},{\\\"s\\\":0.014,\\\"p\\\":11049.4,\\\"x\\\":17,\\\"t\\\":1602287999659,\\\"c\\\":[1],\\\"i\\\":\\\"105717893\\\"}]\"\n",
"schema": {
"type": "string"
}
}
},
- "description": "The previous day OHLC for a ticker."
+ "description": "The open/close of this symbol."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Previous Close",
+ "summary": "Daily Open/Close",
"tags": [
- "crypto:aggregates"
+ "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"
}
}
},
- "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "/v1/open-close/{indicesTicker}/{date}": {
"get": {
- "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "description": "Get the open, close and afterhours values of a index symbol on a certain date.\n",
"parameters": [
{
- "description": "The ticker symbol of the currency pair.",
- "example": "X:BTCUSD",
+ "description": "The ticker symbol of Index.",
+ "example": "I:NDX",
"in": "path",
- "name": "cryptoTicker",
+ "name": "indicesTicker",
"required": true,
"schema": {
"type": "string"
}
},
{
- "description": "The size of the timespan multiplier.",
- "example": 1,
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-03-10",
"in": "path",
- "name": "multiplier",
+ "name": "date",
"required": true,
"schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
- "in": "path",
- "name": "to",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
+ "type": "string"
}
}
],
@@ -13016,163 +13168,123 @@
"content": {
"application/json": {
"example": {
- "adjusted": true,
- "queryCount": 2,
- "request_id": "0cf72b6da685bcd386548ffe2895904a",
- "results": [
- {
- "c": 10094.75,
- "h": 10429.26,
- "l": 9490,
- "n": 1,
- "o": 9557.9,
- "t": 1590984000000,
- "v": 303067.6562332156,
- "vw": 9874.5529
- },
- {
- "c": 9492.62,
- "h": 10222.72,
- "l": 9135.68,
- "n": 1,
- "o": 10096.87,
- "t": 1591070400000,
- "v": 323339.6922892879,
- "vw": 9729.5701
- }
- ],
- "resultsCount": 2,
+ "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",
- "ticker": "X:BTCUSD"
+ "symbol": "I:NDX"
},
"schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
+ "properties": {
+ "afterHours": {
+ "description": "The close value of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
+ "close": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "preMarket": {
+ "description": "The open value of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
}
- ]
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close"
+ ],
+ "type": "object"
}
},
"text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n10094.75,10429.26,9490,1,9557.9,1590984000000,303067.6562332156,9874.5529\n9492.62,10222.72,9135.68,1,10096.87,1591070400000,323339.6922892879,9729.5701\n",
+ "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": "Cryptocurrency Aggregates."
+ "description": "The open/close of this stock symbol."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Aggregates (Bars)",
+ "summary": "Daily Open/Close",
"tags": [
- "crypto:aggregates"
+ "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": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
}
},
- "/v2/aggs/ticker/{forexTicker}/prev": {
+ "/v1/open-close/{optionsTicker}/{date}": {
"get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n",
+ "description": "Get the open, close and afterhours prices of an options contract on a certain date.\n",
"parameters": [
{
- "description": "The ticker symbol of the currency pair.",
- "example": "C:EURUSD",
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:SPY251219C00650000",
"in": "path",
- "name": "forexTicker",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
"required": true,
"schema": {
+ "format": "date",
"type": "string"
}
},
@@ -13191,207 +13303,133 @@
"content": {
"application/json": {
"example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "08ec061fb85115678d68452c0a609cb7",
- "results": [
- {
- "T": "C:EURUSD",
- "c": 1.06206,
- "h": 1.0631,
- "l": 1.0505,
- "n": 180300,
- "o": 1.05252,
- "t": 1651708799999,
- "v": 180300,
- "vw": 1.055
- }
- ],
- "resultsCount": 1,
+ "afterHours": 26.35,
+ "close": 26.35,
+ "from": "2023-01-09",
+ "high": 26.35,
+ "low": 25,
+ "open": 25,
+ "preMarket": 25,
"status": "OK",
- "ticker": "C:EURUSD"
+ "symbol": "O:TSLA210903C00700000",
+ "volume": 2
},
"schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
+ "properties": {
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "preMarket": {
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
}
- ]
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close",
+ "volume"
+ ],
+ "type": "object"
}
},
"text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nC:EURUSD,1.06206,1.0631,1.0505,180300,1.05252,1651708799999,180300,1.055\n",
+ "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,25,26.35,25,26.35,2,26.35,25\n",
"schema": {
"type": "string"
}
}
},
- "description": "The previous day OHLC for the ticker."
+ "description": "The open/close of this stock symbol."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Previous Close",
+ "summary": "Daily Open/Close",
"tags": [
- "fx:aggregates"
+ "options:open-close"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
}
},
- "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "/v1/open-close/{stocksTicker}/{date}": {
"get": {
- "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "description": "Get the open, close and afterhours prices of a stock symbol on a certain date.\n",
"parameters": [
{
- "description": "The ticker symbol of the currency pair.",
- "example": "C:EURUSD",
- "in": "path",
- "name": "forexTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
+ "example": "AAPL",
"in": "path",
- "name": "from",
+ "name": "stocksTicker",
"required": true,
"schema": {
"type": "string"
}
},
{
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
+ "description": "The date of the requested open/close in the format YYYY-MM-DD.",
+ "example": "2023-01-09",
"in": "path",
- "name": "to",
+ "name": "date",
"required": true,
"schema": {
+ "format": "date",
"type": "string"
}
},
@@ -13403,27 +13441,6 @@
"schema": {
"type": "boolean"
}
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
}
],
"responses": {
@@ -13431,575 +13448,339 @@
"content": {
"application/json": {
"example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "79c061995d8b627b736170bc9653f15d",
- "results": [
- {
- "c": 1.17721,
- "h": 1.18305,
- "l": 1.1756,
- "n": 125329,
- "o": 1.17921,
- "t": 1626912000000,
- "v": 125329,
- "vw": 1.1789
- }
- ],
- "resultsCount": 1,
+ "afterHours": 322.1,
+ "close": 325.12,
+ "from": "2023-01-09",
+ "high": 326.2,
+ "low": 322.3,
+ "open": 324.66,
+ "preMarket": 324.5,
"status": "OK",
- "ticker": "C:EURUSD"
+ "symbol": "AAPL",
+ "volume": 26122646
},
"schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
+ "properties": {
+ "afterHours": {
+ "description": "The close price of the ticker symbol in after hours trading.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
+ "close": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
+ "from": {
+ "description": "The requested date.",
+ "format": "date",
+ "type": "string"
+ },
+ "high": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "preMarket": {
+ "description": "The open price of the ticker symbol in pre-market trading.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ "symbol": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "volume": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
}
- ]
+ },
+ "required": [
+ "status",
+ "from",
+ "symbol",
+ "open",
+ "high",
+ "low",
+ "close",
+ "volume"
+ ],
+ "type": "object"
}
},
"text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n1.17721,1.18305,1.1756,125329,1.17921,1626912000000,125329,1.1789\n",
+ "example": "from,open,high,low,close,volume,afterHours,preMarket\n2023-01-09,324.66,326.2,322.3,325.12,26122646,322.1,324.5\n",
"schema": {
"type": "string"
}
}
},
- "description": "Forex Aggregates."
+ "description": "The open/close of this stock symbol."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Aggregates (Bars)",
+ "summary": "Daily Open/Close",
"tags": [
- "fx:aggregates"
+ "stocks:open-close"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
}
},
- "/v2/aggs/ticker/{optionsTicker}/prev": {
+ "/v1/reference/sec/filings": {
"get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified option contract.\n",
+ "description": "List filings",
+ "operationId": "ListFilings",
"parameters": [
{
- "description": "The ticker symbol of the options contract.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
+ "description": "Query by filing type.",
+ "in": "query",
+ "name": "type",
"schema": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
"type": "string"
}
},
{
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
+ "description": "Query by filing date.",
"in": "query",
- "name": "adjusted",
+ "name": "filing_date",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Query by period of report.",
+ "in": "query",
+ "name": "period_of_report_date",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "If true, query only for filings with an XBRL instance file.\nIf false, query for filings without an XBRL instance file.\nIf this parameter is not provided, query for filings with or without XBRL instance files.",
+ "in": "query",
+ "name": "has_xbrl",
"schema": {
+ "nullable": true,
"type": "boolean"
+ },
+ "x-massive-go-id": "HasXBRL"
+ },
+ {
+ "description": "Query by entity company name.",
+ "in": "query",
+ "name": "entities.company_data.name",
+ "schema": {
+ "example": "Facebook Inc",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "search": true
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "T": "O:TSLA210903C00700000",
- "c": 115.97,
- "h": 117.59,
- "l": 114.13,
- "n": 2,
- "o": 115.55,
- "t": 1605042000000,
- "v": 131704427,
- "vw": 116.3058
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "O:TSLA210903C00700000"
- },
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- }
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,n,o,t,v,vw\nO:TSLA210903C00700000,115.97,117.59,114.13,2,115.55,1605042000000,131704427.0,116.3058\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "The previous day OHLC for the options contract."
},
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Previous Close",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- }
- },
- "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
- "get": {
- "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
- "parameters": [
{
- "description": "The ticker symbol of the options contract.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
+ "description": "Query by entity company CIK.",
+ "in": "query",
+ "name": "entities.company_data.cik",
"schema": {
+ "description": "Central Index Key (CIK) Number",
"type": "string"
}
},
{
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
+ "description": "Query by entity company ticker.",
+ "in": "query",
+ "name": "entities.company_data.ticker",
"schema": {
- "type": "integer"
+ "description": "Ticker",
+ "type": "string"
}
},
{
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
+ "description": "Query by entity company SIC.",
+ "in": "query",
+ "name": "entities.company_data.sic",
"schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
+ "description": "Standard Industrial Classification (SIC)",
"type": "string"
}
},
{
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
- "in": "path",
- "name": "from",
- "required": true,
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gte",
"schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
"type": "string"
}
},
{
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
- "in": "path",
- "name": "to",
- "required": true,
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.gt",
+ "schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filing_date.",
+ "in": "query",
+ "name": "filing_date.lte",
"schema": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
"type": "string"
}
},
{
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
+ "description": "Search by filing_date.",
"in": "query",
- "name": "adjusted",
+ "name": "filing_date.lt",
"schema": {
- "type": "boolean"
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
}
},
{
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
+ "description": "Search by period_of_report_date.",
"in": "query",
- "name": "sort",
+ "name": "period_of_report_date.gte",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.gt",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lte",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by period_of_report_date.",
+ "in": "query",
+ "name": "period_of_report_date.lt",
+ "schema": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by entities.company_data.name.",
+ "in": "query",
+ "name": "entities.company_data.name.search",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
"schema": {
"enum": [
"asc",
"desc"
- ]
+ ],
+ "example": "asc",
+ "type": "string"
}
},
{
- "description": "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,
+ "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"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "adjusted": true,
- "count": 2,
- "queryCount": 2,
- "request_id": "5585acde-5085-42d6-95b2-2e388a28370a",
- "results": [
- {
- "c": 26.2,
- "h": 26.2,
- "l": 26.2,
- "n": 1,
- "o": 26.2,
- "t": 1632369600000,
- "v": 2,
- "vw": 26.2
- },
- {
- "c": 28.3,
- "h": 28.3,
- "l": 28.3,
- "n": 1,
- "o": 28.3,
- "t": 1632456000000,
- "v": 2,
- "vw": 28.3
- }
- ],
- "resultsCount": 2,
- "status": "OK",
- "ticker": "O:RDFN211119C00025000"
- },
- "schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "type": "array"
- }
- },
- "type": "object"
- }
- ]
- }
- },
- "text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n26.2,26.2,26.2,1,26.2,1632369600000,2,26.2\n28.3,28.3,28.3,1,28.3,1632456000000,2,28.3\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Options Aggregates."
- },
- "default": {
- "description": "Unexpected error"
- }
- },
- "summary": "Aggregates (Bars)",
- "tags": [
- "options:aggregates"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- }
- }
- },
- "/v2/aggs/ticker/{stocksTicker}/prev": {
- "get": {
- "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n",
- "parameters": [
- {
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
},
{
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
+ "description": "Sort field used for ordering.",
"in": "query",
- "name": "adjusted",
+ "name": "sort",
"schema": {
- "type": "boolean"
+ "default": "filing_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ],
+ "example": "filing_date",
+ "type": "string"
}
}
],
@@ -14007,579 +13788,496 @@
"200": {
"content": {
"application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 1,
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "T": "AAPL",
- "c": 115.97,
- "h": 117.59,
- "l": 114.13,
- "o": 115.55,
- "t": 1605042000000,
- "v": 131704427,
- "vw": 116.3058
- }
- ],
- "resultsCount": 1,
- "status": "OK",
- "ticker": "AAPL"
- },
+ "description": "FIXME",
+ "example": {},
"schema": {
- "allOf": [
- {
- "properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- "type": "object"
+ "properties": {
+ "count": {
+ "type": "integer"
},
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
- },
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
+ "next_url": {
+ "type": "string"
},
- {
- "properties": {
- "results": {
- "items": {
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "acceptance_datetime": {
+ "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
+ "type": "string"
+ },
+ "accession_number": {
+ "description": "Filing Accession Number",
+ "type": "string"
+ },
+ "entities": {
+ "description": "Entities related to the filing (e.g. the document filers).",
+ "items": {
+ "description": "A filing entity (e.g. the document filer).",
+ "properties": {
+ "company_data": {
+ "properties": {
+ "cik": {
+ "description": "Central Index Key (CIK) Number",
+ "type": "string"
+ },
+ "name": {
+ "example": "Facebook Inc",
+ "type": "string"
+ },
+ "sic": {
+ "description": "Standard Industrial Classification (SIC)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "Ticker",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "cik",
+ "sic"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECCompanyData",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ },
+ "relation": {
+ "description": "Relationship of this entity to the filing.",
+ "enum": [
+ "filer"
+ ],
+ "type": "string"
+ }
},
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
+ "required": [
+ "relation"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECFilingEntity",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
- "type": "object"
+ "type": "array"
},
- "type": "array"
+ "files_count": {
+ "description": "The number of files associated with the filing.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "filing_date": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ },
+ "period_of_report_date": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
+ "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "accession_number",
+ "type",
+ "filing_date",
+ "period_of_report_date",
+ "files_count",
+ "source_url",
+ "download_url",
+ "entities"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECFiling",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
- "type": "object"
+ "type": "array"
+ },
+ "status": {
+ "type": "string"
}
- ]
- }
- },
- "text/csv": {
- "example": "T,c,h,l,o,t,v,vw\nAAPL,115.97,117.59,114.13,115.55,1605042000000,131704427.0,116.3058\n",
- "schema": {
- "type": "string"
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
}
}
},
- "description": "The previous day OHLC for the ticker."
- },
- "default": {
- "description": "Unexpected error"
+ "description": "FIXME"
}
},
- "summary": "Previous Close",
+ "summary": "SEC Filings",
"tags": [
- "stocks:aggregates"
+ "reference:sec:filings"
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-paginate": {
+ "sort": {
+ "default": "filing_date",
+ "enum": [
+ "filing_date",
+ "period_of_report_date"
+ ]
+ }
}
- }
+ },
+ "x-massive-draft": true
},
- "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "/v1/reference/sec/filings/{filing_id}": {
"get": {
- "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "description": "Get filing",
+ "operationId": "GetFiling",
"parameters": [
{
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
- "in": "path",
- "name": "stocksTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The size of the timespan multiplier.",
- "example": 1,
- "in": "path",
- "name": "multiplier",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The size of the time window.",
- "example": "day",
- "in": "path",
- "name": "timespan",
- "required": true,
- "schema": {
- "enum": [
- "minute",
- "hour",
- "day",
- "week",
- "month",
- "quarter",
- "year"
- ],
- "type": "string"
- }
- },
- {
- "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
- "in": "path",
- "name": "from",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
- "example": "2021-07-22",
+ "description": "Select by filing id.",
"in": "path",
- "name": "to",
- "required": true,
+ "name": "filing_id",
"schema": {
+ "description": "Unique identifier for the filing.",
"type": "string"
}
- },
- {
- "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
- "example": true,
- "in": "query",
- "name": "adjusted",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
- "example": "asc",
- "in": "query",
- "name": "sort",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ]
- }
- },
- {
- "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on \nAggregate Data API Improvements.\n",
- "example": 120,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
}
],
"responses": {
"200": {
"content": {
"application/json": {
- "example": {
- "adjusted": true,
- "queryCount": 2,
- "request_id": "6a7e466379af0a71039d60cc78e72282",
- "results": [
- {
- "c": 75.0875,
- "h": 75.15,
- "l": 73.7975,
- "n": 1,
- "o": 74.06,
- "t": 1577941200000,
- "v": 135647456,
- "vw": 74.6099
- },
- {
- "c": 74.3575,
- "h": 75.145,
- "l": 74.125,
- "n": 1,
- "o": 74.2875,
- "t": 1578027600000,
- "v": 146535512,
- "vw": 74.7026
- }
- ],
- "resultsCount": 2,
- "status": "OK",
- "ticker": "AAPL"
- },
+ "description": "FIXME",
+ "example": {},
"schema": {
- "allOf": [
- {
+ "properties": {
+ "results": {
"properties": {
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
+ "acceptance_datetime": {
+ "description": "The datetime when the filing was accepted by EDGAR in EST (format: YYYYMMDDHHMMSS)",
"type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "adjusted": {
- "description": "Whether or not this response was adjusted for splits.",
- "type": "boolean"
- },
- "queryCount": {
- "description": "The number of aggregates (minute or day) used to generate the response.",
- "type": "integer"
},
- "request_id": {
- "description": "A request id assigned by the server.",
+ "accession_number": {
+ "description": "Filing Accession Number",
"type": "string"
},
- "resultsCount": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "results": {
+ "entities": {
+ "description": "Entities related to the filing (e.g. the document filers).",
"items": {
+ "description": "A filing entity (e.g. the document filer).",
"properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "n": {
- "description": "The number of transactions in the aggregate window.",
- "type": "integer"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
+ "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"
+ }
},
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
+ "relation": {
+ "description": "Relationship of this entity to the filing.",
+ "enum": [
+ "filer"
+ ],
+ "type": "string"
}
},
- "type": "object"
+ "required": [
+ "relation"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECFilingEntity",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
},
"type": "array"
+ },
+ "files_count": {
+ "description": "The number of files associated with the filing.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "filing_date": {
+ "description": "The date when the filing was filed in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ },
+ "period_of_report_date": {
+ "description": "The period of report for the filing in YYYYMMDD format.",
+ "example": "20210101",
+ "pattern": "^[0-9]{8}$",
+ "type": "string"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this filing\ndocument.",
+ "example": "https://www.sec.gov/Archives/edgar/data/0001326801/000132680119000037/0001326801-19-000037-index.html",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "Filing Type",
+ "enum": [
+ "10-K",
+ "10-Q"
+ ],
+ "type": "string"
}
},
- "type": "object"
+ "required": [
+ "id",
+ "accession_number",
+ "type",
+ "filing_date",
+ "period_of_report_date",
+ "files_count",
+ "source_url",
+ "download_url",
+ "entities"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECFiling",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
}
- ]
- }
- },
- "text/csv": {
- "example": "c,h,l,n,o,t,v,vw\n75.0875,75.15,73.7975,1,74.06,1577941200000,135647456.0,74.6099\n74.3575,75.145,74.125,1,74.2875,1578027600000,146535512.0,74.7026\n",
- "schema": {
- "type": "string"
+ },
+ "type": "object"
}
}
},
- "description": "Stock Aggregates."
- },
- "default": {
- "description": "Unexpected error"
+ "description": "FIXME"
}
},
- "summary": "Aggregates (Bars)",
+ "summary": "SEC Filing",
"tags": [
- "stocks:aggregates"
+ "reference:sec:filing"
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
}
- }
+ },
+ "x-massive-draft": true
},
- "/v2/last/nbbo/{stocksTicker}": {
+ "/v1/reference/sec/filings/{filing_id}/files": {
"get": {
- "description": "Get the most recent NBBO (Quote) tick for a given stock.",
- "operationId": "LastQuote",
+ "description": "List filing files",
+ "operationId": "ListFilingFiles",
"parameters": [
{
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
+ "description": "Select by filing id.",
"in": "path",
- "name": "stocksTicker",
- "required": true,
+ "name": "filing_id",
"schema": {
+ "description": "Unique identifier for the filing.",
"type": "string"
+ }
+ },
+ {
+ "description": "Query by file sequence number.",
+ "in": "query",
+ "name": "sequence",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
},
- "x-polygon-go-id": "Ticker"
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "b84e24636301f19f88e0dfbf9a45ed5c",
- "results": {
- "P": 127.98,
- "S": 7,
- "T": "AAPL",
- "X": 19,
- "p": 127.96,
- "q": 83480742,
- "s": 1,
- "t": 1617827221349730300,
- "x": 11,
- "y": 1617827221349366000,
- "z": 3
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- },
- "results": {
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
- "type": "integer"
- },
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "X": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "c": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "i": {
- "description": "A list of indicator codes.",
- "items": {
- "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "q": {
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
- "format": "int64",
- "type": "integer"
- },
- "s": {
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "type": "integer"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuoteResult"
- }
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "P,S,T,X,p,q,s,t,x,y,z\n127.98,7,AAPL,19,127.96,83480742,1,1617827221349730300,11,1617827221349366000,3\n",
- "schema": {
- "type": "string"
- }
- }
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Query by file name.",
+ "in": "query",
+ "name": "filename",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
},
- "description": "The last NBBO tick for this stock."
+ "x-massive-filter-field": {
+ "range": true
+ }
},
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
+ {
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.gte",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
},
- "404": {
- "description": "The specified resource was not found"
- }
- },
- "summary": "Last Quote",
- "tags": [
- "stocks:last:quote"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
{
- "description": "Real Time Data",
- "name": "realtime"
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.gt",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
},
{
- "description": "15 minute delayed data",
- "name": "delayed"
- }
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- }
- }
- },
- "/v2/last/trade/{optionsTicker}": {
- "get": {
- "description": "Get the most recent trade for a given options contract.",
- "operationId": "LastTradeOptions",
- "parameters": [
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.lte",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
+ },
{
- "description": "The ticker symbol of the options contract.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
+ "description": "Search by sequence.",
+ "in": "query",
+ "name": "sequence.lt",
+ "schema": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.gte",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.gt",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.lte",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by filename.",
+ "in": "query",
+ "name": "filename.lt",
+ "schema": {
+ "description": "The name for the file.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
"schema": {
+ "default": "sequence",
+ "enum": [
+ "sequence",
+ "filename"
+ ],
+ "example": "sequence",
"type": "string"
}
}
@@ -14588,165 +14286,224 @@
"200": {
"content": {
"application/json": {
- "example": {
- "request_id": "f05562305bd26ced64b98ed68b3c5d96",
- "results": {
- "T": "O:TSLA210903C00700000",
- "c": [
- 227
- ],
- "f": 1617901342969796400,
- "i": "",
- "p": 115.55,
- "q": 1325541950,
- "r": 202,
- "s": 25,
- "t": 1617901342969834000,
- "x": 312
- },
- "status": "OK"
- },
+ "description": "FIXME",
+ "example": {},
"schema": {
"properties": {
+ "count": {
+ "type": "integer"
+ },
+ "next_url": {
+ "type": "string"
+ },
"request_id": {
- "description": "A request id assigned by the server.",
"type": "string"
},
"results": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "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.",
- "format": "int32",
+ "items": {
+ "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
+ "properties": {
+ "description": {
+ "description": "A description for the contents of the file.",
+ "type": "string"
+ },
+ "filename": {
+ "description": "The name for the file.",
+ "type": "string"
+ },
+ "id": {
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ },
+ "sequence": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
"type": "integer"
},
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
+ "size_bytes": {
+ "description": "The size of the file in bytes.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this file.",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of document contained in the file.",
+ "type": "string"
}
},
- "e": {
- "description": "The trade correction indicator.",
- "type": "integer"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "q": {
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
- "format": "int64",
- "type": "integer"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "type": "integer"
+ "required": [
+ "id",
+ "file",
+ "description",
+ "type",
+ "size_bytes",
+ "sequence",
+ "source_url"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECFilingFile",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
}
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastTradeResult"
- }
+ "type": "array"
},
"status": {
- "description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
"type": "object"
}
- },
- "text/csv": {
- "example": "T,c,f,i,p,q,r,s,t,x\nO:TSLA210903C00700000,227,1617901342969796400,,115.55,1325541950,202,25,1617901342969834000,312\n",
- "schema": {
- "type": "string"
- }
}
},
- "description": "The last trade for this options contract."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
+ "description": "FIXME"
}
},
- "summary": "Last Trade",
+ "summary": "SEC Filing Files",
"tags": [
- "options:last:trade"
+ "reference:sec:filing:files"
],
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-massive-paginate": {
+ "sort": {
+ "default": "sequence",
+ "enum": [
+ "sequence",
+ "filename"
+ ]
+ }
+ }
+ },
+ "x-massive-draft": true
+ },
+ "/v1/reference/sec/filings/{filing_id}/files/{file_id}": {
+ "get": {
+ "description": "Get filing file",
+ "operationId": "GetFilingFile",
+ "parameters": [
{
- "description": "Real Time Data",
- "name": "realtime"
+ "description": "Select by filing id.",
+ "in": "path",
+ "name": "filing_id",
+ "schema": {
+ "description": "Unique identifier for the filing.",
+ "type": "string"
+ }
},
{
- "description": "15 minute delayed data",
- "name": "delayed"
+ "description": "Select by file id.",
+ "in": "path",
+ "name": "file_id",
+ "schema": {
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ }
}
],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "description": "File associated with the filing.\n\nThis provides information to uniquly identify the additional data and a URL\nwhere the file may be downloaded.",
+ "properties": {
+ "description": {
+ "description": "A description for the contents of the file.",
+ "type": "string"
+ },
+ "filename": {
+ "description": "The name for the file.",
+ "type": "string"
+ },
+ "id": {
+ "description": "An identifier unique to the filing for this data entry.",
+ "example": "1",
+ "type": "string"
+ },
+ "sequence": {
+ "description": "File Sequence Number",
+ "format": "int64",
+ "max": 999,
+ "min": 1,
+ "type": "integer"
+ },
+ "size_bytes": {
+ "description": "The size of the file in bytes.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "source_url": {
+ "description": "The source URL is a link back to the upstream source for this file.",
+ "format": "uri",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of document contained in the file.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "file",
+ "description",
+ "type",
+ "size_bytes",
+ "sequence",
+ "source_url"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SECFilingFile",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ }
+ }
+ },
+ "description": "The file data."
+ }
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "summary": "SEC Filing File",
+ "tags": [
+ "reference:sec:filing:file"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
}
},
- "x-polygon-ignore": true
+ "x-massive-draft": true
},
- "/v2/last/trade/{stocksTicker}": {
+ "/v1/related-companies/{ticker}": {
"get": {
- "description": "Get the most recent trade for a given stock.",
- "operationId": "LastTrade",
+ "description": "Get a list of tickers related to the queried ticker based on News and Returns data.",
+ "operationId": "GetRelatedCompanies",
"parameters": [
{
- "description": "The ticker symbol of the stock/equity.",
+ "description": "The ticker symbol to search.",
"example": "AAPL",
"in": "path",
- "name": "stocksTicker",
+ "name": "ticker",
"required": true,
"schema": {
"type": "string"
- },
- "x-polygon-go-id": "Ticker"
+ }
}
],
"responses": {
@@ -14754,562 +14511,493 @@
"content": {
"application/json": {
"example": {
- "request_id": "f05562305bd26ced64b98ed68b3c5d96",
- "results": {
- "T": "AAPL",
- "c": [
- 37
- ],
- "f": 1617901342969796400,
- "i": "118749",
- "p": 129.8473,
- "q": 3135876,
- "r": 202,
- "s": 25,
- "t": 1617901342969834000,
- "x": 4,
- "y": 1617901342968000000,
- "z": 3
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "results": [
+ {
+ "ticker": "MSFT"
},
- "results": {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "c": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
+ {
+ "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"
}
},
- "e": {
- "description": "The trade correction indicator.",
- "type": "integer"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "q": {
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
- "format": "int64",
- "type": "integer"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "type": "integer"
- }
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastTradeResult"
- }
+ "type": "array"
},
"status": {
"description": "The status of this request's response.",
"type": "string"
+ },
+ "ticker": {
+ "description": "The ticker being queried.",
+ "type": "string"
}
},
"type": "object"
}
- },
- "text/csv": {
- "example": "T,c,f,i,p,q,r,s,t,x,y,z\nAAPL,37,1617901342969796400,118749,129.8473,3135876,202,25,1617901342969834000,4,1617901342968000000,3\n",
- "schema": {
- "type": "string"
- }
}
},
- "description": "The last trade for this stock."
+ "description": "Related Companies."
},
"401": {
"description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
}
},
- "summary": "Last Trade",
+ "summary": "Related Companies",
"tags": [
- "stocks:last:trade"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "reference:related:companies"
],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
}
}
},
- "/v2/reference/news": {
+ "/v1/summaries": {
"get": {
- "description": "Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source.",
- "operationId": "ListNews",
+ "description": "Get everything needed to visualize the tick-by-tick movement of a list of tickers.",
+ "operationId": "SnapshotSummary",
"parameters": [
{
- "description": "Return results that contain this ticker.",
- "in": "query",
- "name": "ticker",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Return results published on, before, or after this date.",
- "in": "query",
- "name": "published_utc",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gte",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.gt",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
- "in": "query",
- "name": "ticker.lte",
- "schema": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- }
- },
- {
- "description": "Search by ticker.",
+ "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.lt",
+ "name": "ticker.any_of",
"schema": {
- "description": "The exchange symbol that this item is traded under.",
"type": "string"
}
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.gte",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.gt",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.lte",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Search by published_utc.",
- "in": "query",
- "name": "published_utc.lt",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
- },
- {
- "description": "Order results based on the `sort` field.",
- "in": "query",
- "name": "order",
- "schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
- "type": "string"
- }
- },
- {
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
- "in": "query",
- "name": "sort",
- "schema": {
- "default": "published_utc",
- "enum": [
- "published_utc"
- ],
- "example": "published_utc",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "count": 1,
- "next_url": "https://api.polygon.io:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ",
- "request_id": "831afdb0b8078549fed053476984947a",
- "results": [
- {
- "amp_url": "https://amp.benzinga.com/amp/content/20784086",
- "article_url": "https://www.benzinga.com/markets/cryptocurrency/21/04/20784086/cathie-wood-adds-more-coinbase-skillz-trims-square",
- "author": "Rachit Vats",
- "description": "
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",
- "keywords": [
- "Sector ETFs",
- "Penny Stocks",
- "Cryptocurrency",
- "Small Cap",
- "Markets",
- "Trading Ideas",
- "ETFs"
- ],
- "published_utc": "2021-04-26T02:33:17Z",
- "publisher": {
- "favicon_url": "https://s3.polygon.io/public/public/assets/news/favicons/benzinga.ico",
- "homepage_url": "https://www.benzinga.com/",
- "logo_url": "https://s3.polygon.io/public/public/assets/news/logos/benzinga.svg",
- "name": "Benzinga"
- },
- "tickers": [
- "DOCU",
- "DDD",
- "NIU",
- "ARKF",
- "NVDA",
- "SKLZ",
- "PCAR",
- "MASS",
- "PSTI",
- "SPFR",
- "TREE",
- "PHR",
- "IRDM",
- "BEAM",
- "ARKW",
- "ARKK",
- "ARKG",
- "PSTG",
- "SQ",
- "IONS",
- "SYRS"
- ],
- "title": "Cathie Wood Adds More Coinbase, Skillz, Trims Square"
- }
- ],
- "status": "OK"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "abc123",
+ "results": [
+ {
+ "branding": {
+ "icon_url": "https://api.massive.com/icon.png",
+ "logo_url": "https://api.massive.com/logo.svg"
+ },
+ "last_updated": 1679597116344223500,
+ "market_status": "closed",
+ "name": "Norwegian Cruise Lines",
+ "price": 22.3,
+ "session": {
+ "change": -1.05,
+ "change_percent": -4.67,
+ "close": 21.4,
+ "early_trading_change": -0.39,
+ "early_trading_change_percent": -0.07,
+ "high": 22.49,
+ "late_trading_change": 1.2,
+ "late_trading_change_percent": 3.92,
+ "low": 21.35,
+ "open": 22.49,
+ "previous_close": 22.45,
+ "volume": 37
+ },
+ "ticker": "NCLH",
+ "type": "stocks"
+ },
+ {
+ "last_updated": 1679597116344223500,
+ "market_status": "closed",
+ "name": "NCLH $5 Call",
+ "options": {
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2022-10-14",
+ "shares_per_contract": 100,
+ "strike_price": 5,
+ "underlying_ticker": "NCLH"
+ },
+ "price": 6.6,
+ "session": {
+ "change": -0.05,
+ "change_percent": -1.07,
+ "close": 6.65,
+ "early_trading_change": -0.01,
+ "early_trading_change_percent": -0.03,
+ "high": 7.01,
+ "late_trading_change": -0.4,
+ "late_trading_change_percent": -0.02,
+ "low": 5.42,
+ "open": 6.7,
+ "previous_close": 6.71,
+ "volume": 67
+ },
+ "ticker": "O:NCLH221014C00005000",
+ "type": "options"
+ },
+ {
+ "last_updated": 1679597116344223500,
+ "market_status": "open",
+ "name": "Euro - United States Dollar",
+ "price": 0.97989,
+ "session": {
+ "change": -0.0001,
+ "change_percent": -0.67,
+ "close": 0.97989,
+ "high": 0.98999,
+ "low": 0.96689,
+ "open": 0.97889,
+ "previous_close": 0.98001
+ },
+ "ticker": "C:EURUSD",
+ "type": "fx"
+ },
+ {
+ "branding": {
+ "icon_url": "https://api.massive.com/icon.png",
+ "logo_url": "https://api.massive.com/logo.svg"
+ },
+ "last_updated": 1679597116344223500,
+ "market_status": "open",
+ "name": "Bitcoin - United States Dollar",
+ "price": 32154.68,
+ "session": {
+ "change": -201.23,
+ "change_percent": -0.77,
+ "close": 32154.68,
+ "high": 33124.28,
+ "low": 28182.88,
+ "open": 31129.32,
+ "previous_close": 33362.18
+ },
+ "ticker": "X:BTCUSD",
+ "type": "crypto"
+ },
+ {
+ "error": "NOT_FOUND",
+ "message": "Ticker not found.",
+ "ticker": "APx"
+ }
+ ],
+ "status": "OK"
},
"schema": {
"properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
"request_id": {
- "description": "A request id assigned by the server.",
"type": "string"
},
"results": {
"items": {
"properties": {
- "amp_url": {
- "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.",
- "type": "string"
- },
- "article_url": {
- "description": "A link to the news article.",
- "type": "string"
+ "branding": {
+ "properties": {
+ "icon_url": {
+ "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
+ "type": "string"
+ },
+ "logo_url": {
+ "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Branding"
+ }
},
- "author": {
- "description": "The article's author.",
+ "error": {
+ "description": "The error while looking for this ticker.",
"type": "string"
},
- "description": {
- "description": "A description of the article.",
- "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"
+ }
},
- "id": {
- "description": "Unique identifier for the article.",
+ "market_status": {
+ "description": "The market status for the market that trades this ticker.",
"type": "string"
},
- "image_url": {
- "description": "The article's image URL.",
+ "message": {
+ "description": "The error message while looking for this ticker.",
"type": "string"
},
- "keywords": {
- "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "published_utc": {
- "description": "The date the article was published on.",
- "format": "date-time",
+ "name": {
+ "description": "Name of ticker, forex, or crypto asset.",
"type": "string"
},
- "publisher": {
+ "options": {
"properties": {
- "favicon_url": {
- "description": "The publisher's homepage favicon URL.",
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "enum": [
+ "put",
+ "call",
+ "other"
+ ],
"type": "string"
},
- "homepage_url": {
- "description": "The publisher's homepage URL.",
+ "exercise_style": {
+ "description": "The exercise style of this contract. See this link for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
"type": "string"
},
- "logo_url": {
- "description": "The publisher's logo URL.",
- "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"
+ }
},
- "name": {
- "description": "The publisher's name.",
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "format": "double",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "format": "double",
+ "type": "number"
+ },
+ "underlying_ticker": {
+ "description": "The ticker for the option contract.",
"type": "string"
}
},
"required": [
- "name",
- "logo_url",
- "homepage_url"
+ "contract_type",
+ "expiration_date",
+ "exercise_style",
+ "shares_per_contract",
+ "strike_price",
+ "underlying_ticker"
],
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Options"
+ }
},
- "tickers": {
- "description": "The ticker symbols associated with the article.",
- "items": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "price": {
+ "description": "The most up to date ticker price.",
+ "format": "double",
+ "type": "number"
+ },
+ "session": {
+ "properties": {
+ "change": {
+ "description": "The value of the price change for the asset from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "change_percent": {
+ "description": "The percent of the price change for the asset from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The closing price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "early_trading_change": {
+ "description": "Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.",
+ "format": "double",
+ "type": "number"
+ },
+ "early_trading_change_percent": {
+ "description": "Today's early trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "high": {
+ "description": "The highest price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "late_trading_change": {
+ "description": "Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close.",
+ "format": "double",
+ "type": "number"
+ },
+ "late_trading_change_percent": {
+ "description": "Today's late trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "previous_close": {
+ "description": "The closing price of the asset for the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "price": {
+ "description": "The price of the most recent trade or bid price for this asset.",
+ "format": "double",
+ "type": "number"
+ },
+ "regular_trading_change": {
+ "description": "Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close.",
+ "format": "double",
+ "type": "number"
+ },
+ "regular_trading_change_percent": {
+ "description": "Today's regular trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "volume": {
+ "description": "The trading volume for the asset for the day.",
+ "format": "double",
+ "type": "number"
+ }
},
- "type": "array"
+ "required": [
+ "change",
+ "change_percent",
+ "close",
+ "high",
+ "low",
+ "open",
+ "previous_close"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Session"
+ }
},
- "title": {
- "description": "The title of the news article.",
+ "ticker": {
+ "description": "Ticker of asset queried.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The market for this ticker of stock, crypto, fx, option.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "options",
+ "fx"
+ ],
"type": "string"
}
},
"required": [
- "id",
- "publisher",
- "title",
- "author",
- "published_utc",
- "article_url",
- "tickers"
+ "ticker"
],
"type": "object",
- "x-polygon-go-type": {
- "name": "NewsArticleMetadata",
- "path": "github.com/polygon-io/go-lib-models/v2/globals"
+ "x-massive-go-type": {
+ "name": "SummaryResult"
}
},
- "type": "array",
- "x-polygon-go-type": {
- "name": "ListNewsArticlesResults"
- }
+ "type": "array"
},
"status": {
"description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id"
+ ],
"type": "object"
}
- },
- "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",
- "schema": {
- "type": "string"
- }
}
},
- "description": "An array of news articles."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- },
- "404": {
- "description": "The specified resource was not found"
+ "description": "Snapshot Summary for ticker list"
}
},
- "summary": "Ticker News",
- "tags": [
- "reference:news"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "summary": "Summaries",
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
},
- "x-polygon-paginate": {
- "sort": {
- "default": "published_utc",
- "enum": [
- "published_utc"
- ],
- "limit": {
- "default": 10,
- "maximum": 1000,
- "minimum": 1
- }
- }
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
}
},
- "/v2/snapshot/locale/global/markets/crypto/tickers": {
+ "/v2/aggs/grouped/locale/global/market/crypto/{date}": {
"get": {
- "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire cryptocurrency markets.\n",
"parameters": [
{
- "description": "A comma separated list of tickers to get snapshots for.",
+ "description": "The beginning date for the aggregate window.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
"in": "query",
- "name": "tickers",
+ "name": "adjusted",
"schema": {
- "items": {
- "type": "string"
- },
- "type": "array"
+ "type": "boolean"
}
}
],
@@ -15318,241 +15006,137 @@
"content": {
"application/json": {
"example": {
- "status": "OK",
- "tickers": [
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
{
- "day": {
- "c": 0.296,
- "h": 0.59714,
- "l": 0.23706,
- "o": 0.28,
- "v": 4097699.5691991993,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 1
- ],
- "i": 413131,
- "p": 0.293,
- "s": 13.6191,
- "t": 1605292686010,
- "x": 17
- },
- "min": {
- "c": 0.296,
- "h": 0.296,
- "l": 0.294,
- "o": 0.296,
- "v": 123.4866,
- "vw": 0
- },
- "prevDay": {
- "c": 0.281,
- "h": 0.59714,
- "l": 0.23706,
- "o": 0.27,
- "v": 6070178.786154971,
- "vw": 0.4076
- },
- "ticker": "X:FSNUSD",
- "todaysChange": 0.012,
- "todaysChangePerc": 4.270463,
- "updated": 1605330008999
+ "T": "X:ARDRUSD",
+ "c": 0.0550762,
+ "h": 0.0550762,
+ "l": 0.0550762,
+ "n": 18388,
+ "o": 0.0550762,
+ "t": 1580676480000,
+ "v": 2,
+ "vw": 0.0551
+ },
+ {
+ "T": "X:NGCUSD",
+ "c": 0.0272983,
+ "h": 0.0273733,
+ "l": 0.0272983,
+ "n": 18,
+ "o": 0.0273733,
+ "t": 1580674080000,
+ "v": 4734,
+ "vw": 0.0273
+ },
+ {
+ "T": "X:ZSCUSD",
+ "c": 0.00028531,
+ "h": 0.00028531,
+ "l": 0.00028531,
+ "n": 151,
+ "o": 0.00028531,
+ "t": 1580671080000,
+ "v": 390,
+ "vw": 0.0003
}
- ]
+ ],
+ "resultsCount": 3,
+ "status": "OK"
},
"schema": {
"allOf": [
{
"properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
"status": {
"description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "tickers": {
+ "results": {
"items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- }
- }
- ]
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
},
- "todaysChange": {
- "description": "The value of the change the from previous day.",
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ "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"
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
"type": "object"
},
"type": "array"
@@ -15564,55 +15148,54 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n",
+ "example": "T,c,h,l,n,o,t,v,vw\nX:ARDRUSD,0.0550762,0.0550762,0.0550762,18388,0.0550762,1580676480000,2,0.0551\nX:NGCUSD,0.0272983,0.0273733,0.0272983,18,0.0273733,1580674080000,4734,0.0273\nX:ZSCUSD,0.00028531,0.00028531,0.00028531,151,0.00028531,1580671080000,390,0.0003\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get current state for all tickers"
+ "description": "The previous day OHLC for the ticker."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "All Tickers",
+ "summary": "Grouped Daily (Bars)",
"tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "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"
}
}
},
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}": {
+ "/v2/aggs/grouped/locale/global/market/fx/{date}": {
"get": {
- "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for a single traded cryptocurrency symbol.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire forex markets.\n",
"parameters": [
{
- "description": "Ticker of the snapshot",
- "example": "X:BTCUSD",
+ "description": "The beginning date for the aggregate window.",
+ "example": "2023-01-09",
"in": "path",
- "name": "ticker",
+ "name": "date",
"required": true,
"schema": {
"type": "string"
}
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"responses": {
@@ -15620,249 +15203,140 @@
"content": {
"application/json": {
"example": {
- "request_id": "ad92e92ce183112c593717f00dfebd2c",
- "status": "OK",
- "ticker": {
- "day": {
- "c": 16260.85,
- "h": 16428.4,
- "l": 15830.4,
- "o": 16418.07,
- "v": 105008.84231068,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 2
- ],
- "i": "464569520",
- "p": 16242.31,
- "s": 0.001933,
- "t": 1605294230780,
- "x": 4
- },
- "min": {
- "c": 16235.1,
- "h": 16264.29,
- "l": 16129.3,
- "o": 16257.51,
- "v": 19.30791925,
- "vw": 0
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
+ {
+ "T": "C:ILSCHF",
+ "c": 0.2704,
+ "h": 0.2706,
+ "l": 0.2693,
+ "n": 689,
+ "o": 0.2698,
+ "t": 1602719999999,
+ "v": 689,
+ "vw": 0.2702
},
- "prevDay": {
- "c": 16399.24,
- "h": 16418.07,
- "l": 16399.24,
- "o": 16418.07,
- "v": 0.99167108,
- "vw": 16402.6893
+ {
+ "T": "C:GBPCAD",
+ "c": 1.71103,
+ "h": 1.71642,
+ "l": 1.69064,
+ "n": 407324,
+ "o": 1.69955,
+ "t": 1602719999999,
+ "v": 407324,
+ "vw": 1.7062
},
- "ticker": "X:BTCUSD",
- "todaysChange": -156.93,
- "todaysChangePerc": -0.956935,
- "updated": 1605330008999
- }
+ {
+ "T": "C:DKKAUD",
+ "c": 0.2214,
+ "h": 0.2214,
+ "l": 0.2195,
+ "n": 10639,
+ "o": 0.22,
+ "t": 1602719999999,
+ "v": 10639,
+ "vw": 0.2202
+ }
+ ],
+ "resultsCount": 3,
+ "status": "OK"
},
"schema": {
"allOf": [
{
"properties": {
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
"request_id": {
"description": "A request id assigned by the server.",
"type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "type": "object"
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- }
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
+ "type": "object"
},
- "type": "object"
+ "type": "array"
}
},
"type": "object"
@@ -15871,55 +15345,62 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n",
+ "example": "T,c,h,l,n,o,t,v,vw\nC:ILSCHF,0.2704,0.2706,0.2693,689,0.2698,1602719999999,689,0.2702\nC:GBPCAD,1.71103,1.71642,1.69064,407324,1.69955,1602719999999,407324,1.7062\nC:DKKAUD,0.2214,0.2214,0.2195,10639,0.22,1602719999999,10639,0.2202\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get current state for a ticker"
+ "description": "Previous day OHLC for ticker"
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Ticker",
+ "summary": "Grouped Daily (Bars)",
"tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "fx:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
}
}
},
- "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book": {
+ "/v2/aggs/grouped/locale/us/market/stocks/{date}": {
"get": {
- "description": "Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "description": "Get the daily open, high, low, and close (OHLC) for the entire stocks/equities markets.\n",
"parameters": [
{
- "description": "The cryptocurrency ticker.",
- "example": "X:BTCUSD",
+ "description": "The beginning date for the aggregate window.",
+ "example": "2023-01-09",
"in": "path",
- "name": "ticker",
+ "name": "date",
"required": true,
"schema": {
"type": "string"
}
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"responses": {
@@ -15927,113 +15408,144 @@
"content": {
"application/json": {
"example": {
- "data": {
- "askCount": 593.1412981600005,
- "asks": [
- {
- "p": 11454,
- "x": {
- "2": 1
- }
- },
- {
- "p": 11455,
- "x": {
- "2": 1
- }
- }
- ],
- "bidCount": 694.951789670001,
- "bids": [
- {
- "p": 16303.17,
- "x": {
- "1": 2
- }
- },
- {
- "p": 16302.94,
- "x": {
- "1": 0.02859424,
- "6": 0.023455
- }
- }
- ],
- "spread": -4849.17,
- "ticker": "X:BTCUSD",
- "updated": 1605295074162
- },
+ "adjusted": true,
+ "queryCount": 3,
+ "results": [
+ {
+ "T": "KIMpL",
+ "c": 25.9102,
+ "h": 26.25,
+ "l": 25.91,
+ "n": 74,
+ "o": 26.07,
+ "t": 1602705600000,
+ "v": 4369,
+ "vw": 26.0407
+ },
+ {
+ "T": "TANH",
+ "c": 23.4,
+ "h": 24.763,
+ "l": 22.65,
+ "n": 1096,
+ "o": 24.5,
+ "t": 1602705600000,
+ "v": 25933.6,
+ "vw": 23.493
+ },
+ {
+ "T": "VSAT",
+ "c": 34.24,
+ "h": 35.47,
+ "l": 34.21,
+ "n": 4966,
+ "o": 34.9,
+ "t": 1602705600000,
+ "v": 312583,
+ "vw": 34.4736
+ }
+ ],
+ "resultsCount": 3,
"status": "OK"
},
"schema": {
"allOf": [
{
- "description": "The status of this request's response.",
- "type": "string"
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
},
{
"properties": {
- "data": {
- "properties": {
- "askCount": {
- "description": "The combined total number of asks in the book.",
- "format": "double",
- "type": "number"
- },
- "asks": {
- "items": {
- "properties": {
- "p": {
- "description": "The price of this book level.",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "A map of the exchange ID to number of shares at this price level.\n \n \n**Example:**\n \n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n \n \nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
- "type": "object"
- }
- },
- "type": "object"
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "type": "array"
- },
- "bidCount": {
- "description": "The combined total number of bids in the book.",
- "format": "double",
- "type": "number"
- },
- "bids": {
- "items": {
- "properties": {
- "p": {
- "description": "The price of this book level.",
- "format": "double",
- "type": "number"
- },
- "x": {
- "description": "A map of the exchange ID to number of shares at this price level.\n \n \n**Example:**\n \n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n \n \nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
- "type": "object"
- }
- },
- "type": "object"
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "array"
- },
- "spread": {
- "description": "The difference between the best bid and the best ask price accross exchanges.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the end of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t",
+ "v",
+ "T"
+ ],
+ "type": "object"
},
- "type": "object"
+ "type": "array"
}
},
"type": "object"
@@ -16042,59 +15554,54 @@
}
},
"text/csv": {
- "example": "side,price,size,exchange\nbid,20292.97,0.01501,1\nbid,20291.93,0.00218483,1\nask,18445.61,0.22,1\nask,18463.07,0.00234104,1\nask,18464.83,0.04159475,1\n",
+ "example": "T,c,h,l,n,o,t,v,vw\nKIMpL,25.9102,26.25,25.91,74,26.07,1602705600000,4369,26.0407\nTANH,23.4,24.763,22.65,1096,24.5,1602705600000,25933.6,23.493\nVSAT,34.24,35.47,34.21,4966,34.9,1602705600000,312583,34.4736\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get current level 2 book for a ticker"
+ "description": "Previous day OHLC for ticker"
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Ticker Full Book (L2)",
+ "summary": "Grouped Daily (Bars)",
"tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "stocks:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
}
}
},
- "/v2/snapshot/locale/global/markets/crypto/{direction}": {
+ "/v2/aggs/ticker/{cryptoTicker}/prev": {
"get": {
- "description": "Get the current top 20 gainers or losers of the day in cryptocurrency markets.\n \n \nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified cryptocurrency pair.\n",
"parameters": [
{
- "description": "The direction of the snapshot results to return.\n",
- "example": "gainers",
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
"in": "path",
- "name": "direction",
+ "name": "cryptoTicker",
"required": true,
"schema": {
- "enum": [
- "gainers",
- "losers"
- ],
"type": "string"
}
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"responses": {
@@ -16102,236 +15609,128 @@
"content": {
"application/json": {
"example": {
- "status": "OK",
- "tickers": [
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "b2170df985474b6d21a6eeccfb6bee67",
+ "results": [
{
- "day": {
- "c": 0.0374,
- "h": 0.062377,
- "l": 0.01162,
- "o": 0.044834,
- "v": 27313165.159427017,
- "vw": 0
- },
- "lastTrade": {
- "c": [
- 2
- ],
- "i": "517478762",
- "p": 0.0374,
- "s": 499,
- "t": 1604409649544,
- "x": 2
- },
- "min": {
- "c": 0.062377,
- "h": 0.062377,
- "l": 0.062377,
- "o": 0.062377,
- "v": 35420,
- "vw": 0
- },
- "prevDay": {
- "c": 0.01162,
- "h": 0.044834,
- "l": 0.01162,
- "o": 0.044834,
- "v": 53616273.36827199,
- "vw": 0.0296
- },
- "ticker": "X:DRNUSD",
- "todaysChange": 0.02578,
- "todaysChangePerc": 221.858864,
- "updated": 1605330008999
+ "T": "X:BTCUSD",
+ "c": 16035.9,
+ "h": 16180,
+ "l": 15639.2,
+ "o": 15937.1,
+ "t": 1605416400000,
+ "v": 95045.16897951,
+ "vw": 15954.2111
}
- ]
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "X:BTCUSD"
},
"schema": {
"allOf": [
{
- "description": "The status of this request's response.",
- "type": "string"
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
},
{
"properties": {
- "tickers": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
"items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "lastTrade": {
- "allOf": [
- {
- "description": "The most recent trade for this ticker."
- },
- {
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "x": {
- "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
- "type": "integer"
- }
- }
- }
- ]
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "ticker": {
+ "T": {
"description": "The exchange symbol that this item is traded under.",
"type": "string"
},
- "todaysChange": {
- "description": "The value of the change the from previous day.",
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "updated": {
- "description": "The last updated timestamp.",
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
"type": "integer"
- }
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t",
+ "T"
+ ],
"type": "object"
},
"type": "array"
@@ -16343,55 +15742,124 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,day_c,day_h,day_l,day_o,day_v,day_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.0374,0.062377,0.01162,0.044834,27313165.159427017,0,\"[2]\",517478762,0.0374,499,1604409649544,2,0.062377,0.062377,0.062377,0.062377,35420,0,0.01162,0.044834,0.01162,0.044834,53616273.36827199,0.0296\n",
+ "example": "T,c,h,l,o,t,v,vw\nX:BTCUSD,16035.9,16180,15639.2,15937.1,1605416400000,95045.16897951,15954.2111\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get the current gainers / losers of the day"
+ "description": "The previous day OHLC for a ticker."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Gainers/Losers",
+ "summary": "Previous Close",
"tags": [
- "crypto:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "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"
}
}
},
- "/v2/snapshot/locale/global/markets/forex/tickers": {
+ "/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded forex symbols.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "description": "Get aggregate bars for a cryptocurrency pair over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
"parameters": [
{
- "description": "A comma separated list of tickers to get snapshots for.",
+ "description": "The ticker symbol of the currency pair.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-02-10",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
"in": "query",
- "name": "tickers",
+ "name": "adjusted",
"schema": {
- "items": {
- "type": "string"
- },
- "type": "array"
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
}
}
],
@@ -16400,201 +15868,133 @@
"content": {
"application/json": {
"example": {
- "status": "OK",
- "tickers": [
+ "adjusted": true,
+ "queryCount": 2,
+ "request_id": "0cf72b6da685bcd386548ffe2895904a",
+ "results": [
{
- "day": {
- "c": 0.11778221,
- "h": 0.11812263,
- "l": 0.11766631,
- "o": 0.11797149,
- "v": 77794
- },
- "lastQuote": {
- "a": 0.11780678,
- "b": 0.11777952,
- "t": 1605280919000,
- "x": 48
- },
- "min": {
- "c": 0.117769,
- "h": 0.11779633,
- "l": 0.11773698,
- "o": 0.11778,
- "v": 202
- },
- "prevDay": {
- "c": 0.11797258,
- "h": 0.11797258,
- "l": 0.11797149,
- "o": 0.11797149,
- "v": 2,
- "vw": 0
- },
- "ticker": "C:HKDCHF",
- "todaysChange": -0.00019306,
- "todaysChangePerc": -0.1636482,
- "updated": 1605280919000
+ "c": 10094.75,
+ "h": 10429.26,
+ "l": 9490,
+ "n": 1,
+ "o": 9557.9,
+ "t": 1590984000000,
+ "v": 303067.6562332156,
+ "vw": 9874.5529
+ },
+ {
+ "c": 9492.62,
+ "h": 10222.72,
+ "l": 9135.68,
+ "n": 1,
+ "o": 10096.87,
+ "t": 1591070400000,
+ "v": 323339.6922892879,
+ "vw": 9729.5701
}
- ]
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "X:BTCUSD"
},
"schema": {
"allOf": [
{
"properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
"status": {
"description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "tickers": {
+ "results": {
"items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
},
- "todaysChange": {
- "description": "The value of the change the from previous day.",
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ "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"
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -16606,55 +16006,54 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n",
+ "example": "c,h,l,n,o,t,v,vw\n10094.75,10429.26,9490,1,9557.9,1590984000000,303067.6562332156,9874.5529\n9492.62,10222.72,9135.68,1,10096.87,1591070400000,323339.6922892879,9729.5701\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get current state for all tickers"
+ "description": "Cryptocurrency Aggregates."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "All Tickers",
+ "summary": "Aggregates (Bars)",
"tags": [
- "fx:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "crypto:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
}
}
},
- "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}": {
+ "/v2/aggs/ticker/{forexTicker}/prev": {
"get": {
- "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for a single traded currency symbol.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified forex pair.\n",
"parameters": [
{
- "description": "The forex ticker.",
+ "description": "The ticker symbol of the currency pair.",
"example": "C:EURUSD",
"in": "path",
- "name": "ticker",
+ "name": "forexTicker",
"required": true,
"schema": {
"type": "string"
}
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
}
],
"responses": {
@@ -16662,210 +16061,132 @@
"content": {
"application/json": {
"example": {
- "request_id": "ad76e76ce183002c5937a7f02dfebde4",
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "08ec061fb85115678d68452c0a609cb7",
+ "results": [
+ {
+ "T": "C:EURUSD",
+ "c": 1.06206,
+ "h": 1.0631,
+ "l": 1.0505,
+ "n": 180300,
+ "o": 1.05252,
+ "t": 1651708799999,
+ "v": 180300,
+ "vw": 1.055
+ }
+ ],
+ "resultsCount": 1,
"status": "OK",
- "ticker": {
- "day": {
- "c": 1.18403,
- "h": 1.1906,
- "l": 1.18001,
- "o": 1.18725,
- "v": 83578
- },
- "lastQuote": {
- "a": 1.18403,
- "b": 1.18398,
- "i": 0,
- "t": 1606163759000,
- "x": 48
- },
- "min": {
- "c": 1.18396,
- "h": 1.18423,
- "l": 1.1838,
- "o": 1.18404,
- "v": 41
- },
- "prevDay": {
- "c": 1.18724,
- "h": 1.18727,
- "l": 1.18725,
- "o": 1.18725,
- "v": 5,
- "vw": 0
- },
- "ticker": "C:EURUSD",
- "todaysChange": -0.00316,
- "todaysChangePerc": -0.27458312,
- "updated": 1606163759000
- }
+ "ticker": "C:EURUSD"
},
"schema": {
"allOf": [
{
"properties": {
- "status": {
- "description": "The status of this request's response.",
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
"type": "string"
}
},
+ "required": [
+ "ticker"
+ ],
"type": "object"
},
{
"properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
"request_id": {
"description": "A request id assigned by the server.",
"type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
+ "results": {
+ "items": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
},
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
- }
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
+ "required": [
+ "T",
+ "v",
+ "o",
+ "c",
+ "h",
+ "l",
+ "t"
+ ],
+ "type": "object"
},
- "type": "object"
+ "type": "array"
}
},
"type": "object"
@@ -16874,261 +16195,249 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n",
+ "example": "T,c,h,l,n,o,t,v,vw\nC:EURUSD,1.06206,1.0631,1.0505,180300,1.05252,1651708799999,180300,1.055\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get current state for a ticker"
+ "description": "The previous day OHLC for the ticker."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Ticker",
+ "summary": "Previous Close",
"tags": [
- "fx:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "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"
}
}
},
- "/v2/snapshot/locale/global/markets/forex/{direction}": {
+ "/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "description": "Get the current top 20 gainers or losers of the day in forex markets.\n \n \nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "description": "Get aggregate bars for a forex pair over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
"parameters": [
{
- "description": "The direction of the snapshot results to return.\n",
- "example": "gainers",
+ "description": "The ticker symbol of the currency pair.",
+ "example": "C:EURUSD",
"in": "path",
- "name": "direction",
+ "name": "forexTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
"required": true,
"schema": {
"enum": [
- "gainers",
- "losers"
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
],
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 0.886156,
- "h": 0.887111,
- "l": 0.8825327,
- "o": 0.8844732,
- "v": 1041
- },
- "lastQuote": {
- "a": 0.8879606,
- "b": 0.886156,
- "t": 1605283204000,
- "x": 48
- },
- "min": {
- "c": 0.886156,
- "h": 0.886156,
- "l": 0.886156,
- "o": 0.886156,
- "v": 1
- },
- "prevDay": {
- "c": 0.8428527,
- "h": 0.889773,
- "l": 0.8428527,
- "o": 0.8848539,
- "v": 1078,
- "vw": 0
- },
- "ticker": "C:PLNILS",
- "todaysChange": 0.0433033,
- "todaysChangePerc": 5.13770674,
- "updated": 1605330008999
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-02-10",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "79c061995d8b627b736170bc9653f15d",
+ "results": [
+ {
+ "c": 1.17721,
+ "h": 1.18305,
+ "l": 1.1756,
+ "n": 125329,
+ "o": 1.17921,
+ "t": 1626912000000,
+ "v": 125329,
+ "vw": 1.1789
}
- ]
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "C:EURUSD"
},
"schema": {
"allOf": [
{
"properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
"status": {
"description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "tickers": {
+ "results": {
"items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker.",
- "properties": {
- "a": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "b": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID on which this quote happened.",
- "type": "integer"
- }
- },
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "todaysChange": {
- "description": "The value of the change the from previous day.",
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ "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"
},
- "updated": {
- "description": "The last updated timestamp.",
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
"type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -17140,65 +16449,44 @@
}
},
"text/csv": {
- "example": {
- "tickers": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.886156,0.887111,0.8825327,0.8844732,1041,0.8879606,0.886156,1605283204000,48,0.886156,0.886156,0.886156,0.886156,1,0.8428527,0.889773,0.8428527,0.8848539,1078,0\n"
- },
+ "example": "c,h,l,n,o,t,v,vw\n1.17721,1.18305,1.1756,125329,1.17921,1626912000000,125329,1.1789\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get the current gainers / losers of the day"
+ "description": "Forex Aggregates."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Gainers/Losers",
+ "summary": "Aggregates (Bars)",
"tags": [
- "fx:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "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"
}
}
},
- "/v2/snapshot/locale/us/markets/stocks/tickers": {
+ "/v2/aggs/ticker/{indicesTicker}/prev": {
"get": {
- "description": "Get the most up-to-date market data for all traded stock symbols.\n \n \nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified index.\n",
"parameters": [
{
- "description": "A comma separated list of tickers to get snapshots for.",
- "in": "query",
- "name": "tickers",
- "schema": {
- "items": {
- "type": "string"
- },
- "type": "array"
- }
- },
- {
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
- "in": "query",
- "name": "include_otc",
+ "description": "The ticker symbol of Index.",
+ "example": "I:NDX",
+ "in": "path",
+ "name": "indicesTicker",
+ "required": true,
"schema": {
- "type": "boolean"
+ "type": "string"
}
}
],
@@ -17207,65 +16495,47 @@
"content": {
"application/json": {
"example": {
- "count": 1,
- "status": "OK",
- "tickers": [
+ "queryCount": 1,
+ "request_id": "b2170df985474b6d21a6eeccfb6bee67",
+ "results": [
{
- "day": {
- "c": 20.506,
- "h": 20.64,
- "l": 20.506,
- "o": 20.64,
- "v": 37216,
- "vw": 20.616
- },
- "lastQuote": {
- "P": 20.6,
- "S": 22,
- "p": 20.5,
- "s": 13,
- "t": 1605192959994246100
- },
- "lastTrade": {
- "c": [
- 14,
- 41
- ],
- "i": "71675577320245",
- "p": 20.506,
- "s": 2416,
- "t": 1605192894630916600,
- "x": 4
- },
- "min": {
- "av": 37216,
- "c": 20.506,
- "h": 20.506,
- "l": 20.506,
- "o": 20.506,
- "v": 5000,
- "vw": 20.5105
- },
- "prevDay": {
- "c": 20.63,
- "h": 21,
- "l": 20.5,
- "o": 20.79,
- "v": 292738,
- "vw": 20.6939
- },
- "ticker": "BCAT",
- "todaysChange": -0.124,
- "todaysChangePerc": -0.601,
- "updated": 1605192894630916600
+ "T": "I:NDX",
+ "c": 15070.14948566977,
+ "h": 15127.4195807999,
+ "l": 14946.7243781848,
+ "o": 15036.48391066877,
+ "t": 1687291200000
}
- ]
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "I:NDX"
},
"schema": {
"allOf": [
{
"properties": {
- "count": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
"description": "The total number of results for this request.",
"type": "integer"
},
@@ -17274,218 +16544,51 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "tickers": {
+ "results": {
"items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
- },
- "type": "object"
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "type": "object"
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "updated": {
- "description": "The last updated timestamp.",
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
"type": "integer"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -17497,55 +16600,117 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n",
+ "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": "Get current state for all tickers"
+ "description": "The previous day OHLC for a index."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "All Tickers",
+ "summary": "Previous Close",
"tags": [
- "stocks:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "indices:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-allowed-limited-tickers": true,
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
}
},
- "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}": {
+ "/v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "description": "Get the most up-to-date market data for a single traded stock ticker.\n \n \nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "description": "Get aggregate bars for an index over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
"parameters": [
{
- "description": "The ticker symbol of the stock/equity.",
- "example": "AAPL",
+ "description": "The ticker symbol of Index.",
+ "example": "I:NDX",
"in": "path",
- "name": "stocksTicker",
+ "name": "indicesTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-13",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-03-24",
+ "in": "path",
+ "name": "to",
"required": true,
"schema": {
"type": "string"
}
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
}
],
"responses": {
@@ -17553,288 +16718,109 @@
"content": {
"application/json": {
"example": {
- "request_id": "657e430f1ae768891f018e08e03598d8",
- "status": "OK",
- "ticker": {
- "day": {
- "c": 120.4229,
- "h": 120.53,
- "l": 118.81,
- "o": 119.62,
- "v": 28727868,
- "vw": 119.725
- },
- "lastQuote": {
- "P": 120.47,
- "S": 4,
- "p": 120.46,
- "s": 8,
- "t": 1605195918507251700
- },
- "lastTrade": {
- "c": [
- 14,
- 41
- ],
- "i": "4046",
- "p": 120.47,
- "s": 236,
- "t": 1605195918306274000,
- "x": 10
- },
- "min": {
- "av": 28724441,
- "c": 120.4201,
- "h": 120.468,
- "l": 120.37,
- "o": 120.435,
- "v": 270796,
- "vw": 120.4129
- },
- "prevDay": {
- "c": 119.49,
- "h": 119.63,
- "l": 116.44,
- "o": 117.19,
- "v": 110597265,
- "vw": 118.4998
+ "count": 2,
+ "queryCount": 2,
+ "request_id": "0cf72b6da685bcd386548ffe2895904a",
+ "results": [
+ {
+ "c": 11995.88235998666,
+ "h": 12340.44936267155,
+ "l": 11970.34221717375,
+ "o": 12230.83658266843,
+ "t": 1678341600000
},
- "ticker": "AAPL",
- "todaysChange": 0.98,
- "todaysChangePerc": 0.82,
- "updated": 1605195918306274000
- }
+ {
+ "c": 11830.28178808306,
+ "h": 12069.62262033557,
+ "l": 11789.85923449393,
+ "o": 12001.69552583921,
+ "t": 1678428000000
+ }
+ ],
+ "status": "OK",
+ "ticker": "I:NDX"
},
"schema": {
"allOf": [
{
"properties": {
- "status": {
- "description": "The status of this request's response.",
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
"type": "string"
}
},
+ "required": [
+ "ticker"
+ ],
"type": "object"
},
{
"properties": {
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
"request_id": {
"description": "A request id assigned by the server.",
"type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
},
+ "required": [
+ "status",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "ticker": {
- "properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
- },
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
+ "h": {
+ "description": "The highest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "l": {
+ "description": "The lowest value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
+ "o": {
+ "description": "The open value for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "type": "object"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "todaysChange": {
- "description": "The value of the change the from previous day.",
- "format": "double",
- "type": "number"
- },
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
- "format": "double",
- "type": "number"
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ }
},
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
- }
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "t"
+ ],
+ "type": "object"
},
- "type": "object"
+ "type": "array"
}
},
"type": "object"
@@ -17843,64 +16829,52 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n",
+ "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": "Get current state for a ticker"
+ "description": "Index Aggregates."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Ticker",
+ "summary": "Aggregates (Bars)",
"tags": [
- "stocks:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "indices:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-allowed-limited-tickers": true,
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
}
}
},
- "/v2/snapshot/locale/us/markets/stocks/{direction}": {
+ "/v2/aggs/ticker/{optionsTicker}/prev": {
"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 previous day's open, high, low, and close (OHLC) for the specified option contract.\n",
"parameters": [
{
- "description": "The direction of the snapshot results to return.\n",
- "example": "gainers",
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:SPY251219C00650000",
"in": "path",
- "name": "direction",
+ "name": "optionsTicker",
"required": true,
"schema": {
- "enum": [
- "gainers",
- "losers"
- ],
"type": "string"
}
},
{
- "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
"in": "query",
- "name": "include_otc",
+ "name": "adjusted",
"schema": {
"type": "boolean"
}
@@ -17911,279 +16885,124 @@
"content": {
"application/json": {
"example": {
- "status": "OK",
- "tickers": [
- {
- "day": {
- "c": 14.2284,
- "h": 15.09,
- "l": 14.2,
- "o": 14.33,
- "v": 133963,
- "vw": 14.5311
- },
- "lastQuote": {
- "P": 14.44,
- "S": 11,
- "p": 14.2,
- "s": 25,
- "t": 1605195929997325600
- },
- "lastTrade": {
- "c": [
- 63
- ],
- "i": "79372124707124",
- "p": 14.2284,
- "s": 536,
- "t": 1605195848258266000,
- "x": 4
- },
- "min": {
- "av": 133963,
- "c": 14.2284,
- "h": 14.325,
- "l": 14.2,
- "o": 14.28,
- "v": 6108,
- "vw": 14.2426
- },
- "prevDay": {
- "c": 0.73,
- "h": 0.799,
- "l": 0.73,
- "o": 0.75,
- "v": 1568097,
- "vw": 0.7721
- },
- "ticker": "PDS",
- "todaysChange": 13.498,
- "todaysChangePerc": 1849.096,
- "updated": 1605195848258266000
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "T": "O:TSLA210903C00700000",
+ "c": 115.97,
+ "h": 117.59,
+ "l": 114.13,
+ "n": 2,
+ "o": 115.55,
+ "t": 1605042000000,
+ "v": 131704427,
+ "vw": 116.3058
}
- ]
+ ],
+ "resultsCount": 1,
+ "status": "OK",
+ "ticker": "O:TSLA210903C00700000"
},
"schema": {
"allOf": [
{
"properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
"status": {
"description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
- "tickers": {
+ "results": {
"items": {
"properties": {
- "day": {
- "description": "The most recent daily bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "lastQuote": {
- "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size in lots.",
- "type": "integer"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size in lots.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- }
- },
- "type": "object"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "lastTrade": {
- "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
- "properties": {
- "c": {
- "description": "The trade conditions.",
- "items": {
- "type": "string"
- },
- "type": "array"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The size (volume) of the trade.",
- "type": "integer"
- },
- "t": {
- "description": "The Unix Msec timestamp for the start of the aggregate window.",
- "type": "integer"
- },
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- }
- },
- "type": "object"
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "min": {
- "description": "The most recent minute bar for this ticker.",
- "properties": {
- "av": {
- "description": "The accumulated volume.",
- "type": "integer"
- },
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
},
- "prevDay": {
- "description": "The previous day's bar for this ticker.",
- "properties": {
- "c": {
- "description": "The close price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "h": {
- "description": "The highest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "l": {
- "description": "The lowest price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "o": {
- "description": "The open price for the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "otc": {
- "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
- "type": "boolean"
- },
- "v": {
- "description": "The trading volume of the symbol in the given time period.",
- "format": "double",
- "type": "number"
- },
- "vw": {
- "description": "The volume weighted average price.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object"
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
},
- "todaysChange": {
- "description": "The value of the change the from previous day.",
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
"format": "double",
"type": "number"
},
- "todaysChangePerc": {
- "description": "The percentage change since the previous day.",
+ "vw": {
+ "description": "The volume weighted average price.",
"format": "double",
"type": "number"
- },
- "updated": {
- "description": "The last updated timestamp.",
- "type": "integer"
}
},
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
"type": "object"
},
"type": "array"
@@ -18195,95 +17014,120 @@
}
},
"text/csv": {
- "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastQuote_P,lastQuote_S,lastQuote_p,lastQuote_s,lastQuote_t,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_av,min_c,min_h,min_l,min_o,min_v,min_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n14.2284,15.09,14.2,14.33,133963,14.5311,14.44,11,14.2,25,1605195929997325568,\"[63]\",79372124707124,14.2284,536,1605195848258266112,4,133963,14.2284,14.325,14.2,14.28,6108,14.2426,0.73,0.799,0.73,0.75,1568097,0.7721\n",
+ "example": "T,c,h,l,n,o,t,v,vw\nO:TSLA210903C00700000,115.97,117.59,114.13,2,115.55,1605042000000,131704427.0,116.3058\n",
"schema": {
"type": "string"
}
}
},
- "description": "Get the current tickers of the day"
+ "description": "The previous day OHLC for the options contract."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Gainers/Losers",
+ "summary": "Previous Close",
"tags": [
- "stocks:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "options:aggregates"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Aggregate data",
"name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
}
},
- "/v2/ticks/stocks/nbbo/{ticker}/{date}": {
+ "/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
"get": {
- "description": "Get NBBO quotes for a given ticker symbol on a specified date.\n",
+ "description": "Get aggregate bars for an option contract over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
"parameters": [
{
- "description": "The ticker symbol we want quotes for.",
- "example": "AAPL",
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:SPY251219C00650000",
"in": "path",
- "name": "ticker",
+ "name": "optionsTicker",
"required": true,
"schema": {
"type": "string"
}
},
{
- "description": "The date/day of the quotes to retrieve in the format YYYY-MM-DD.",
- "example": "2020-10-14",
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
"in": "path",
- "name": "date",
+ "name": "multiplier",
"required": true,
"schema": {
- "format": "date",
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
"type": "string"
}
},
{
- "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
- "in": "query",
- "name": "timestamp",
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
},
{
- "description": "The maximum timestamp allowed in the results.\n",
- "in": "query",
- "name": "timestampLimit",
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-02-10",
+ "in": "path",
+ "name": "to",
+ "required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
},
{
- "description": "Reverse the order of the results.\n",
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
"example": true,
"in": "query",
- "name": "reverse",
+ "name": "adjusted",
"schema": {
"type": "boolean"
}
},
{
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "example": 10,
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
"in": "query",
"name": "limit",
"schema": {
@@ -18296,217 +17140,135 @@
"content": {
"application/json": {
"example": {
- "db_latency": 43,
- "map": {
- "P": {
- "name": "ask_price",
- "type": "float64"
- },
- "S": {
- "name": "ask_size",
- "type": "int"
- },
- "X": {
- "name": "ask_exchange",
- "type": "int"
- },
- "c": {
- "name": "conditions",
- "type": "int"
- },
- "f": {
- "name": "trf_timestamp",
- "type": "int64"
- },
- "i": {
- "name": "indicators",
- "type": "int"
- },
- "p": {
- "name": "bid_price",
- "type": "float64"
- },
- "q": {
- "name": "sequence_number",
- "type": "int"
- },
- "s": {
- "name": "bid_size",
- "type": "int"
- },
- "t": {
- "name": "sip_timestamp",
- "type": "int64"
- },
- "x": {
- "name": "bid_exchange",
- "type": "int"
- },
- "y": {
- "name": "participant_timestamp",
- "type": "int64"
- },
- "z": {
- "name": "tape",
- "type": "int"
- }
- },
+ "adjusted": true,
+ "count": 2,
+ "queryCount": 2,
+ "request_id": "5585acde-5085-42d6-95b2-2e388a28370a",
"results": [
{
- "P": 0,
- "S": 0,
- "X": 0,
- "c": [
- 1
- ],
- "p": 102.7,
- "q": 2060,
- "s": 60,
- "t": 1517562000065700400,
- "x": 11,
- "y": 1517562000065321200,
- "z": 3
+ "c": 26.2,
+ "h": 26.2,
+ "l": 26.2,
+ "n": 1,
+ "o": 26.2,
+ "t": 1632369600000,
+ "v": 2,
+ "vw": 26.2
},
{
- "P": 0,
- "S": 0,
- "X": 0,
- "c": [
- 1
- ],
- "p": 170,
- "q": 2061,
- "s": 2,
- "t": 1517562000065791500,
- "x": 11,
- "y": 1517562000065408300,
- "z": 3
+ "c": 28.3,
+ "h": 28.3,
+ "l": 28.3,
+ "n": 1,
+ "o": 28.3,
+ "t": 1632456000000,
+ "v": 2,
+ "vw": 28.3
}
],
- "results_count": 2,
- "success": true,
- "ticker": "AAPL"
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "O:RDFN211119C00025000"
},
"schema": {
"allOf": [
{
"properties": {
- "db_latency": {
- "description": "Latency in milliseconds for the query results from the database.",
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
"type": "integer"
},
- "results_count": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
"description": "The total number of results for this request.",
"type": "integer"
},
- "success": {
- "description": "Whether or not this query was executed successfully.",
- "type": "boolean"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
+ "status": {
+ "description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
"results": {
"items": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "type": "object"
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "P": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "S": {
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
- "type": "integer"
- },
- "X": {
- "allOf": [
- {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Ask Exchange Id"
- }
- ]
- },
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "i": {
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
- "items": {
- "description": "The indicator code.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "p": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "s": {
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
- "type": "integer"
- },
- "x": {
- "allOf": [
- {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
- },
- {
- "description": "Bid Exchange Id"
- }
- ]
- },
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
- }
- },
- "type": "object"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
}
- ]
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
},
"type": "array"
}
@@ -18515,93 +17277,56 @@
}
]
}
+ },
+ "text/csv": {
+ "example": "c,h,l,n,o,t,v,vw\n26.2,26.2,26.2,1,26.2,1632369600000,2,26.2\n28.3,28.3,28.3,1,28.3,1632456000000,2,28.3\n",
+ "schema": {
+ "type": "string"
+ }
}
},
- "description": "A list of quotes."
+ "description": "Options Aggregates."
},
"default": {
"description": "Unexpected error"
}
},
- "summary": "Quotes (NBBO)",
+ "summary": "Aggregates (Bars)",
"tags": [
- "stocks:quotes"
+ "options:aggregates"
],
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "name": "Quotes (NBBO) v3",
- "path": "get_v3_quotes__stockticker"
- }
- },
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
}
}
},
- "/v2/ticks/stocks/trades/{ticker}/{date}": {
+ "/v2/aggs/ticker/{stocksTicker}/prev": {
"get": {
- "description": "Get trades for a given ticker symbol on a specified date.\n",
+ "description": "Get the previous day's open, high, low, and close (OHLC) for the specified stock ticker.\n",
"parameters": [
{
- "description": "The ticker symbol we want trades for.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"example": "AAPL",
"in": "path",
- "name": "ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "The date/day of the trades to retrieve in the format YYYY-MM-DD.",
- "example": "2020-10-14",
- "in": "path",
- "name": "date",
+ "name": "stocksTicker",
"required": true,
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
- "in": "query",
- "name": "timestamp",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "The maximum timestamp allowed in the results.\n",
- "in": "query",
- "name": "timestampLimit",
- "schema": {
- "type": "integer"
- }
- },
- {
- "description": "Reverse the order of the results.\n",
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
"example": true,
"in": "query",
- "name": "reverse",
+ "name": "adjusted",
"schema": {
"type": "boolean"
}
- },
- {
- "description": "Limit the size of the response, max 50000 and default 5000.",
- "example": 10,
- "in": "query",
- "name": "limit",
- "schema": {
- "type": "integer"
- }
}
],
"responses": {
@@ -18609,1036 +17334,7326 @@
"content": {
"application/json": {
"example": {
- "db_latency": 11,
- "map": {
- "I": {
- "name": "orig_id",
- "type": "string"
- },
- "c": {
- "name": "conditions",
- "type": "int"
- },
- "e": {
- "name": "correction",
- "type": "int"
- },
- "f": {
- "name": "trf_timestamp",
- "type": "int64"
- },
- "i": {
- "name": "id",
- "type": "string"
- },
- "p": {
- "name": "price",
- "type": "float64"
- },
- "q": {
- "name": "sequence_number",
- "type": "int64"
- },
- "r": {
- "name": "trf_id",
- "type": "int"
- },
- "s": {
- "name": "size",
- "type": "int"
- },
- "t": {
- "name": "sip_timestamp",
- "type": "int64"
- },
- "x": {
- "name": "exchange",
- "type": "int"
- },
- "y": {
- "name": "participant_timestamp",
- "type": "int64"
- },
- "z": {
- "name": "tape",
- "type": "int"
- }
- },
+ "adjusted": true,
+ "queryCount": 1,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
"results": [
{
- "c": [
- 12,
- 41
- ],
- "i": "1",
- "p": 171.55,
- "q": 1063,
- "s": 100,
- "t": 1517562000016036600,
- "x": 11,
- "y": 1517562000015577000,
- "z": 3
- },
- {
- "c": [
- 12,
- 41
- ],
- "i": "2",
- "p": 171.55,
- "q": 1064,
- "s": 100,
- "t": 1517562000016038100,
- "x": 11,
- "y": 1517562000015577600,
- "z": 3
+ "T": "AAPL",
+ "c": 115.97,
+ "h": 117.59,
+ "l": 114.13,
+ "o": 115.55,
+ "t": 1605042000000,
+ "v": 131704427,
+ "vw": 116.3058
}
],
- "results_count": 2,
- "success": true,
+ "resultsCount": 1,
+ "status": "OK",
"ticker": "AAPL"
},
"schema": {
"allOf": [
{
"properties": {
- "db_latency": {
- "description": "Latency in milliseconds for the query results from the database.",
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
"type": "integer"
},
- "results_count": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
"description": "The total number of results for this request.",
"type": "integer"
},
- "success": {
- "description": "Whether or not this query was executed successfully.",
- "type": "boolean"
- },
- "ticker": {
- "description": "The exchange symbol that this item is traded under.",
+ "status": {
+ "description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
"type": "object"
},
{
"properties": {
"results": {
"items": {
- "allOf": [
- {
- "properties": {
- "T": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "f": {
- "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
- "type": "integer"
- },
- "q": {
- "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
- "format": "int64",
- "type": "integer"
- },
- "t": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
- "type": "integer"
- },
- "y": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "type": "integer"
- }
- },
- "type": "object"
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
},
- {
- "properties": {
- "c": {
- "description": "A list of condition codes.\n",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
- "type": "integer"
- },
- "type": "array"
- },
- "e": {
- "description": "The trade correction indicator.\n",
- "type": "integer"
- },
- "i": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
- "type": "string"
- },
- "p": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
- "format": "double",
- "type": "number"
- },
- "r": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
- "type": "integer"
- },
- "s": {
- "description": "The size of a trade (also known as volume).\n",
- "format": "double",
- "type": "number"
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "T,c,h,l,o,t,v,vw\nAAPL,115.97,117.59,114.13,115.55,1605042000000,131704427.0,116.3058\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The previous day OHLC for the ticker."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Previous Close",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}": {
+ "get": {
+ "description": "Get aggregate bars for a stock over a given date range in custom time window sizes.\n \n \nFor example, if timespan = \u2018minute\u2019 and multiplier = \u20185\u2019 then 5-minute bars will be returned.\n",
+ "parameters": [
+ {
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The size of the timespan multiplier.",
+ "example": 1,
+ "in": "path",
+ "name": "multiplier",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The size of the time window.",
+ "example": "day",
+ "in": "path",
+ "name": "timespan",
+ "required": true,
+ "schema": {
+ "enum": [
+ "second",
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "quarter",
+ "year"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-01-09",
+ "in": "path",
+ "name": "from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.",
+ "example": "2023-02-10",
+ "in": "path",
+ "name": "to",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Whether or not the results are adjusted for splits. By default, results are adjusted.\nSet this to false to get results that are NOT adjusted for splits.\n",
+ "example": true,
+ "in": "query",
+ "name": "adjusted",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Sort the results by timestamp.\n`asc` will return results in ascending order (oldest at the top),\n`desc` will return results in descending order (newest at the top).\n",
+ "example": "asc",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ]
+ }
+ },
+ {
+ "description": "Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000.\nRead more about how limit is used to calculate aggregate results in our article on\nAggregate Data API Improvements.\n",
+ "example": 120,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "adjusted": true,
+ "next_url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/1578114000000/2020-01-10?cursor=bGltaXQ9MiZzb3J0PWFzYw",
+ "queryCount": 2,
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "c": 75.0875,
+ "h": 75.15,
+ "l": 73.7975,
+ "n": 1,
+ "o": 74.06,
+ "t": 1577941200000,
+ "v": 135647456,
+ "vw": 74.6099
+ },
+ {
+ "c": 74.3575,
+ "h": 75.145,
+ "l": 74.125,
+ "n": 1,
+ "o": 74.2875,
+ "t": 1578027600000,
+ "v": 146535512,
+ "vw": 74.7026
+ }
+ ],
+ "resultsCount": 2,
+ "status": "OK",
+ "ticker": "AAPL"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "adjusted": {
+ "description": "Whether or not this response was adjusted for splits.",
+ "type": "boolean"
+ },
+ "queryCount": {
+ "description": "The number of aggregates (minute or day) used to generate the response.",
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "resultsCount": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "adjusted",
+ "queryCount",
+ "resultsCount",
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "t"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "c,h,l,n,o,t,v,vw\n75.0875,75.15,73.7975,1,74.06,1577941200000,135647456.0,74.6099\n74.3575,75.145,74.125,1,74.2875,1578027600000,146535512.0,74.7026\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Stock Aggregates."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Aggregates (Bars)",
+ "tags": [
+ "stocks:aggregates"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/last/nbbo/{stocksTicker}": {
+ "get": {
+ "description": "Get the most recent NBBO (Quote) tick for a given stock.",
+ "operationId": "LastQuote",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-go-id": "Ticker"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "b84e24636301f19f88e0dfbf9a45ed5c",
+ "results": {
+ "P": 127.98,
+ "S": 7,
+ "T": "AAPL",
+ "X": 19,
+ "p": 127.96,
+ "q": 83480742,
+ "s": 1,
+ "t": 1617827221349730300,
+ "x": 11,
+ "y": 1617827221349366000,
+ "z": 3
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "type": "integer"
+ },
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "X": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "A list of indicator codes.",
+ "items": {
+ "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "LastQuoteResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "P,S,T,X,p,q,s,t,x,y,z\n127.98,7,AAPL,19,127.96,83480742,1,1617827221349730300,11,1617827221349366000,3\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last NBBO tick for this stock."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ }
+ },
+ "summary": "Last Quote",
+ "tags": [
+ "stocks:last:quote"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/last/trade/{optionsTicker}": {
+ "get": {
+ "description": "Get the most recent trade for a given options contract.",
+ "operationId": "LastTradeOptions",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the options contract.",
+ "example": "O:TSLA210903C00700000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "f05562305bd26ced64b98ed68b3c5d96",
+ "results": {
+ "T": "O:TSLA210903C00700000",
+ "c": [
+ 227
+ ],
+ "f": 1617901342969796400,
+ "i": "",
+ "p": 115.55,
+ "q": 1325541950,
+ "r": 202,
+ "s": 25,
+ "t": 1617901342969834000,
+ "x": 312,
+ "y": 1617901342969834000
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "e": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q",
+ "i",
+ "p",
+ "x"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "LastTradeResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "T,c,f,i,p,q,r,s,t,x\nO:TSLA210903C00700000,227,1617901342969796400,,115.55,1325541950,202,25,1617901342969834000,312\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last trade for this options contract."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ }
+ },
+ "summary": "Last Trade",
+ "tags": [
+ "options:last:trade"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ },
+ "x-massive-ignore": true
+ },
+ "/v2/last/trade/{stocksTicker}": {
+ "get": {
+ "description": "Get the most recent trade for a given stock.",
+ "operationId": "LastTrade",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the stock/equity.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-go-id": "Ticker"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "f05562305bd26ced64b98ed68b3c5d96",
+ "results": {
+ "T": "AAPL",
+ "c": [
+ 37
+ ],
+ "f": 1617901342969796400,
+ "i": "118749",
+ "p": 129.8473,
+ "q": 3135876,
+ "r": 202,
+ "s": 25,
+ "t": 1617901342969834000,
+ "x": 4,
+ "y": 1617901342968000000,
+ "z": 3
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "c": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "e": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "q",
+ "i",
+ "p",
+ "x"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "LastTradeResult"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "T,c,f,i,p,q,r,s,t,x,y,z\nAAPL,37,1617901342969796400,118749,129.8473,3135876,202,25,1617901342969834000,4,1617901342968000000,3\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "The last trade for this stock."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ }
+ },
+ "summary": "Last Trade",
+ "tags": [
+ "stocks:last:trade"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/reference/news": {
+ "get": {
+ "description": "Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source.",
+ "operationId": "ListNews",
+ "parameters": [
+ {
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Return results published on, before, or after this date.",
+ "in": "query",
+ "name": "published_utc",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lte",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.gte",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.gt",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.lte",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Search by published_utc.",
+ "in": "query",
+ "name": "published_utc.lt",
+ "schema": {
+ "oneOf": [
+ {
+ "format": "date-time",
+ "type": "string"
+ },
+ {
+ "format": "date",
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "published_utc",
+ "enum": [
+ "published_utc"
+ ],
+ "example": "published_utc",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 1,
+ "next_url": "https://api.massive.com:443/v2/reference/news?cursor=eyJsaW1pdCI6MSwic29ydCI6InB1Ymxpc2hlZF91dGMiLCJvcmRlciI6ImFzY2VuZGluZyIsInRpY2tlciI6e30sInB1Ymxpc2hlZF91dGMiOnsiZ3RlIjoiMjAyMS0wNC0yNiJ9LCJzZWFyY2hfYWZ0ZXIiOlsxNjE5NDA0Mzk3MDAwLG51bGxdfQ",
+ "request_id": "831afdb0b8078549fed053476984947a",
+ "results": [
+ {
+ "amp_url": "https://m.uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968?ampMode=1",
+ "article_url": "https://uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968",
+ "author": "Sam Boughedda",
+ "description": "UBS analysts warn that markets are underestimating the extent of future interest rate cuts by the Federal Reserve, as the weakening economy is likely to justify more cuts than currently anticipated.",
+ "id": "8ec638777ca03b553ae516761c2a22ba2fdd2f37befae3ab6fdab74e9e5193eb",
+ "image_url": "https://i-invdn-com.investing.com/news/LYNXNPEC4I0AL_L.jpg",
+ "insights": [
+ {
+ "sentiment": "positive",
+ "sentiment_reasoning": "UBS analysts are providing a bullish outlook on the extent of future Federal Reserve rate cuts, suggesting that markets are underestimating the number of cuts that will occur.",
+ "ticker": "UBS"
+ }
+ ],
+ "keywords": [
+ "Federal Reserve",
+ "interest rates",
+ "economic data"
+ ],
+ "published_utc": "2024-06-24T18:33:53Z",
+ "publisher": {
+ "favicon_url": "https://s3.massive.com/public/assets/news/favicons/investing.ico",
+ "homepage_url": "https://www.investing.com/",
+ "logo_url": "https://s3.massive.com/public/assets/news/logos/investing.png",
+ "name": "Investing.com"
+ },
+ "tickers": [
+ "UBS"
+ ],
+ "title": "Markets are underestimating Fed cuts: UBS By Investing.com - Investing.com UK"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "amp_url": {
+ "description": "The mobile friendly Accelerated Mobile Page (AMP) URL.",
+ "type": "string"
+ },
+ "article_url": {
+ "description": "A link to the news article.",
+ "type": "string"
+ },
+ "author": {
+ "description": "The article's author.",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the article.",
+ "type": "string"
+ },
+ "id": {
+ "description": "Unique identifier for the article.",
+ "type": "string"
+ },
+ "image_url": {
+ "description": "The article's image URL.",
+ "type": "string"
+ },
+ "insights": {
+ "description": "The insights related to the article.",
+ "items": {
+ "properties": {
+ "sentiment": {
+ "description": "The sentiment of the insight.",
+ "enum": [
+ "positive",
+ "neutral",
+ "negative"
+ ],
+ "type": "string"
+ },
+ "sentiment_reasoning": {
+ "description": "The reasoning behind the sentiment.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The ticker symbol associated with the insight.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "sentiment",
+ "sentiment_reasoning"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "keywords": {
+ "description": "The keywords associated with the article (which will vary depending on\nthe publishing source).",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "published_utc": {
+ "description": "The date the article was published on.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "publisher": {
+ "properties": {
+ "favicon_url": {
+ "description": "The publisher's homepage favicon URL.",
+ "type": "string"
+ },
+ "homepage_url": {
+ "description": "The publisher's homepage URL.",
+ "type": "string"
+ },
+ "logo_url": {
+ "description": "The publisher's logo URL.",
+ "type": "string"
+ },
+ "name": {
+ "description": "The publisher's name.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "name",
+ "logo_url",
+ "homepage_url"
+ ],
+ "type": "object"
+ },
+ "tickers": {
+ "description": "The ticker symbols associated with the article.",
+ "items": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "title": {
+ "description": "The title of the news article.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "publisher",
+ "title",
+ "author",
+ "published_utc",
+ "article_url",
+ "tickers"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "NewsArticleMetadata",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "ListNewsArticlesResults"
+ }
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "id,publisher_name,publisher_homepage_url,publisher_logo_url,publisher_favicon_url,title,author,published_utc,article_url,ticker,amp_url,image_url,description,keywords,sentiment,sentiment_reasoning\n8ec638777ca03b553ae516761c2a22ba2fdd2f37befae3ab6fdab74e9e5193eb,Investing.com,https://www.investing.com/,https://s3.massive.com/public/assets/news/logos/investing.png,https://s3.massive.com/public/assets/news/favicons/investing.ico,Markets are underestimating Fed cuts: UBS By Investing.com - Investing.com UK,Sam Boughedda,1719254033000000000,https://uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968,UBS,https://m.uk.investing.com/news/stock-market-news/markets-are-underestimating-fed-cuts-ubs-3559968?ampMode=1,https://i-invdn-com.investing.com/news/LYNXNPEC4I0AL_L.jpg,\"UBS analysts warn that markets are underestimating the extent of future interest rate cuts by the Federal Reserve, as the weakening economy is likely to justify more cuts than currently anticipated.\",\"Federal Reserve,interest rates,economic data\",positive,\"UBS analysts are providing a bullish outlook on the extent of future Federal Reserve rate cuts, suggesting that markets are underestimating the number of cuts that will occur.\"\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "An array of news articles."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
+ },
+ "404": {
+ "description": "The specified resource was not found"
+ }
+ },
+ "summary": "Ticker News",
+ "tags": [
+ "reference:news"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-massive-paginate": {
+ "sort": {
+ "default": "published_utc",
+ "enum": [
+ "published_utc"
+ ],
+ "limit": {
+ "default": 10,
+ "maximum": 1000,
+ "minimum": 1
+ }
+ }
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/crypto/tickers": {
+ "get": {
+ "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded cryptocurrency symbols.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "parameters": [
+ {
+ "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, X:BTCUSD, X:ETHBTC, and X:BOBAUSD. Empty string defaults to querying all tickers.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.296,
+ "h": 0.59714,
+ "l": 0.23706,
+ "o": 0.28,
+ "v": 4097699.5691991993,
+ "vw": 0
+ },
+ "lastTrade": {
+ "c": [
+ 1
+ ],
+ "i": 413131,
+ "p": 0.293,
+ "s": 13.6191,
+ "t": 1605292686010,
+ "x": 17
+ },
+ "min": {
+ "c": 0.296,
+ "h": 0.296,
+ "l": 0.294,
+ "n": 2,
+ "o": 0.296,
+ "t": 1684427880000,
+ "v": 123.4866,
+ "vw": 0
+ },
+ "prevDay": {
+ "c": 0.281,
+ "h": 0.59714,
+ "l": 0.23706,
+ "o": 0.27,
+ "v": 6070178.786154971,
+ "vw": 0.4076
+ },
+ "ticker": "X:FSNUSD",
+ "todaysChange": 0.012,
+ "todaysChangePerc": 4.270463,
+ "updated": 1605330008999
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "day",
+ "lastTrade",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get current state for all tickers"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "All Tickers",
+ "tags": [
+ "crypto:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}": {
+ "get": {
+ "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for a single traded cryptocurrency symbol.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "Ticker of the snapshot",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "ad92e92ce183112c593717f00dfebd2c",
+ "status": "OK",
+ "ticker": {
+ "day": {
+ "c": 16260.85,
+ "h": 16428.4,
+ "l": 15830.4,
+ "o": 16418.07,
+ "v": 105008.84231068,
+ "vw": 0
+ },
+ "lastTrade": {
+ "c": [
+ 2
+ ],
+ "i": "464569520",
+ "p": 16242.31,
+ "s": 0.001933,
+ "t": 1605294230780,
+ "x": 4
+ },
+ "min": {
+ "c": 16235.1,
+ "h": 16264.29,
+ "l": 16129.3,
+ "n": 558,
+ "o": 16257.51,
+ "t": 1684428960000,
+ "v": 19.30791925,
+ "vw": 0
+ },
+ "prevDay": {
+ "c": 16399.24,
+ "h": 16418.07,
+ "l": 16399.24,
+ "o": 16418.07,
+ "v": 0.99167108,
+ "vw": 16402.6893
+ },
+ "ticker": "X:BTCUSD",
+ "todaysChange": -156.93,
+ "todaysChangePerc": -0.956935,
+ "updated": 1605330008999
+ }
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "day",
+ "lastTrade",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n16260.85,16428.4,15830.4,16418.07,105008.84231068,0,\"[2]\",464569520,16242.31,0.001933,1605294230780,4,16235.1,16264.29,16129.3,16257.51,19.30791925,0,16399.24,16418.07,16399.24,16418.07,0.99167108,16402.6893\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get current state for a ticker"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Ticker",
+ "tags": [
+ "crypto:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/crypto/tickers/{ticker}/book": {
+ "get": {
+ "description": "Get the current level 2 book of a single ticker. This is the combined book from all of the exchanges.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The cryptocurrency ticker.",
+ "example": "X:BTCUSD",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "data": {
+ "askCount": 593.1412981600005,
+ "asks": [
+ {
+ "p": 11454,
+ "x": {
+ "2": 1
+ }
+ },
+ {
+ "p": 11455,
+ "x": {
+ "2": 1
+ }
+ }
+ ],
+ "bidCount": 694.951789670001,
+ "bids": [
+ {
+ "p": 16303.17,
+ "x": {
+ "1": 2
+ }
+ },
+ {
+ "p": 16302.94,
+ "x": {
+ "1": 0.02859424,
+ "6": 0.023455
+ }
+ }
+ ],
+ "spread": -4849.17,
+ "ticker": "X:BTCUSD",
+ "updated": 1605295074162
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ {
+ "properties": {
+ "data": {
+ "properties": {
+ "askCount": {
+ "description": "The combined total number of asks in the book.",
+ "format": "double",
+ "type": "number"
+ },
+ "asks": {
+ "items": {
+ "properties": {
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n \n \n**Example:**\n \n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n \n \nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "required": [
+ "p",
+ "x"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "bidCount": {
+ "description": "The combined total number of bids in the book.",
+ "format": "double",
+ "type": "number"
+ },
+ "bids": {
+ "items": {
+ "properties": {
+ "p": {
+ "description": "The price of this book level.",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "A map of the exchange ID to number of shares at this price level.\n \n \n**Example:**\n \n`{\n \"p\": 16302.94,\n \"x\": {\n \"1\": 0.02859424,\n \"6\": 0.023455\n }\n}`\n \n \nIn this example, exchange ID 1 has 0.02859424 shares available at $16,302.94,\nand exchange ID 6 has 0.023455 shares at the same price level.\n",
+ "type": "object"
+ }
+ },
+ "required": [
+ "p",
+ "x"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "spread": {
+ "description": "The difference between the best bid and the best ask price across exchanges.",
+ "format": "double",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "ticker",
+ "bids",
+ "asks",
+ "bidCount",
+ "askCount",
+ "spread",
+ "updated"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "side,price,size,exchange\nbid,20292.97,0.01501,1\nbid,20291.93,0.00218483,1\nask,18445.61,0.22,1\nask,18463.07,0.00234104,1\nask,18464.83,0.04159475,1\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get current level 2 book for a ticker"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Ticker Full Book (L2)",
+ "tags": [
+ "crypto:snapshot"
+ ],
+ "x-massive-deprecation": {
+ "date": 1719838800000
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/crypto/{direction}": {
+ "get": {
+ "description": "Get the current top 20 gainers or losers of the day in cryptocurrency markets.\n \n \nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.0374,
+ "h": 0.062377,
+ "l": 0.01162,
+ "o": 0.044834,
+ "v": 27313165.159427017,
+ "vw": 0
+ },
+ "lastTrade": {
+ "c": [
+ 2
+ ],
+ "i": "517478762",
+ "p": 0.0374,
+ "s": 499,
+ "t": 1604409649544,
+ "x": 2
+ },
+ "min": {
+ "c": 0.062377,
+ "h": 0.062377,
+ "l": 0.062377,
+ "n": 2,
+ "o": 0.062377,
+ "t": 1684426740000,
+ "v": 35420,
+ "vw": 0
+ },
+ "prevDay": {
+ "c": 0.01162,
+ "h": 0.044834,
+ "l": 0.01162,
+ "o": 0.044834,
+ "v": 53616273.36827199,
+ "vw": 0.0296
+ },
+ "ticker": "X:DRNUSD",
+ "todaysChange": 0.02578,
+ "todaysChangePerc": 221.858864,
+ "updated": 1605330008999
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "description": "The status of this request's response.",
+ "type": "string"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastTrade": {
+ "allOf": [
+ {
+ "description": "The most recent trade for this ticker."
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange that this crypto trade happened on. \nSee Exchanges for a mapping of exchanges to IDs.\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "day",
+ "lastTrade",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,day_c,day_h,day_l,day_o,day_v,day_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.0374,0.062377,0.01162,0.044834,27313165.159427017,0,\"[2]\",517478762,0.0374,499,1604409649544,2,0.062377,0.062377,0.062377,0.062377,35420,0,0.01162,0.044834,0.01162,0.044834,53616273.36827199,0.0296\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get the current gainers / losers of the day"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Gainers/Losers",
+ "tags": [
+ "crypto:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/forex/tickers": {
+ "get": {
+ "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for all traded forex symbols.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "parameters": [
+ {
+ "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, C:EURUSD, C:GBPCAD, and C:AUDINR. Empty string defaults to querying all tickers.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.11778221,
+ "h": 0.11812263,
+ "l": 0.11766631,
+ "o": 0.11797149,
+ "v": 77794
+ },
+ "lastQuote": {
+ "a": 0.11780678,
+ "b": 0.11777952,
+ "t": 1605280919000,
+ "x": 48
+ },
+ "min": {
+ "c": 0.117769,
+ "h": 0.11779633,
+ "l": 0.11773698,
+ "n": 1,
+ "o": 0.11778,
+ "t": 1684422000000,
+ "v": 202
+ },
+ "prevDay": {
+ "c": 0.11797258,
+ "h": 0.11797258,
+ "l": 0.11797149,
+ "o": 0.11797149,
+ "v": 2,
+ "vw": 0
+ },
+ "ticker": "C:HKDCHF",
+ "todaysChange": -0.00019306,
+ "todaysChangePerc": -0.1636482,
+ "updated": 1605280919000
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp of the quote.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "day",
+ "lastQuote",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get current state for all tickers"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "All Tickers",
+ "tags": [
+ "fx:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/forex/tickers/{ticker}": {
+ "get": {
+ "description": "Get the current minute, day, and previous day\u2019s aggregate, as well as the last trade and quote for a single traded currency symbol.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The forex ticker.",
+ "example": "C:EURUSD",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "ad76e76ce183002c5937a7f02dfebde4",
+ "status": "OK",
+ "ticker": {
+ "day": {
+ "c": 1.18403,
+ "h": 1.1906,
+ "l": 1.18001,
+ "o": 1.18725,
+ "v": 83578
+ },
+ "lastQuote": {
+ "a": 1.18403,
+ "b": 1.18398,
+ "i": 0,
+ "t": 1606163759000,
+ "x": 48
+ },
+ "min": {
+ "c": 1.18396,
+ "h": 1.18423,
+ "l": 1.1838,
+ "n": 85,
+ "o": 1.18404,
+ "t": 1684422000000,
+ "v": 41
+ },
+ "prevDay": {
+ "c": 1.18724,
+ "h": 1.18727,
+ "l": 1.18725,
+ "o": 1.18725,
+ "v": 5,
+ "vw": 0
+ },
+ "ticker": "C:EURUSD",
+ "todaysChange": -0.00316,
+ "todaysChangePerc": -0.27458312,
+ "updated": 1606163759000
+ }
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp of the quote.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "day",
+ "lastQuote",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n1.18403,1.1906,1.18001,1.18725,83578,1.18403,1.18398,0,1606163759000,48,1.18396,1.18423,1.1838,1.18404,41,1.18724,1.18727,1.18725,1.18725,5,0\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get current state for a ticker"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Ticker",
+ "tags": [
+ "fx:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v2/snapshot/locale/global/markets/forex/{direction}": {
+ "get": {
+ "description": "Get the current top 20 gainers or losers of the day in forex markets.\n \n \nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\n \n \nNote: Snapshot data is cleared at 12am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 0.886156,
+ "h": 0.887111,
+ "l": 0.8825327,
+ "o": 0.8844732,
+ "v": 1041
+ },
+ "lastQuote": {
+ "a": 0.8879606,
+ "b": 0.886156,
+ "t": 1605283204000,
+ "x": 48
+ },
+ "min": {
+ "c": 0.886156,
+ "h": 0.886156,
+ "l": 0.886156,
+ "n": 1,
+ "o": 0.886156,
+ "t": 1684422000000,
+ "v": 1
+ },
+ "prevDay": {
+ "c": 0.8428527,
+ "h": 0.889773,
+ "l": 0.8428527,
+ "o": 0.8848539,
+ "v": 1078,
+ "vw": 0
+ },
+ "ticker": "C:PLNILS",
+ "todaysChange": 0.0433033,
+ "todaysChangePerc": 5.13770674,
+ "updated": 1605330008999
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker.",
+ "properties": {
+ "a": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "b": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The millisecond accuracy timestamp of the quote.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID on which this quote happened.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "a",
+ "b",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "day",
+ "lastQuote",
+ "min",
+ "prevDay",
+ "ticker",
+ "todaysChange",
+ "todaysChangePerc",
+ "updated"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": {
+ "tickers": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_t,lastQuote_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n0.886156,0.887111,0.8825327,0.8844732,1041,0.8879606,0.886156,1605283204000,48,0.886156,0.886156,0.886156,0.886156,1,0.8428527,0.889773,0.8428527,0.8848539,1078,0\n"
+ },
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get the current gainers / losers of the day"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Gainers/Losers",
+ "tags": [
+ "fx:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ }
+ }
+ },
+ "/v2/snapshot/locale/us/markets/stocks/tickers": {
+ "get": {
+ "description": "Get the most up-to-date market data for all traded stock symbols.\n \n \nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "parameters": [
+ {
+ "description": "A case-sensitive comma separated list of tickers to get snapshots for. For example, AAPL,TSLA,GOOG. Empty string defaults to querying all tickers.",
+ "in": "query",
+ "name": "tickers",
+ "schema": {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ }
+ },
+ {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 1,
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 20.506,
+ "h": 20.64,
+ "l": 20.506,
+ "o": 20.64,
+ "v": 37216,
+ "vw": 20.616
+ },
+ "lastQuote": {
+ "P": 20.6,
+ "S": 22,
+ "p": 20.5,
+ "s": 13,
+ "t": 1605192959994246100
+ },
+ "lastTrade": {
+ "c": [
+ 14,
+ 41
+ ],
+ "i": "71675577320245",
+ "p": 20.506,
+ "s": 2416,
+ "t": 1605192894630916600,
+ "x": 4
+ },
+ "min": {
+ "av": 37216,
+ "c": 20.506,
+ "h": 20.506,
+ "l": 20.506,
+ "n": 1,
+ "o": 20.506,
+ "t": 1684428600000,
+ "v": 5000,
+ "vw": 20.5105
+ },
+ "prevDay": {
+ "c": 20.63,
+ "h": 21,
+ "l": 20.5,
+ "o": 20.79,
+ "v": 292738,
+ "vw": 20.6939
+ },
+ "ticker": "BCAT",
+ "todaysChange": -0.124,
+ "todaysChangePerc": -0.601,
+ "updated": 1605192894630916600
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get current state for all tickers"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "All Tickers",
+ "tags": [
+ "stocks:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/snapshot/locale/us/markets/stocks/tickers/{stocksTicker}": {
+ "get": {
+ "description": "Get the most up-to-date market data for a single traded stock ticker.\n \n \nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST.\n",
+ "parameters": [
+ {
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stocksTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "657e430f1ae768891f018e08e03598d8",
+ "status": "OK",
+ "ticker": {
+ "day": {
+ "c": 120.4229,
+ "h": 120.53,
+ "l": 118.81,
+ "o": 119.62,
+ "v": 28727868,
+ "vw": 119.725
+ },
+ "lastQuote": {
+ "P": 120.47,
+ "S": 4,
+ "p": 120.46,
+ "s": 8,
+ "t": 1605195918507251700
+ },
+ "lastTrade": {
+ "c": [
+ 14,
+ 41
+ ],
+ "i": "4046",
+ "p": 120.47,
+ "s": 236,
+ "t": 1605195918306274000,
+ "x": 10
+ },
+ "min": {
+ "av": 28724441,
+ "c": 120.4201,
+ "h": 120.468,
+ "l": 120.37,
+ "n": 762,
+ "o": 120.435,
+ "t": 1684428720000,
+ "v": 270796,
+ "vw": 120.4129
+ },
+ "prevDay": {
+ "c": 119.49,
+ "h": 119.63,
+ "l": 116.44,
+ "o": 117.19,
+ "v": 110597265,
+ "vw": 118.4998
+ },
+ "ticker": "AAPL",
+ "todaysChange": 0.98,
+ "todaysChangePerc": 0.82,
+ "updated": 1605195918306274000
+ }
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "request_id"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "ticker": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,lastQuote_a,lastQuote_b,lastQuote_i,lastQuote_t,lastQuote_x,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_c,min_h,min_l,min_o,min_v,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n120.4229,120.53,118.81,119.62,28727868,119.725,120.47,4,120.46,8,1605195918507251817,\"[14,41]\",4046,120.47,236,1605195918306274031,10,28724441,120.4201,120.468,120.37,120.435,270796,120.4129,119.49,119.63,116.44,117.19,110597265,118.4998\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get current state for a ticker"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Ticker",
+ "tags": [
+ "stocks:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/snapshot/locale/us/markets/stocks/{direction}": {
+ "get": {
+ "description": "Get the most up-to-date market data for the current top 20 gainers or losers of the day in the stocks/equities markets.\n \n \nTop gainers are those tickers whose price has increased by the highest percentage since the previous day's close.\nTop losers are those tickers whose price has decreased by the highest percentage since the previous day's close.\nThis output will only include tickers with a trading volume of 10,000 or more.\n \n \nNote: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges.\n",
+ "parameters": [
+ {
+ "description": "The direction of the snapshot results to return.\n",
+ "example": "gainers",
+ "in": "path",
+ "name": "direction",
+ "required": true,
+ "schema": {
+ "enum": [
+ "gainers",
+ "losers"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Include OTC securities in the response. Default is false (don't include OTC securities).\n",
+ "in": "query",
+ "name": "include_otc",
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "OK",
+ "tickers": [
+ {
+ "day": {
+ "c": 14.2284,
+ "h": 15.09,
+ "l": 14.2,
+ "o": 14.33,
+ "v": 133963,
+ "vw": 14.5311
+ },
+ "lastQuote": {
+ "P": 14.44,
+ "S": 11,
+ "p": 14.2,
+ "s": 25,
+ "t": 1605195929997325600
+ },
+ "lastTrade": {
+ "c": [
+ 63
+ ],
+ "i": "79372124707124",
+ "p": 14.2284,
+ "s": 536,
+ "t": 1605195848258266000,
+ "x": 4
+ },
+ "min": {
+ "av": 133963,
+ "c": 14.2284,
+ "h": 14.325,
+ "l": 14.2,
+ "n": 5,
+ "o": 14.28,
+ "t": 1684428600000,
+ "v": 6108,
+ "vw": 14.2426
+ },
+ "prevDay": {
+ "c": 0.73,
+ "h": 0.799,
+ "l": 0.73,
+ "o": 0.75,
+ "v": 1568097,
+ "vw": 0.7721
+ },
+ "ticker": "PDS",
+ "todaysChange": 13.498,
+ "todaysChangePerc": 1849.096,
+ "updated": 1605195848258266000
+ }
+ ]
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "tickers": {
+ "items": {
+ "properties": {
+ "day": {
+ "description": "The most recent daily bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.",
+ "format": "double",
+ "type": "number"
+ },
+ "lastQuote": {
+ "description": "The most recent quote for this ticker. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size in lots.",
+ "type": "integer"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size in lots.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "p",
+ "s",
+ "P",
+ "S",
+ "t"
+ ],
+ "type": "object"
+ },
+ "lastTrade": {
+ "description": "The most recent trade for this ticker. This is only returned if your current plan includes trades.",
+ "properties": {
+ "c": {
+ "description": "The trade conditions.",
+ "items": {
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The size (volume) of the trade.",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "t",
+ "x"
+ ],
+ "type": "object"
+ },
+ "min": {
+ "description": "The most recent minute bar for this ticker.",
+ "properties": {
+ "av": {
+ "description": "The accumulated volume.",
+ "type": "integer"
+ },
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "n": {
+ "description": "The number of transactions in the aggregate window.",
+ "type": "integer"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "t": {
+ "description": "The Unix Msec timestamp for the start of the aggregate window.",
+ "type": "integer"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "av",
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw",
+ "t",
+ "n"
+ ],
+ "type": "object"
+ },
+ "prevDay": {
+ "description": "The previous day's bar for this ticker.",
+ "properties": {
+ "c": {
+ "description": "The close price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "h": {
+ "description": "The highest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "l": {
+ "description": "The lowest price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "o": {
+ "description": "The open price for the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "otc": {
+ "description": "Whether or not this aggregate is for an OTC ticker. This field will be left off if false.",
+ "type": "boolean"
+ },
+ "v": {
+ "description": "The trading volume of the symbol in the given time period.",
+ "format": "double",
+ "type": "number"
+ },
+ "vw": {
+ "description": "The volume weighted average price.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "o",
+ "h",
+ "l",
+ "c",
+ "v",
+ "vw"
+ ],
+ "type": "object"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "todaysChange": {
+ "description": "The value of the change from the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "todaysChangePerc": {
+ "description": "The percentage change since the previous day.",
+ "format": "double",
+ "type": "number"
+ },
+ "updated": {
+ "description": "The last updated timestamp.",
+ "type": "integer"
+ }
+ },
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ },
+ "text/csv": {
+ "example": "day_c,day_h,day_l,day_o,day_v,day_vw,lastQuote_P,lastQuote_S,lastQuote_p,lastQuote_s,lastQuote_t,lastTrade_c,lastTrade_i,lastTrade_p,lastTrade_s,lastTrade_t,lastTrade_x,min_av,min_c,min_h,min_l,min_o,min_v,min_vw,prevDay_c,prevDay_h,prevDay_l,prevDay_o,prevDay_v,prevDay_vw\n14.2284,15.09,14.2,14.33,133963,14.5311,14.44,11,14.2,25,1605195929997325568,\"[63]\",79372124707124,14.2284,536,1605195848258266112,4,133963,14.2284,14.325,14.2,14.28,6108,14.2426,0.73,0.799,0.73,0.75,1568097,0.7721\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "Get the current tickers of the day"
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Gainers/Losers",
+ "tags": [
+ "stocks:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/ticks/stocks/nbbo/{ticker}/{date}": {
+ "get": {
+ "description": "Get NBBO quotes for a given ticker symbol on a specified date.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol we want quotes for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date/day of the quotes to retrieve in the format YYYY-MM-DD.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The maximum timestamp allowed in the results.\n",
+ "in": "query",
+ "name": "timestampLimit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Reverse the order of the results.\n",
+ "example": true,
+ "in": "query",
+ "name": "reverse",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Limit the size of the response, max 50000 and default 5000.",
+ "example": 10,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "db_latency": 43,
+ "map": {
+ "P": {
+ "name": "ask_price",
+ "type": "float64"
+ },
+ "S": {
+ "name": "ask_size",
+ "type": "int"
+ },
+ "X": {
+ "name": "ask_exchange",
+ "type": "int"
+ },
+ "c": {
+ "name": "conditions",
+ "type": "int"
+ },
+ "f": {
+ "name": "trf_timestamp",
+ "type": "int64"
+ },
+ "i": {
+ "name": "indicators",
+ "type": "int"
+ },
+ "p": {
+ "name": "bid_price",
+ "type": "float64"
+ },
+ "q": {
+ "name": "sequence_number",
+ "type": "int"
+ },
+ "s": {
+ "name": "bid_size",
+ "type": "int"
+ },
+ "t": {
+ "name": "sip_timestamp",
+ "type": "int64"
+ },
+ "x": {
+ "name": "bid_exchange",
+ "type": "int"
+ },
+ "y": {
+ "name": "participant_timestamp",
+ "type": "int64"
+ },
+ "z": {
+ "name": "tape",
+ "type": "int"
+ }
+ },
+ "results": [
+ {
+ "P": 0,
+ "S": 0,
+ "X": 0,
+ "c": [
+ 1
+ ],
+ "p": 102.7,
+ "q": 2060,
+ "s": 60,
+ "t": 1517562000065700400,
+ "x": 11,
+ "y": 1517562000065321200,
+ "z": 3
+ },
+ {
+ "P": 0,
+ "S": 0,
+ "X": 0,
+ "c": [
+ 1
+ ],
+ "p": 170,
+ "q": 2061,
+ "s": 2,
+ "t": 1517562000065791500,
+ "x": 11,
+ "y": 1517562000065408300,
+ "z": 3
+ }
+ ],
+ "results_count": 2,
+ "success": true,
+ "ticker": "AAPL"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "db_latency": {
+ "description": "Latency in milliseconds for the query results from the database.",
+ "type": "integer"
+ },
+ "results_count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "success": {
+ "description": "Whether or not this query was executed successfully.",
+ "type": "boolean"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "P": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "S": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "type": "integer"
+ },
+ "X": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Ask Exchange Id"
+ }
+ ]
+ },
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "i": {
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n",
+ "items": {
+ "description": "The indicator code.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "p": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "s": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "type": "integer"
+ },
+ "x": {
+ "allOf": [
+ {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ {
+ "description": "Bid Exchange Id"
+ }
+ ]
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "x",
+ "P",
+ "S",
+ "X",
+ "z"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "A list of quotes."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Quotes (NBBO)",
+ "tags": [
+ "stocks:quotes"
+ ],
+ "x-massive-deprecation": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Quotes (NBBO) v3",
+ "path": "get_v3_quotes__stockticker"
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v2/ticks/stocks/trades/{ticker}/{date}": {
+ "get": {
+ "description": "Get trades for a given ticker symbol on a specified date.\n",
+ "parameters": [
+ {
+ "description": "The ticker symbol we want trades for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The date/day of the trades to retrieve in the format YYYY-MM-DD.",
+ "example": "2020-10-14",
+ "in": "path",
+ "name": "date",
+ "required": true,
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "The timestamp offset, used for pagination. This is the offset at which to start the results. Using the `timestamp` of the last result as the offset will give you the next page of results.\n",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "The maximum timestamp allowed in the results.\n",
+ "in": "query",
+ "name": "timestampLimit",
+ "schema": {
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Reverse the order of the results.\n",
+ "example": true,
+ "in": "query",
+ "name": "reverse",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Limit the size of the response, max 50000 and default 5000.",
+ "example": 10,
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "db_latency": 11,
+ "map": {
+ "I": {
+ "name": "orig_id",
+ "type": "string"
+ },
+ "c": {
+ "name": "conditions",
+ "type": "int"
+ },
+ "e": {
+ "name": "correction",
+ "type": "int"
+ },
+ "f": {
+ "name": "trf_timestamp",
+ "type": "int64"
+ },
+ "i": {
+ "name": "id",
+ "type": "string"
+ },
+ "p": {
+ "name": "price",
+ "type": "float64"
+ },
+ "q": {
+ "name": "sequence_number",
+ "type": "int64"
+ },
+ "r": {
+ "name": "trf_id",
+ "type": "int"
+ },
+ "s": {
+ "name": "size",
+ "type": "int"
+ },
+ "t": {
+ "name": "sip_timestamp",
+ "type": "int64"
+ },
+ "x": {
+ "name": "exchange",
+ "type": "int"
+ },
+ "y": {
+ "name": "participant_timestamp",
+ "type": "int64"
+ },
+ "z": {
+ "name": "tape",
+ "type": "int"
+ }
+ },
+ "results": [
+ {
+ "c": [
+ 12,
+ 41
+ ],
+ "i": "1",
+ "p": 171.55,
+ "q": 1063,
+ "s": 100,
+ "t": 1517562000016036600,
+ "x": 11,
+ "y": 1517562000015577000,
+ "z": 3
+ },
+ {
+ "c": [
+ 12,
+ 41
+ ],
+ "i": "2",
+ "p": 171.55,
+ "q": 1064,
+ "s": 100,
+ "t": 1517562000016038100,
+ "x": 11,
+ "y": 1517562000015577600,
+ "z": 3
+ }
+ ],
+ "results_count": 2,
+ "success": true,
+ "ticker": "AAPL"
+ },
+ "schema": {
+ "allOf": [
+ {
+ "properties": {
+ "db_latency": {
+ "description": "Latency in milliseconds for the query results from the database.",
+ "type": "integer"
+ },
+ "results_count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "success": {
+ "description": "Whether or not this query was executed successfully.",
+ "type": "boolean"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ {
+ "properties": {
+ "results": {
+ "items": {
+ "allOf": [
+ {
+ "properties": {
+ "T": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "f": {
+ "description": "The nanosecond accuracy TRF(Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this message.",
+ "type": "integer"
+ },
+ "q": {
+ "description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n",
+ "format": "int64",
+ "type": "integer"
+ },
+ "t": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this message from the exchange which produced it.",
+ "type": "integer"
+ },
+ "y": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "T",
+ "t",
+ "y",
+ "f",
+ "q"
+ ],
+ "type": "object"
+ },
+ {
+ "properties": {
+ "c": {
+ "description": "A list of condition codes.\n",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/get_v3_reference_conditions)\nfor a mapping to exchange conditions.\n",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "e": {
+ "description": "The trade correction indicator.\n",
+ "type": "integer"
+ },
+ "i": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.\n",
+ "type": "string"
+ },
+ "p": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.\n",
+ "format": "double",
+ "type": "number"
+ },
+ "r": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.\n",
+ "type": "integer"
+ },
+ "s": {
+ "description": "The size of a trade (also known as volume).\n",
+ "format": "double",
+ "type": "number"
+ },
+ "x": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "z": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "c",
+ "i",
+ "p",
+ "s",
+ "e",
+ "x",
+ "r",
+ "z"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "description": "A list of trades."
+ },
+ "default": {
+ "description": "Unexpected error"
+ }
+ },
+ "summary": "Trades",
+ "tags": [
+ "stocks:trades"
+ ],
+ "x-massive-deprecation": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Trades v3",
+ "path": "get_v3_trades__stockticker"
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ }
+ }
+ },
+ "/v3/quotes/{fxTicker}": {
+ "get": {
+ "description": "Get BBO quotes for a ticker symbol in a given time range.",
+ "operationId": "QuotesFx",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get quotes for.",
+ "example": "C:EUR-USD",
+ "in": "path",
+ "name": "fxTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 1000,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.massive.com/v3/quotes/C:EUR-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "ask_exchange": 48,
+ "ask_price": 1.18565,
+ "bid_exchange": 48,
+ "bid_price": 1.18558,
+ "participant_timestamp": 1625097600000000000
+ },
+ {
+ "ask_exchange": 48,
+ "ask_price": 1.18565,
+ "bid_exchange": 48,
+ "bid_price": 1.18559,
+ "participant_timestamp": 1625097600000000000
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "ask_exchange": {
+ "description": "The ask exchange ID",
+ "type": "integer"
+ },
+ "ask_price": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_exchange": {
+ "description": "The bid exchange ID",
+ "type": "integer"
+ },
+ "bid_price": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the quote was generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ }
+ },
+ "required": [
+ "participant_timestamp"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "ask_exchange,ask_price,bid_exchange,bid_price,participant_timestamp\n48,,1.18565,,48,,1.18558,,1625097600000000000\n48,,1.18565,,48,,1.18559,,1625097600000000000\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "A list of quotes."
+ }
+ },
+ "summary": "Quotes (BBO)",
+ "tags": [
+ "fx:quotes"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Forex data",
+ "name": "fx"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 1000,
+ "example": 10,
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
+ },
+ "x-massive-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Historic Forex Ticks",
+ "path": "get_v1_historic_forex__from___to___date"
+ }
+ }
+ },
+ "x-massive-ignore": true
+ },
+ "/v3/quotes/{optionsTicker}": {
+ "get": {
+ "description": "Get quotes for an options ticker symbol in a given time range.",
+ "operationId": "QuotesOptions",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get quotes for.",
+ "example": "O:SPY241220P00720000",
+ "in": "path",
+ "name": "optionsTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 1000,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.massive.com/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "ask_exchange": 323,
+ "ask_price": 282,
+ "ask_size": 10,
+ "bid_exchange": 316,
+ "bid_price": 277.5,
+ "bid_size": 1,
+ "sequence_number": 789539218,
+ "sip_timestamp": 1645119125346243600
+ },
+ {
+ "ask_exchange": 301,
+ "ask_price": 282,
+ "ask_size": 1,
+ "bid_exchange": 323,
+ "bid_price": 277.5,
+ "bid_size": 10,
+ "sequence_number": 788994206,
+ "sip_timestamp": 1645119118474271000
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "ask_exchange": {
+ "description": "The ask exchange ID",
+ "type": "integer"
+ },
+ "ask_price": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "ask_size": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_exchange": {
+ "description": "The bid exchange ID",
+ "type": "integer"
+ },
+ "bid_price": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_size": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "sequence_number": {
+ "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
+ "format": "int64",
+ "type": "integer"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ }
+ },
+ "required": [
+ "sip_timestamp",
+ "sequence_number"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,sequence_number,sip_timestamp\n323,282,10,316,277.5,1,789539218,1645119125346243600\n301,282,1,323,277.5,10,788994206,1645119118474271000\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "A list of quotes."
+ }
+ },
+ "summary": "Quotes",
+ "tags": [
+ "options:quotes"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 1000,
+ "example": 10,
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
+ }
+ },
+ "x-massive-ignore": true
+ },
+ "/v3/quotes/{stockTicker}": {
+ "get": {
+ "description": "Get NBBO quotes for a ticker symbol in a given time range.",
+ "operationId": "Quotes",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get quotes for.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "stockTicker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-go-id": "Ticker"
+ },
+ {
+ "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 1000,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.massive.com/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "ask_exchange": 0,
+ "ask_price": 0,
+ "ask_size": 0,
+ "bid_exchange": 11,
+ "bid_price": 102.7,
+ "bid_size": 60,
+ "conditions": [
+ 1
+ ],
+ "participant_timestamp": 1517562000065321200,
+ "sequence_number": 2060,
+ "sip_timestamp": 1517562000065700400,
+ "tape": 3
+ },
+ {
+ "ask_exchange": 0,
+ "ask_price": 0,
+ "ask_size": 0,
+ "bid_exchange": 11,
+ "bid_price": 170,
+ "bid_size": 2,
+ "conditions": [
+ 1
+ ],
+ "participant_timestamp": 1517562000065408300,
+ "sequence_number": 2061,
+ "sip_timestamp": 1517562000065791500,
+ "tape": 3
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "ask_exchange": {
+ "description": "The ask exchange ID",
+ "type": "integer"
+ },
+ "ask_price": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "ask_size": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_exchange": {
+ "description": "The bid exchange ID",
+ "type": "integer"
+ },
+ "bid_price": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_size": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "indicators": {
+ "description": "A list of indicator codes.",
+ "items": {
+ "description": "The indicator codes. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
+ }
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "sequence_number": {
+ "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "tape": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "format": "int32",
+ "type": "integer"
+ },
+ "trf_timestamp": {
+ "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this quote.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ }
+ },
+ "required": [
+ "participant_timestamp",
+ "sequence_number",
+ "sip_timestamp"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "CommonQuote"
+ }
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,conditions,participant_timestamp,sequence_number,sip_timestamp,tape\n0,0,0,11,102.7,60,1,1517562000065321216,2060,1517562000065700260,3\n0,0,0,11,170,2,1,1517562000065408256,2061,1517562000065791515,3\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "A list of quotes."
+ }
+ },
+ "summary": "Quotes (NBBO)",
+ "tags": [
+ "stocks:quotes"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "NBBO data",
+ "name": "nbbo"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 1000,
+ "example": 10,
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
+ },
+ "x-massive-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Quotes (NBBO)",
+ "path": "get_v2_ticks_stocks_nbbo__ticker___date"
+ }
+ }
+ }
+ },
+ "/v3/reference/conditions": {
+ "get": {
+ "description": "List all conditions that Massive.com uses.",
+ "operationId": "ListConditions",
+ "parameters": [
+ {
+ "description": "Filter for conditions within a given asset class.",
+ "in": "query",
+ "name": "asset_class",
+ "schema": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Filter by data type.",
+ "in": "query",
+ "name": "data_type",
+ "schema": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Filter for conditions with a given ID.",
+ "in": "query",
+ "name": "id",
+ "schema": {
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.",
+ "in": "query",
+ "name": "sip",
+ "schema": {
+ "description": "One of the SIPs.",
+ "enum": [
+ "CTA",
+ "UTP",
+ "OPRA"
+ ],
+ "example": "CTA",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "asset_class",
+ "enum": [
+ "asset_class",
+ "id",
+ "type",
+ "name",
+ "data_types",
+ "legacy"
+ ],
+ "example": "asset_class",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "example": {
+ "count": 1,
+ "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "results": [
+ {
+ "asset_class": "stocks",
+ "data_types": [
+ "trade"
+ ],
+ "id": 2,
+ "name": "Average Price Trade",
+ "sip_mapping": {
+ "CTA": "B",
+ "UTP": "W"
+ },
+ "type": "condition",
+ "update_rules": {
+ "consolidated": {
+ "updates_high_low": false,
+ "updates_open_close": false,
+ "updates_volume": true
+ },
+ "market_center": {
+ "updates_high_low": false,
+ "updates_open_close": false,
+ "updates_volume": true
+ }
+ }
+ }
+ ],
+ "status": "OK"
+ },
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "results": {
+ "description": "An array of conditions that match your query.",
+ "items": {
+ "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
+ "properties": {
+ "abbreviation": {
+ "description": "A commonly-used abbreviation for this condition.",
+ "type": "string"
+ },
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "Data types that this condition applies to.",
+ "items": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "description": {
+ "description": "A short description of the semantics of this condition.",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "If present, mapping this condition from a Massive.com code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ },
+ "legacy": {
+ "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ "type": "boolean"
+ },
+ "name": {
+ "description": "The name of this condition.",
+ "example": "Acquisition",
+ "type": "string"
+ },
+ "sip_mapping": {
+ "description": "A mapping to a symbol for each SIP that has this condition.",
+ "properties": {
+ "CTA": {
+ "type": "string"
+ },
+ "OPRA": {
+ "type": "string"
+ },
+ "UTP": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": {
+ "description": "An identifier for a collection of related conditions.",
+ "enum": [
+ "sale_condition",
+ "quote_condition",
+ "sip_generated_flag",
+ "financial_status_indicator",
+ "short_sale_restriction_indicator",
+ "settlement_condition",
+ "market_condition",
+ "trade_thru_exempt"
+ ],
+ "type": "string"
+ },
+ "update_rules": {
+ "description": "A list of aggregation rules.",
+ "properties": {
+ "consolidated": {
+ "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ },
+ "market_center": {
+ "description": "Describes aggregation rules on a per-market-center basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "consolidated",
+ "market_center"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "name",
+ "asset_class",
+ "sip_mapping",
+ "data_types"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "id,type,abbreviation,name,description,asset_class,sip_mapping,exchange,consolidated_updates_high_low,consolidated_updates_open_close,consolidated_updates_volume,market_center_updates_high_low,market_center_updates_open_close,market_center_updates_volume,data_types,legacy\n0,regular,,Regular Trade,,crypto,null,0,,,,,,,trade,false\n1,buy_or_sell_side,,Sell Side,The asset was sold at the prevailing best bid price on an exchange.,crypto,null,0,,,,,,,trade,false\n2,buy_or_sell_side,,Buy Side,The asset was bought at the prevailing best ask price on an exchange.,crypto,null,0,,,,,,,trade,false\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "OK"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "results": {
+ "description": "An array of conditions that match your query.",
+ "items": {
+ "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
+ "properties": {
+ "abbreviation": {
+ "description": "A commonly-used abbreviation for this condition.",
+ "type": "string"
+ },
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "Data types that this condition applies to.",
+ "items": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "description": {
+ "description": "A short description of the semantics of this condition.",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "If present, mapping this condition from a Massive.com code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ },
+ "legacy": {
+ "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ "type": "boolean"
+ },
+ "name": {
+ "description": "The name of this condition.",
+ "example": "Acquisition",
+ "type": "string"
+ },
+ "sip_mapping": {
+ "description": "A mapping to a symbol for each SIP that has this condition.",
+ "properties": {
+ "CTA": {
+ "type": "string"
+ },
+ "OPRA": {
+ "type": "string"
+ },
+ "UTP": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": {
+ "description": "An identifier for a collection of related conditions.",
+ "enum": [
+ "sale_condition",
+ "quote_condition",
+ "sip_generated_flag",
+ "financial_status_indicator",
+ "short_sale_restriction_indicator",
+ "settlement_condition",
+ "market_condition",
+ "trade_thru_exempt"
+ ],
+ "type": "string"
+ },
+ "update_rules": {
+ "description": "A list of aggregation rules.",
+ "properties": {
+ "consolidated": {
+ "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ },
+ "market_center": {
+ "description": "Describes aggregation rules on a per-market-center basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "consolidated",
+ "market_center"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "name",
+ "asset_class",
+ "sip_mapping",
+ "data_types"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "a query parameter was malformed"
+ },
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "results": {
+ "description": "An array of conditions that match your query.",
+ "items": {
+ "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
+ "properties": {
+ "abbreviation": {
+ "description": "A commonly-used abbreviation for this condition.",
+ "type": "string"
+ },
+ "asset_class": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ },
+ "data_types": {
+ "description": "Data types that this condition applies to.",
+ "items": {
+ "description": "The type of financial data represented by a data model.",
+ "enum": [
+ "trade",
+ "bbo",
+ "nbbo"
+ ],
+ "example": "trade",
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "description": {
+ "description": "A short description of the semantics of this condition.",
+ "type": "string"
+ },
+ "exchange": {
+ "description": "If present, mapping this condition from a Massive.com code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "An identifier used by Massive.com for this condition. Unique per data type.",
+ "example": 1,
+ "type": "integer"
+ },
+ "legacy": {
+ "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
+ "type": "boolean"
+ },
+ "name": {
+ "description": "The name of this condition.",
+ "example": "Acquisition",
+ "type": "string"
+ },
+ "sip_mapping": {
+ "description": "A mapping to a symbol for each SIP that has this condition.",
+ "properties": {
+ "CTA": {
+ "type": "string"
+ },
+ "OPRA": {
+ "type": "string"
+ },
+ "UTP": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "type": {
+ "description": "An identifier for a collection of related conditions.",
+ "enum": [
+ "sale_condition",
+ "quote_condition",
+ "sip_generated_flag",
+ "financial_status_indicator",
+ "short_sale_restriction_indicator",
+ "settlement_condition",
+ "market_condition",
+ "trade_thru_exempt"
+ ],
+ "type": "string"
+ },
+ "update_rules": {
+ "description": "A list of aggregation rules.",
+ "properties": {
+ "consolidated": {
+ "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
+ },
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
+ },
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
+ }
+ },
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
+ "type": "object"
+ },
+ "market_center": {
+ "description": "Describes aggregation rules on a per-market-center basis.",
+ "properties": {
+ "updates_high_low": {
+ "description": "Whether or not trades with this condition update the high/low.",
+ "type": "boolean"
},
- "x": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "updates_open_close": {
+ "description": "Whether or not trades with this condition update the open/close.",
+ "type": "boolean"
},
- "z": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ\n",
- "type": "integer"
+ "updates_volume": {
+ "description": "Whether or not trades with this condition update the volume.",
+ "type": "boolean"
}
},
+ "required": [
+ "updates_high_low",
+ "updates_open_close",
+ "updates_volume"
+ ],
"type": "object"
}
- ]
- },
- "type": "array"
- }
+ },
+ "required": [
+ "consolidated",
+ "market_center"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "id",
+ "type",
+ "name",
+ "asset_class",
+ "sip_mapping",
+ "data_types"
+ ],
+ "type": "object"
},
- "type": "object"
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
}
- ]
+ },
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
+ "type": "object"
}
}
},
- "description": "A list of trades."
- },
- "default": {
- "description": "Unexpected error"
+ "description": "an unknown error occurred"
}
},
- "summary": "Trades",
+ "summary": "Conditions",
"tags": [
- "stocks:trades"
+ "reference:conditions"
],
- "x-polygon-deprecation": {
- "date": 1654056060000,
- "replaces": {
- "name": "Trades v3",
- "path": "get_v3_trades__stockticker"
- }
- },
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
},
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
+ },
+ "sort": {
+ "default": "asset_class",
+ "enum": [
+ "asset_class",
+ "id",
+ "type",
+ "name",
+ "data_types",
+ "legacy"
+ ]
+ }
}
}
},
- "/v3/quotes/{fxTicker}": {
+ "/v3/reference/dividends": {
"get": {
- "description": "Get BBO quotes for a ticker symbol in a given time range.",
- "operationId": "QuotesFx",
+ "description": "Get a list of historical cash dividends, including the ticker symbol,\ndeclaration date, ex-dividend date, record date, pay date, frequency,\nand amount.",
+ "operationId": "ListDividends",
"parameters": [
{
- "description": "The ticker symbol to get quotes for.",
- "example": "C:EUR-USD",
- "in": "path",
- "name": "fxTicker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"in": "query",
- "name": "timestamp",
+ "name": "ticker",
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
- "range": true
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Query by ex-dividend date with the format YYYY-MM-DD.",
"in": "query",
- "name": "timestamp.gte",
+ "name": "ex_dividend_date",
"schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true,
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Query by record date with the format YYYY-MM-DD.",
"in": "query",
- "name": "timestamp.gt",
+ "name": "record_date",
"schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true,
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Query by declaration date with the format YYYY-MM-DD.",
"in": "query",
- "name": "timestamp.lte",
+ "name": "declaration_date",
"schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true,
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Query by pay date with the format YYYY-MM-DD.",
"in": "query",
- "name": "timestamp.lt",
+ "name": "pay_date",
"schema": {
+ "format": "date",
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true,
"type": "string"
}
},
{
- "description": "Order results based on the `sort` field.",
+ "description": "Query by the number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
"in": "query",
- "name": "order",
+ "name": "frequency",
"schema": {
- "default": "desc",
"enum": [
- "asc",
- "desc"
+ 0,
+ 1,
+ 2,
+ 4,
+ 12
],
- "example": "asc",
- "type": "string"
+ "type": "integer"
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Query by the cash amount of the dividend.",
"in": "query",
- "name": "limit",
+ "name": "cash_amount",
"schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
+ "type": "number"
+ },
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "number"
}
},
{
- "description": "Sort field used for ordering.",
+ "description": "Query by the type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.",
"in": "query",
- "name": "sort",
+ "name": "dividend_type",
"schema": {
- "default": "timestamp",
+ "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": [
- "timestamp"
- ],
- "example": "timestamp",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/quotes/C:EUR-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "ask_exchange": "48,",
- "ask_price": "1.18565,",
- "bid_exchange": "48,",
- "bid_price": "1.18558,",
- "participant_timestamp": 1625097600000000000
- },
- {
- "ask_exchange": "48,",
- "ask_price": "1.18565,",
- "bid_exchange": "48,",
- "bid_price": "1.18559,",
- "participant_timestamp": 1625097600000000000
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "ask_exchange": {
- "description": "The ask exchange ID",
- "type": "integer"
- },
- "ask_price": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "bid_exchange": {
- "description": "The bid exchange ID",
- "type": "integer"
- },
- "bid_price": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "participant_timestamp": {
- "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the quote was generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask_exchange,ask_price,bid_exchange,bid_price,participant_timestamp\n48,,1.18565,,48,,1.18558,,1625097600000000000\n48,,1.18565,,48,,1.18559,,1625097600000000000\n",
- "schema": {
- "type": "string"
- }
+ "CD",
+ "SC",
+ "LT",
+ "ST"
+ ],
+ "type": "string",
+ "x-massive-go-field-tags": {
+ "tags": [
+ {
+ "key": "binding",
+ "value": "required"
+ }
+ ]
}
- },
- "description": "A list of quotes."
- }
- },
- "summary": "Quotes (BBO)",
- "tags": [
- "fx:quotes"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Forex data",
- "name": "fx"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
+ }
},
- "order": {
- "default": "desc"
+ {
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.gte",
+ "schema": {
+ "type": "string"
+ }
},
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Historic Forex Ticks",
- "path": "get_v1_historic_forex__from___to___date"
- }
- }
- },
- "x-polygon-ignore": true
- },
- "/v3/quotes/{optionsTicker}": {
- "get": {
- "description": "Get quotes for an options ticker symbol in a given time range.",
- "operationId": "QuotesOptions",
- "parameters": [
{
- "description": "The ticker symbol to get quotes for.",
- "example": "O:SPY241220P00720000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
+ "description": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.gt",
"schema": {
"type": "string"
- },
- "x-polygon-go-id": "Ticker"
+ }
},
{
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "timestamp",
+ "name": "ticker.lte",
"schema": {
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "timestamp.gte",
+ "name": "ticker.lt",
"schema": {
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
- "name": "timestamp.gt",
+ "name": "ex_dividend_date.gte",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
- "name": "timestamp.lte",
+ "name": "ex_dividend_date.gt",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
- "name": "timestamp.lt",
+ "name": "ex_dividend_date.lte",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Order results based on the `sort` field.",
+ "description": "Range by ex_dividend_date.",
"in": "query",
- "name": "order",
+ "name": "ex_dividend_date.lt",
"schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
+ "format": "date",
"type": "string"
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Range by record_date.",
"in": "query",
- "name": "limit",
+ "name": "record_date.gte",
"schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
+ "format": "date",
+ "type": "string"
}
},
{
- "description": "Sort field used for ordering.",
+ "description": "Range by record_date.",
"in": "query",
- "name": "sort",
+ "name": "record_date.gt",
"schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
+ "format": "date",
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/quotes/O:SPY241220P00720000?cursor=YXA9NzY5Nzg0NzAxJmFzPSZsaW1pdD0xMCZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5sdGU9MjAyMi0wMi0xN1QxNyUzQTI1JTNBMTMuMDA5MzU2MDMyWg",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "ask_exchange": 323,
- "ask_price": 282,
- "ask_size": 10,
- "bid_exchange": 316,
- "bid_price": 277.5,
- "bid_size": 1,
- "sequence_number": 789539218,
- "sip_timestamp": 1645119125346243600
- },
- {
- "ask_exchange": 301,
- "ask_price": 282,
- "ask_size": 1,
- "bid_exchange": 323,
- "bid_price": 277.5,
- "bid_size": 10,
- "sequence_number": 788994206,
- "sip_timestamp": 1645119118474271000
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "ask_exchange": {
- "description": "The ask exchange ID",
- "type": "integer"
- },
- "ask_price": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
- "format": "double",
- "type": "number"
- },
- "bid_exchange": {
- "description": "The bid exchange ID",
- "type": "integer"
- },
- "bid_price": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
- "format": "double",
- "type": "number"
- },
- "sequence_number": {
- "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).",
- "format": "int64",
- "type": "integer"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,sequence_number,sip_timestamp\n323,282,10,316,277.5,1,789539218,1645119125346243600\n301,282,1,323,277.5,10,788994206,1645119118474271000\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "A list of quotes."
- }
- },
- "summary": "Quotes",
- "tags": [
- "options:quotes"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
},
- "order": {
- "default": "desc"
+ {
+ "description": "Range by record_date.",
+ "in": "query",
+ "name": "record_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
},
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- }
- },
- "x-polygon-ignore": true
- },
- "/v3/quotes/{stockTicker}": {
- "get": {
- "description": "Get NBBO quotes for a ticker symbol in a given time range.",
- "operationId": "Quotes",
- "parameters": [
{
- "description": "The ticker symbol to get quotes for.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
+ "description": "Range by record_date.",
+ "in": "query",
+ "name": "record_date.lt",
"schema": {
+ "format": "date",
"type": "string"
- },
- "x-polygon-go-id": "Ticker"
+ }
},
{
- "description": "Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "description": "Range by declaration_date.",
"in": "query",
- "name": "timestamp",
+ "name": "declaration_date.gte",
"schema": {
+ "format": "date",
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by declaration_date.",
"in": "query",
- "name": "timestamp.gte",
+ "name": "declaration_date.gt",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by declaration_date.",
"in": "query",
- "name": "timestamp.gt",
+ "name": "declaration_date.lte",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by declaration_date.",
"in": "query",
- "name": "timestamp.lte",
+ "name": "declaration_date.lt",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by pay_date.",
"in": "query",
- "name": "timestamp.lt",
+ "name": "pay_date.gte",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Order results based on the `sort` field.",
+ "description": "Range by pay_date.",
"in": "query",
- "name": "order",
+ "name": "pay_date.gt",
"schema": {
- "default": "desc",
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
+ "format": "date",
"type": "string"
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Range by pay_date.",
"in": "query",
- "name": "limit",
+ "name": "pay_date.lte",
"schema": {
- "default": 10,
- "example": 10,
- "maximum": 50000,
- "minimum": 1,
- "type": "integer"
+ "format": "date",
+ "type": "string"
}
},
{
- "description": "Sort field used for ordering.",
+ "description": "Range by pay_date.",
"in": "query",
- "name": "sort",
+ "name": "pay_date.lt",
"schema": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ],
- "example": "timestamp",
+ "format": "date",
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "next_url": "https://api.polygon.io/v3/quotes/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
- "results": [
- {
- "ask_exchange": 0,
- "ask_price": 0,
- "ask_size": 0,
- "bid_exchange": 11,
- "bid_price": 102.7,
- "bid_size": 60,
- "conditions": [
- 1
- ],
- "participant_timestamp": 1517562000065321200,
- "sequence_number": 2060,
- "sip_timestamp": 1517562000065700400,
- "tape": 3
- },
- {
- "ask_exchange": 0,
- "ask_price": 0,
- "ask_size": 0,
- "bid_exchange": 11,
- "bid_price": 170,
- "bid_size": 2,
- "conditions": [
- 1
- ],
- "participant_timestamp": 1517562000065408300,
- "sequence_number": 2061,
- "sip_timestamp": 1517562000065791500,
- "tape": 3
- }
- ],
- "status": "OK"
- },
- "schema": {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "ask_exchange": {
- "description": "The ask exchange ID",
- "type": "integer"
- },
- "ask_price": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
- "format": "double",
- "type": "number"
- },
- "bid_exchange": {
- "description": "The bid exchange ID",
- "type": "integer"
- },
- "bid_price": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
- "format": "double",
- "type": "number"
- },
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-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).",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
- },
- "participant_timestamp": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the quote was actually generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "sequence_number": {
- "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
- "format": "int64",
- "type": "integer"
- },
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this quote from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "tape": {
- "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
- "format": "int32",
- "type": "integer"
- },
- "trf_timestamp": {
- "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this quote.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- }
- },
- "type": "object"
- },
- "type": "array"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "example": "ask_exchange,ask_price,ask_size,bid_exchange,bid_price,bid_size,conditions,participant_timestamp,sequence_number,sip_timestamp,tape\n0,0,0,11,102.7,60,1,1517562000065321216,2060,1517562000065700260,3\n0,0,0,11,170,2,1,1517562000065408256,2061,1517562000065791515,3\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "A list of quotes."
- }
- },
- "summary": "Quotes (NBBO)",
- "tags": [
- "stocks:quotes"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "NBBO data",
- "name": "nbbo"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
- },
- "x-polygon-paginate": {
- "limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
},
- "sort": {
- "default": "timestamp",
- "enum": [
- "timestamp"
- ]
- }
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Quotes (NBBO)",
- "path": "get_v2_ticks_stocks_nbbo__ticker___date"
- }
- }
- }
- },
- "/v3/reference/conditions": {
- "get": {
- "description": "List all conditions that Polygon.io uses.",
- "operationId": "ListConditions",
- "parameters": [
{
- "description": "Filter for conditions within a given asset class.",
+ "description": "Range by cash_amount.",
"in": "query",
- "name": "asset_class",
+ "name": "cash_amount.gte",
"schema": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
- ],
- "example": "stocks",
- "type": "string"
+ "type": "number"
}
},
{
- "description": "Filter by data type.",
+ "description": "Range by cash_amount.",
"in": "query",
- "name": "data_type",
- "schema": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
+ "name": "cash_amount.gt",
+ "schema": {
+ "type": "number"
}
},
{
- "description": "Filter for conditions with a given ID.",
+ "description": "Range by cash_amount.",
"in": "query",
- "name": "id",
+ "name": "cash_amount.lte",
"schema": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
- "example": 1,
- "type": "integer"
+ "type": "number"
}
},
{
- "description": "Filter by SIP. If the condition contains a mapping for that SIP, the condition will be returned.",
+ "description": "Range by cash_amount.",
"in": "query",
- "name": "sip",
+ "name": "cash_amount.lt",
"schema": {
- "description": "One of the SIPs.",
- "enum": [
- "CTA",
- "UTP",
- "OPRA"
- ],
- "example": "CTA",
- "type": "string"
+ "type": "number"
}
},
{
@@ -19671,16 +24686,16 @@
"in": "query",
"name": "sort",
"schema": {
- "default": "asset_class",
+ "default": "ex_dividend_date",
"enum": [
- "asset_class",
- "id",
- "type",
- "name",
- "data_types",
- "legacy"
+ "ex_dividend_date",
+ "pay_date",
+ "declaration_date",
+ "record_date",
+ "cash_amount",
+ "ticker"
],
- "example": "asset_class",
+ "example": "ex_dividend_date",
"type": "string"
}
}
@@ -19690,232 +24705,243 @@
"content": {
"application/json": {
"schema": {
+ "description": "A list of dividends.",
"example": {
- "count": 1,
- "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "next_url": "https://api.massive.com/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"results": [
{
- "asset_class": "stocks",
- "data_types": [
- "trade"
- ],
- "id": 2,
- "name": "Average Price Trade",
- "sip_mapping": {
- "CTA": "B",
- "UTP": "W"
- },
- "type": "condition",
- "update_rules": {
- "consolidated": {
- "updates_high_low": false,
- "updates_open_close": false,
- "updates_volume": true
- },
- "market_center": {
- "updates_high_low": false,
- "updates_open_close": false,
- "updates_volume": true
- }
- }
+ "cash_amount": 0.22,
+ "declaration_date": "2021-10-28",
+ "dividend_type": "CD",
+ "ex_dividend_date": "2021-11-05",
+ "frequency": 4,
+ "id": "E8e3c4f794613e9205e2f178a36c53fcc57cdabb55e1988c87b33f9e52e221444",
+ "pay_date": "2021-11-11",
+ "record_date": "2021-11-08",
+ "ticker": "AAPL"
+ },
+ {
+ "cash_amount": 0.22,
+ "declaration_date": "2021-07-27",
+ "dividend_type": "CD",
+ "ex_dividend_date": "2021-08-06",
+ "frequency": 4,
+ "id": "E6436c5475706773f03490acf0b63fdb90b2c72bfeed329a6eb4afc080acd80ae",
+ "pay_date": "2021-08-12",
+ "record_date": "2021-08-09",
+ "ticker": "AAPL"
}
],
"status": "OK"
},
"properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
"next_url": {
"description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
"request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
"type": "string"
},
"results": {
- "description": "An array of conditions that match your query.",
"items": {
- "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
"properties": {
- "abbreviation": {
- "description": "A commonly-used abbreviation for this condition.",
- "type": "string"
- },
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
- ],
- "example": "stocks",
- "type": "string"
- },
- "data_types": {
- "description": "Data types that this condition applies to.",
- "items": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
- },
- "type": "array"
- },
- "description": {
- "description": "A short description of the semantics of this condition.",
- "type": "string"
- },
- "exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
- "type": "integer"
- },
- "id": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
- "example": 1,
- "type": "integer"
+ "cash_amount": {
+ "description": "The cash amount of the dividend per share owned.",
+ "type": "number",
+ "x-massive-go-field-tags": {
+ "tags": [
+ {
+ "key": "binding",
+ "value": "required"
+ }
+ ]
+ }
},
- "legacy": {
- "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
- "type": "boolean"
+ "currency": {
+ "description": "The currency in which the dividend is paid.",
+ "type": "string",
+ "x-massive-go-field-tags": {
+ "tags": [
+ {
+ "key": "binding",
+ "value": "required"
+ }
+ ]
+ }
},
- "name": {
- "description": "The name of this condition.",
- "example": "Acquisition",
+ "declaration_date": {
+ "description": "The date that the dividend was announced.",
"type": "string"
},
- "sip_mapping": {
- "description": "A mapping to a symbol for each SIP that has this condition.",
- "properties": {
- "CTA": {
- "type": "string"
- },
- "OPRA": {
- "type": "string"
- },
- "UTP": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": {
- "description": "An identifier for a collection of related conditions.",
+ "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": [
- "sale_condition",
- "quote_condition",
- "sip_generated_flag",
- "financial_status_indicator",
- "short_sale_restriction_indicator",
- "settlement_condition",
- "market_condition",
- "trade_thru_exempt"
+ "CD",
+ "SC",
+ "LT",
+ "ST"
],
- "type": "string"
+ "type": "string",
+ "x-massive-go-field-tags": {
+ "tags": [
+ {
+ "key": "binding",
+ "value": "required"
+ }
+ ]
+ }
},
- "update_rules": {
- "description": "A list of aggregation rules.",
- "properties": {
- "consolidated": {
- "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- },
- "market_center": {
- "description": "Describes aggregation rules on a per-market-center basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- }
- },
- "required": [
- "consolidated",
- "market_center"
- ],
- "type": "object"
+ "ex_dividend_date": {
+ "description": "The date that the stock first trades without the dividend, determined by the exchange.",
+ "type": "string",
+ "x-massive-go-field-tags": {
+ "tags": [
+ {
+ "key": "binding",
+ "value": "required"
+ }
+ ]
+ }
+ },
+ "frequency": {
+ "description": "The number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
+ "type": "integer",
+ "x-massive-go-field-tags": {
+ "tags": [
+ {
+ "key": "binding",
+ "value": "required"
+ }
+ ]
+ }
+ },
+ "id": {
+ "description": "The unique identifier of the dividend.",
+ "type": "string"
+ },
+ "pay_date": {
+ "description": "The date that the dividend is paid out.",
+ "type": "string"
+ },
+ "record_date": {
+ "description": "The date that the stock must be held to receive the dividend, set by the company.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The ticker symbol of the dividend.",
+ "type": "string",
+ "x-massive-go-field-tags": {
+ "tags": [
+ {
+ "key": "binding",
+ "value": "required"
+ }
+ ]
+ }
}
},
"required": [
- "id",
- "type",
- "name",
- "asset_class",
- "sip_mapping",
- "data_types"
+ "ticker",
+ "ex_dividend_date",
+ "frequency",
+ "cash_amount",
+ "dividend_type",
+ "id"
],
- "type": "object"
+ "type": "object",
+ "x-massive-go-struct-tags": {
+ "tags": [
+ "db"
+ ]
+ }
},
"type": "array"
},
"status": {
- "description": "The status of this request's response.",
- "example": "OK",
"type": "string"
}
},
"required": [
- "status",
- "request_id",
- "count",
- "results"
+ "request_id"
],
"type": "object"
}
},
"text/csv": {
- "example": "id,type,abbreviation,name,description,asset_class,sip_mapping,exchange,consolidated_updates_high_low,consolidated_updates_open_close,consolidated_updates_volume,market_center_updates_high_low,market_center_updates_open_close,market_center_updates_volume,data_types,legacy\n0,regular,,Regular Trade,,crypto,null,0,,,,,,,trade,false\n1,buy_or_sell_side,,Sell Side,The asset was sold at the prevailing best bid price on an exchange.,crypto,null,0,,,,,,,trade,false\n2,buy_or_sell_side,,Buy Side,The asset was bought at the prevailing best ask price on an exchange.,crypto,null,0,,,,,,,trade,false\n",
"schema": {
+ "example": "ticker,declaration_date,ex_dividend_date,record_date,pay_date,frequency,cash_amount,dividend_type\nAAPL,2021-10-28,2021-11-05,2021-11-08,2021-11-11,4,0.22,CD\nAAPL,2021-07-27,2021-08-06,2021-08-09,2021-08-12,4,0.22,CD\n",
"type": "string"
}
}
},
"description": "OK"
+ }
+ },
+ "summary": "Dividends v3",
+ "tags": [
+ "reference:dividends"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
},
- "400": {
+ "sort": {
+ "default": "ex_dividend_date",
+ "enum": [
+ "ex_dividend_date",
+ "pay_date",
+ "declaration_date",
+ "record_date",
+ "cash_amount",
+ "ticker"
+ ]
+ }
+ }
+ }
+ },
+ "/v3/reference/exchanges": {
+ "get": {
+ "description": "List all exchanges that Massive.com knows about.",
+ "operationId": "ListExchanges",
+ "parameters": [
+ {
+ "description": "Filter by asset class.",
+ "in": "query",
+ "name": "asset_class",
+ "schema": {
+ "description": "An identifier for a group of similar financial instruments.",
+ "enum": [
+ "stocks",
+ "options",
+ "crypto",
+ "fx"
+ ],
+ "example": "stocks",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Filter by locale.",
+ "in": "query",
+ "name": "locale",
+ "schema": {
+ "description": "An identifier for a geographical location.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "example": "us",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
"content": {
"application/json": {
"schema": {
@@ -19925,22 +24951,18 @@
"example": 1,
"type": "integer"
},
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
"request_id": {
"description": "A request ID assigned by the server.",
"example": "31d59dda-80e5-4721-8496-d0d32a654afe",
"type": "string"
},
"results": {
- "description": "An array of conditions that match your query.",
"items": {
- "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
+ "description": "An entity that reports trades.",
"properties": {
- "abbreviation": {
- "description": "A commonly-used abbreviation for this condition.",
+ "acronym": {
+ "description": "A commonly used abbreviation for this exchange.",
+ "example": "AMEX",
"type": "string"
},
"asset_class": {
@@ -19954,135 +24976,62 @@
"example": "stocks",
"type": "string"
},
- "data_types": {
- "description": "Data types that this condition applies to.",
- "items": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
- },
- "type": "array"
- },
- "description": {
- "description": "A short description of the semantics of this condition.",
- "type": "string"
- },
- "exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
- "type": "integer"
- },
"id": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
+ "description": "A unique identifier used by Massive.com for this exchange.",
"example": 1,
"type": "integer"
},
- "legacy": {
- "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
- "type": "boolean"
- },
- "name": {
- "description": "The name of this condition.",
- "example": "Acquisition",
- "type": "string"
- },
- "sip_mapping": {
- "description": "A mapping to a symbol for each SIP that has this condition.",
- "properties": {
- "CTA": {
- "type": "string"
- },
- "OPRA": {
- "type": "string"
- },
- "UTP": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": {
- "description": "An identifier for a collection of related conditions.",
+ "locale": {
+ "description": "An identifier for a geographical location.",
"enum": [
- "sale_condition",
- "quote_condition",
- "sip_generated_flag",
- "financial_status_indicator",
- "short_sale_restriction_indicator",
- "settlement_condition",
- "market_condition",
- "trade_thru_exempt"
+ "us",
+ "global"
],
+ "example": "us",
"type": "string"
},
- "update_rules": {
- "description": "A list of aggregation rules.",
- "properties": {
- "consolidated": {
- "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- },
- "market_center": {
- "description": "Describes aggregation rules on a per-market-center basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
- },
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- }
- },
- "required": [
- "consolidated",
- "market_center"
+ "mic": {
+ "description": "The Market Identifier Code of this exchange (see ISO 10383).",
+ "example": "XASE",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of this exchange.",
+ "example": "NYSE American, LLC",
+ "type": "string"
+ },
+ "operating_mic": {
+ "description": "The MIC of the entity that operates this exchange.",
+ "example": "XNYS",
+ "type": "string"
+ },
+ "participant_id": {
+ "description": "The ID used by SIP's to represent this exchange.",
+ "example": "A",
+ "type": "string"
+ },
+ "type": {
+ "description": "Represents the type of exchange.",
+ "enum": [
+ "exchange",
+ "TRF",
+ "SIP"
],
- "type": "object"
+ "example": "exchange",
+ "type": "string"
+ },
+ "url": {
+ "description": "A link to this exchange's website, if one exists.",
+ "example": "https://www.nyse.com/markets/nyse-american",
+ "type": "string"
}
},
"required": [
"id",
"type",
- "name",
"asset_class",
- "sip_mapping",
- "data_types"
+ "locale",
+ "name"
],
"type": "object"
},
@@ -20096,9 +25045,44 @@
},
"required": [
"status",
- "request_id",
- "count",
- "results"
+ "request_id"
+ ],
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "id,type,asset_class,locale,name,acronym,mic,operating_mic,participant_id,url\n1,exchange,stocks,us,\"NYSE American, LLC\",AMEX,XASE,XNYS,65,https://www.nyse.com/markets/nyse-american\n2,exchange,stocks,us,\"Nasdaq OMX BX, Inc.\",,XBOS,XNAS,66,https://www.nasdaq.com/solutions/nasdaq-bx-stock-market\n3,exchange,stocks,us,\"NYSE National, Inc.\",NSX,XCIS,XNYS,67,https://www.nyse.com/markets/nyse-national\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "OK"
+ },
+ "400": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
],
"type": "object"
}
@@ -20106,346 +25090,656 @@
},
"description": "a query parameter was malformed"
},
- "default": {
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "an unknown error occurred"
+ }
+ },
+ "summary": "Exchanges",
+ "tags": [
+ "reference:exchanges"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/options/contracts": {
+ "get": {
+ "description": "Query for historical options contracts. This provides both active and expired options contracts.",
+ "operationId": "ListOptionsContracts",
+ "parameters": [
+ {
+ "description": "This parameter has been deprecated. To search by specific options ticker, use the Options Contract endpoint [here](https://massive.com/docs/options/get_v3_reference_options_contracts__options_ticker).",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query for contracts relating to an underlying stock ticker.",
+ "in": "query",
+ "name": "underlying_ticker",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by the type of contract.",
+ "in": "query",
+ "name": "contract_type",
+ "schema": {
+ "enum": [
+ "call",
+ "put"
+ ],
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by contract expiration with date format YYYY-MM-DD.",
+ "in": "query",
+ "name": "expiration_date",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
+ }
+ },
+ {
+ "description": "Specify a point in time for contracts as of this date with format YYYY-MM-DD. Defaults to today's date.",
+ "in": "query",
+ "name": "as_of",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by strike price of a contract.",
+ "in": "query",
+ "name": "strike_price",
+ "schema": {
+ "type": "number"
+ },
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "number"
+ }
+ },
+ {
+ "description": "Query for expired contracts. Default is false.",
+ "in": "query",
+ "name": "expired",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "description": "Range by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by underlying_ticker.",
+ "in": "query",
+ "name": "underlying_ticker.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by expiration_date.",
+ "in": "query",
+ "name": "expiration_date.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by strike_price.",
+ "in": "query",
+ "name": "strike_price.gte",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Range by strike_price.",
+ "in": "query",
+ "name": "strike_price.gt",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Range by strike_price.",
+ "in": "query",
+ "name": "strike_price.lte",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Range by strike_price.",
+ "in": "query",
+ "name": "strike_price.lt",
+ "schema": {
+ "type": "number"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "underlying_ticker",
+ "expiration_date",
+ "strike_price"
+ ],
+ "example": "ticker",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
"content": {
"application/json": {
+ "example": {
+ "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
+ "results": [
+ {
+ "cfi": "OCASPS",
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2021-11-19",
+ "primary_exchange": "BATO",
+ "shares_per_contract": 100,
+ "strike_price": 85,
+ "ticker": "O:AAPL211119C00085000",
+ "underlying_ticker": "AAPL"
+ },
+ {
+ "additional_underlyings": [
+ {
+ "amount": 44,
+ "type": "equity",
+ "underlying": "VMW"
+ },
+ {
+ "amount": 6.53,
+ "type": "currency",
+ "underlying": "USD"
+ }
+ ],
+ "cfi": "OCASPS",
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2021-11-19",
+ "primary_exchange": "BATO",
+ "shares_per_contract": 100,
+ "strike_price": 90,
+ "ticker": "O:AAPL211119C00090000",
+ "underlying_ticker": "AAPL"
+ }
+ ],
+ "status": "OK"
+ },
"schema": {
"properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
"next_url": {
"description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
"request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
"type": "string"
},
"results": {
- "description": "An array of conditions that match your query.",
"items": {
- "description": "A condition generally refers to any extra information passed in a trade or a quote. These conditions\nmay or may not affect the behavior of aggregates.",
"properties": {
- "abbreviation": {
- "description": "A commonly-used abbreviation for this condition.",
- "type": "string"
- },
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
- ],
- "example": "stocks",
- "type": "string"
- },
- "data_types": {
- "description": "Data types that this condition applies to.",
+ "additional_underlyings": {
+ "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee here for some examples of what might cause a contract to have additional underlyings.",
"items": {
- "description": "The type of financial data represented by a data model.",
- "enum": [
- "trade",
- "bbo",
- "nbbo"
- ],
- "example": "trade",
- "type": "string"
- },
- "type": "array"
- },
- "description": {
- "description": "A short description of the semantics of this condition.",
- "type": "string"
- },
- "exchange": {
- "description": "If present, mapping this condition from a Polygon.io code to a SIP symbol depends on this attribute.\nIn other words, data with this condition attached comes exclusively from the given exchange.",
- "type": "integer"
- },
- "id": {
- "description": "An identifier used by Polygon.io for this condition. Unique per data type.",
- "example": 1,
- "type": "integer"
- },
- "legacy": {
- "description": "If true, this condition is from an old version of the SIPs' specs and no longer is used.\nOther conditions may or may not reuse the same symbol as this one.",
- "type": "boolean"
- },
- "name": {
- "description": "The name of this condition.",
- "example": "Acquisition",
- "type": "string"
- },
- "sip_mapping": {
- "description": "A mapping to a symbol for each SIP that has this condition.",
- "properties": {
- "CTA": {
- "type": "string"
- },
- "OPRA": {
- "type": "string"
- },
- "UTP": {
- "type": "string"
- }
- },
- "type": "object"
- },
- "type": {
- "description": "An identifier for a collection of related conditions.",
- "enum": [
- "sale_condition",
- "quote_condition",
- "sip_generated_flag",
- "financial_status_indicator",
- "short_sale_restriction_indicator",
- "settlement_condition",
- "market_condition",
- "trade_thru_exempt"
- ],
- "type": "string"
- },
- "update_rules": {
- "description": "A list of aggregation rules.",
- "properties": {
- "consolidated": {
- "description": "Describes aggregation rules on a consolidated (all exchanges) basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
+ "properties": {
+ "amount": {
+ "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
+ "type": "number"
},
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
- },
- "market_center": {
- "description": "Describes aggregation rules on a per-market-center basis.",
- "properties": {
- "updates_high_low": {
- "description": "Whether or not trades with this condition update the high/low.",
- "type": "boolean"
- },
- "updates_open_close": {
- "description": "Whether or not trades with this condition update the open/close.",
- "type": "boolean"
- },
- "updates_volume": {
- "description": "Whether or not trades with this condition update the volume.",
- "type": "boolean"
- }
+ "type": {
+ "description": "The type of the additional underlying asset, either equity or currency.",
+ "type": "string"
},
- "required": [
- "updates_high_low",
- "updates_open_close",
- "updates_volume"
- ],
- "type": "object"
+ "underlying": {
+ "description": "The name of the additional underlying asset.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "AdditionalUnderlying"
}
},
- "required": [
- "consolidated",
- "market_center"
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "AdditionalUnderlyings"
+ }
+ },
+ "cfi": {
+ "description": "The 6 letter CFI code of the contract (defined in ISO 10962)",
+ "type": "string"
+ },
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "type": "string"
+ },
+ "correction": {
+ "description": "The correction number for this option contract.",
+ "type": "integer"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See this link for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
],
- "type": "object"
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "type": "string",
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "primary_exchange": {
+ "description": "The MIC code of the primary exchange that this contract is listed on.",
+ "type": "string"
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker for the option contract.",
+ "type": "string"
+ },
+ "underlying_ticker": {
+ "description": "The underlying ticker that the option contract relates to.",
+ "type": "string"
}
},
- "required": [
- "id",
- "type",
- "name",
- "asset_class",
- "sip_mapping",
- "data_types"
- ],
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "OptionsContract"
+ }
},
"type": "array"
},
"status": {
- "description": "The status of this request's response.",
- "example": "OK",
"type": "string"
}
},
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
"type": "object"
}
+ },
+ "text/csv": {
+ "schema": {
+ "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,85,O:AAPL211119C00085000,AAPL,\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n",
+ "type": "string"
+ }
}
},
- "description": "an unknown error occurred"
+ "description": "A list of options contracts"
}
},
- "summary": "Conditions",
+ "summary": "Options Contracts",
"tags": [
- "reference:conditions"
+ "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
},
"sort": {
- "default": "asset_class",
+ "default": "ticker",
"enum": [
- "asset_class",
- "id",
- "type",
- "name",
- "data_types",
- "legacy"
+ "ticker",
+ "underlying_ticker",
+ "expiration_date",
+ "strike_price"
]
}
}
}
},
- "/v3/reference/dividends": {
+ "/v3/reference/options/contracts/{options_ticker}": {
"get": {
- "description": "Get a list of historical cash dividends, including the ticker symbol,\ndeclaration date, ex-dividend date, record date, pay date, frequency,\nand amount.",
- "operationId": "ListDividends",
+ "description": "Get an options contract",
+ "operationId": "GetOptionsContract",
"parameters": [
{
- "description": "Return the dividends that contain this ticker.",
- "in": "query",
- "name": "ticker",
+ "description": "Query for a contract by options ticker. You can learn more about the structure of options tickers [here](https://massive.com/blog/how-to-read-a-stock-options-ticker/).",
+ "example": "O:SPY251219C00650000",
+ "in": "path",
+ "name": "options_ticker",
+ "required": true,
"schema": {
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
}
},
{
- "description": "Query by ex-dividend date with the format YYYY-MM-DD.",
+ "description": "Specify a point in time for the contract as of this date with format YYYY-MM-DD. Defaults to today's date.",
"in": "query",
- "name": "ex_dividend_date",
+ "name": "as_of",
"schema": {
- "format": "date",
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
"type": "string"
}
- },
- {
- "description": "Query by record date with the format YYYY-MM-DD.",
- "in": "query",
- "name": "record_date",
- "schema": {
- "format": "date",
- "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
+ "results": {
+ "additional_underlyings": [
+ {
+ "amount": 44,
+ "type": "equity",
+ "underlying": "VMW"
+ },
+ {
+ "amount": 6.53,
+ "type": "currency",
+ "underlying": "USD"
+ }
+ ],
+ "cfi": "OCASPS",
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2021-11-19",
+ "primary_exchange": "BATO",
+ "shares_per_contract": 100,
+ "strike_price": 85,
+ "ticker": "O:AAPL211119C00085000",
+ "underlying_ticker": "AAPL"
+ },
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "properties": {
+ "additional_underlyings": {
+ "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee here for some examples of what might cause a contract to have additional underlyings.",
+ "items": {
+ "properties": {
+ "amount": {
+ "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
+ "type": "number"
+ },
+ "type": {
+ "description": "The type of the additional underlying asset, either equity or currency.",
+ "type": "string"
+ },
+ "underlying": {
+ "description": "The name of the additional underlying asset.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "AdditionalUnderlying"
+ }
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "AdditionalUnderlyings"
+ }
+ },
+ "cfi": {
+ "description": "The 6 letter CFI code of the contract (defined in ISO 10962)",
+ "type": "string"
+ },
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "type": "string"
+ },
+ "correction": {
+ "description": "The correction number for this option contract.",
+ "type": "integer"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See this link for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "type": "string",
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "primary_exchange": {
+ "description": "The MIC code of the primary exchange that this contract is listed on.",
+ "type": "string"
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker for the option contract.",
+ "type": "string"
+ },
+ "underlying_ticker": {
+ "description": "The underlying ticker that the option contract relates to.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "OptionsContract"
+ }
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "schema": {
+ "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n",
+ "type": "string"
+ }
+ }
},
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
- }
- },
+ "description": "A specific options contract"
+ }
+ },
+ "summary": "Options Contract",
+ "tags": [
+ "reference:options:contract"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/splits": {
+ "get": {
+ "description": "Get a list of historical stock splits, including the ticker symbol, the execution date, and the factors of the split ratio.",
+ "operationId": "ListStockSplits",
+ "parameters": [
{
- "description": "Query by declaration date with the format YYYY-MM-DD.",
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
"in": "query",
- "name": "declaration_date",
+ "name": "ticker",
"schema": {
- "format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
},
{
- "description": "Query by pay date with the format YYYY-MM-DD.",
+ "description": "Query by execution date with the format YYYY-MM-DD.",
"in": "query",
- "name": "pay_date",
+ "name": "execution_date",
"schema": {
"format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
},
{
- "description": "Query by the number of times per year the dividend is paid out. Possible values are 0 (one-time), 1 (annually), 2 (bi-annually), 4 (quarterly), and 12 (monthly).",
- "in": "query",
- "name": "frequency",
- "schema": {
- "enum": [
- 0,
- 1,
- 2,
- 4,
- 12
- ],
- "type": "integer"
- }
- },
- {
- "description": "Query by the cash amount of the dividend.",
- "in": "query",
- "name": "cash_amount",
- "schema": {
- "type": "number"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "number"
- }
- },
- {
- "description": "Query by the type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.",
+ "description": "Query for reverse stock splits. A split ratio where split_from is greater than split_to represents a reverse split. By default this filter is not used.",
"in": "query",
- "name": "dividend_type",
+ "name": "reverse_split",
"schema": {
- "description": "The type of dividend. Dividends that have been paid and/or are expected to be paid on consistent schedules are denoted as CD.\nSpecial Cash dividends that have been paid that are infrequent or unusual, and/or can not be expected to occur in the future are denoted as SC.\nLong-Term and Short-Term capital gain distributions are denoted as LT and ST, respectively.",
- "enum": [
- "CD",
- "SC",
- "LT",
- "ST"
- ],
- "type": "string",
- "x-polygon-go-field-tags": {
- "tags": [
- {
- "key": "binding",
- "value": "required"
- }
- ]
- }
+ "nullable": true,
+ "type": "boolean"
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gte",
"schema": {
@@ -20453,7 +25747,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gt",
"schema": {
@@ -20461,7 +25755,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lte",
"schema": {
@@ -20469,7 +25763,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lt",
"schema": {
@@ -20477,768 +25771,576 @@
}
},
{
- "description": "Search by ex_dividend_date.",
- "in": "query",
- "name": "ex_dividend_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by ex_dividend_date.",
+ "description": "Range by execution_date.",
"in": "query",
- "name": "ex_dividend_date.gt",
+ "name": "execution_date.gte",
"schema": {
"format": "date",
"type": "string"
}
},
{
- "description": "Search by ex_dividend_date.",
+ "description": "Range by execution_date.",
"in": "query",
- "name": "ex_dividend_date.lte",
+ "name": "execution_date.gt",
"schema": {
"format": "date",
"type": "string"
}
},
{
- "description": "Search by ex_dividend_date.",
+ "description": "Range by execution_date.",
"in": "query",
- "name": "ex_dividend_date.lt",
+ "name": "execution_date.lte",
"schema": {
"format": "date",
"type": "string"
}
},
{
- "description": "Search by record_date.",
+ "description": "Range by execution_date.",
"in": "query",
- "name": "record_date.gte",
+ "name": "execution_date.lt",
"schema": {
"format": "date",
"type": "string"
}
},
{
- "description": "Search by record_date.",
+ "description": "Order results based on the `sort` field.",
"in": "query",
- "name": "record_date.gt",
+ "name": "order",
"schema": {
- "format": "date",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
"type": "string"
}
},
{
- "description": "Search by record_date.",
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
"in": "query",
- "name": "record_date.lte",
+ "name": "limit",
"schema": {
- "format": "date",
- "type": "string"
+ "default": 10,
+ "example": 10,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
}
},
{
- "description": "Search by record_date.",
+ "description": "Sort field used for ordering.",
"in": "query",
- "name": "record_date.lt",
+ "name": "sort",
"schema": {
- "format": "date",
+ "default": "execution_date",
+ "enum": [
+ "execution_date",
+ "ticker"
+ ],
+ "example": "execution_date",
"type": "string"
}
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "next_url": "https://api.massive.com/v3/splits/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "results": [
+ {
+ "execution_date": "2020-08-31",
+ "id": "E36416cce743c3964c5da63e1ef1626c0aece30fb47302eea5a49c0055c04e8d0",
+ "split_from": 1,
+ "split_to": 4,
+ "ticker": "AAPL"
+ },
+ {
+ "execution_date": "2005-02-28",
+ "id": "E90a77bdf742661741ed7c8fc086415f0457c2816c45899d73aaa88bdc8ff6025",
+ "split_from": 1,
+ "split_to": 2,
+ "ticker": "AAPL"
+ }
+ ],
+ "status": "OK"
+ },
+ "schema": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "execution_date": {
+ "description": "The execution date of the stock split. On this date the stock split was applied.",
+ "type": "string"
+ },
+ "id": {
+ "description": "The unique identifier for this stock split.",
+ "type": "string"
+ },
+ "split_from": {
+ "description": "The second number in the split ratio.\n\nFor example: In a 2-for-1 split, split_from would be 1.",
+ "format": "float",
+ "type": "number"
+ },
+ "split_to": {
+ "description": "The first number in the split ratio.\n\nFor example: In a 2-for-1 split, split_to would be 2.",
+ "format": "float",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker symbol of the stock split.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "split_from",
+ "split_to",
+ "id",
+ "ticker",
+ "execution_date"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ },
+ "text/csv": {
+ "example": "ticker,execution_date,split_from,split_to\nAAPL,2020-08-31,1.0,4.0\nAAPL,2005-02-28,1.0,2.0\n",
+ "schema": {
+ "type": "string"
+ }
+ }
+ },
+ "description": "A list of stock splits."
+ }
+ },
+ "summary": "Stock Splits v3",
+ "tags": [
+ "reference:stocks"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 1000
},
+ "sort": {
+ "default": "execution_date",
+ "enum": [
+ "execution_date",
+ "ticker"
+ ]
+ }
+ }
+ }
+ },
+ "/v3/reference/tickers": {
+ "get": {
+ "description": "Query all ticker symbols which are supported by Massive.com. This API currently includes Stocks/Equities, Indices, Forex, and Crypto.",
+ "operationId": "ListTickers",
+ "parameters": [
{
- "description": "Search by declaration_date.",
+ "description": "Specify a ticker symbol.\nDefaults to empty string which queries all tickers.",
"in": "query",
- "name": "declaration_date.gte",
+ "name": "ticker",
"schema": {
- "format": "date",
"type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
}
},
{
- "description": "Search by declaration_date.",
+ "description": "Specify the type of the tickers. Find the types that we support via our [Ticker Types API](https://massive.com/docs/stocks/get_v3_reference_tickers_types).\nDefaults to empty string which queries all types.",
"in": "query",
- "name": "declaration_date.gt",
+ "name": "type",
"schema": {
- "format": "date",
+ "enum": [
+ "CS",
+ "ADRC",
+ "ADRP",
+ "ADRR",
+ "UNIT",
+ "RIGHT",
+ "PFD",
+ "FUND",
+ "SP",
+ "WARRANT",
+ "INDEX",
+ "ETF",
+ "ETN",
+ "OS",
+ "GDR",
+ "OTHER",
+ "NYRS",
+ "AGEN",
+ "EQLK",
+ "BOND",
+ "ADRW",
+ "BASKET",
+ "LT"
+ ],
"type": "string"
}
},
{
- "description": "Search by declaration_date.",
+ "description": "Filter by market type. By default all markets are included.",
"in": "query",
- "name": "declaration_date.lte",
+ "name": "market",
"schema": {
- "format": "date",
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc",
+ "indices"
+ ],
"type": "string"
}
},
{
- "description": "Search by declaration_date.",
+ "description": "Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes [at the ISO org website](https://www.iso20022.org/market-identifier-codes).\nDefaults to empty string which queries all exchanges.",
"in": "query",
- "name": "declaration_date.lt",
+ "name": "exchange",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by pay_date.",
+ "description": "Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes [at their website](https://www.cusip.com/identifiers.html#/CUSIP).\nDefaults to empty string which queries all CUSIPs.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.",
"in": "query",
- "name": "pay_date.gte",
+ "name": "cusip",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by pay_date.",
+ "description": "Specify the CIK of the asset you want to search for. Find more information about CIK codes [at their website](https://www.sec.gov/edgar/searchedgar/cik.htm).\nDefaults to empty string which queries all CIKs.",
"in": "query",
- "name": "pay_date.gt",
+ "name": "cik",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by pay_date.",
+ "description": "Specify a point in time to retrieve tickers available on that date.\nDefaults to the most recent available date.",
"in": "query",
- "name": "pay_date.lte",
+ "name": "date",
"schema": {
"format": "date",
"type": "string"
}
},
{
- "description": "Search by pay_date.",
+ "description": "Search for terms within the ticker and/or company name.",
"in": "query",
- "name": "pay_date.lt",
+ "name": "search",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by cash_amount.",
- "in": "query",
- "name": "cash_amount.gte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by cash_amount.",
- "in": "query",
- "name": "cash_amount.gt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by cash_amount.",
- "in": "query",
- "name": "cash_amount.lte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by cash_amount.",
+ "description": "Specify if the tickers returned should be actively traded on the queried date. Default is true.",
+ "example": true,
"in": "query",
- "name": "cash_amount.lt",
+ "name": "active",
"schema": {
- "type": "number"
+ "type": "boolean"
}
},
{
- "description": "Order results based on the `sort` field.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "order",
+ "name": "ticker.gte",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
"type": "string"
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
- "in": "query",
- "name": "limit",
- "schema": {
- "default": 10,
- "example": 10,
- "maximum": 1000,
- "minimum": 1,
- "type": "integer"
- }
- },
- {
- "description": "Sort field used for ordering.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "sort",
- "schema": {
- "default": "ex_dividend_date",
- "enum": [
- "ex_dividend_date",
- "pay_date",
- "declaration_date",
- "record_date",
- "cash_amount",
- "ticker"
- ],
- "example": "ex_dividend_date",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "description": "A list of dividends.",
- "example": {
- "next_url": "https://api.polygon.io/v3/reference/dividends/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "results": [
- {
- "cash_amount": 0.22,
- "declaration_date": "2021-10-28",
- "dividend_type": "CD",
- "ex_dividend_date": "2021-11-05",
- "frequency": 4,
- "pay_date": "2021-11-11",
- "record_date": "2021-11-08",
- "ticker": "AAPL"
- },
- {
- "cash_amount": 0.22,
- "declaration_date": "2021-07-27",
- "dividend_type": "CD",
- "ex_dividend_date": "2021-08-06",
- "frequency": 4,
- "pay_date": "2021-08-12",
- "record_date": "2021-08-09",
- "ticker": "AAPL"
- }
- ],
- "status": "OK"
- },
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
- "request_id": {
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "cash_amount": {
- "description": "The cash amount of the dividend per share owned.",
- "type": "number",
- "x-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"
- ]
- }
- },
- "type": "array"
- },
- "status": {
- "type": "string"
- }
- },
- "required": [
- "request_id"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "schema": {
- "example": "ticker,declaration_date,ex_dividend_date,record_date,pay_date,frequency,cash_amount,dividend_type\nAAPL,2021-10-28,2021-11-05,2021-11-08,2021-11-11,4,0.22,CD\nAAPL,2021-07-27,2021-08-06,2021-08-09,2021-08-12,4,0.22,CD\n",
- "type": "string"
- }
- }
- },
- "description": "OK"
- }
- },
- "summary": "Dividends v3",
- "tags": [
- "reference:dividends"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 1000
+ "name": "ticker.gt",
+ "schema": {
+ "type": "string"
+ }
},
- "sort": {
- "default": "ex_dividend_date",
- "enum": [
- "ex_dividend_date",
- "pay_date",
- "declaration_date",
- "record_date",
- "cash_amount",
- "ticker"
- ]
- }
- }
- },
- "post": {
- "description": "Manually add Polygon a dividend.",
- "operationId": "CreateDividend",
- "parameters": [
{
- "description": "If true don't trigger overlay",
+ "description": "Range by ticker.",
"in": "query",
- "name": "skip_overlay_trigger",
+ "name": "ticker.lte",
"schema": {
- "type": "boolean"
+ "type": "string"
}
- }
- ],
- "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": "Range by ticker.",
+ "in": "query",
+ "name": "ticker.lt",
+ "schema": {
+ "type": "string"
}
},
- "description": "Pass the desired dividend in the request body.",
- "required": true
- },
+ {
+ "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 100 and max is 1000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 100,
+ "example": 100,
+ "maximum": 1000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "name",
+ "market",
+ "locale",
+ "primary_exchange",
+ "type",
+ "currency_symbol",
+ "currency_name",
+ "base_currency_symbol",
+ "base_currency_name",
+ "cik",
+ "composite_figi",
+ "share_class_figi",
+ "last_updated_utc",
+ "delisted_utc"
+ ],
+ "example": "ticker",
+ "type": "string"
+ }
+ }
+ ],
"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"
+ "example": {
+ "count": 1,
+ "next_url": "https://api.massive.com/v3/reference/tickers?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "e70013d92930de90e089dc8fa098888e",
+ "results": [
+ {
+ "active": true,
+ "cik": "0001090872",
+ "composite_figi": "BBG000BWQYZ5",
+ "currency_name": "usd",
+ "last_updated_utc": "2021-04-25T00:00:00Z",
+ "locale": "us",
+ "market": "stocks",
+ "name": "Agilent Technologies Inc.",
+ "primary_exchange": "XNYS",
+ "share_class_figi": "BBG001SCTQY4",
+ "ticker": "A",
+ "type": "CS"
}
- },
- "required": [
- "request_id"
],
- "type": "object"
- }
- }
- },
- "description": "OK"
- },
- "400": {
- "content": {
- "application/json": {
+ "status": "OK"
+ },
"schema": {
"properties": {
- "error": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
"request_id": {
+ "description": "A request id assigned by the server.",
"type": "string"
},
+ "results": {
+ "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.",
+ "items": {
+ "properties": {
+ "active": {
+ "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
+ "type": "boolean"
+ },
+ "cik": {
+ "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
+ "type": "string"
+ },
+ "composite_figi": {
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)",
+ "type": "string"
+ },
+ "currency_name": {
+ "description": "The name of the currency that this asset is traded with.",
+ "type": "string"
+ },
+ "delisted_utc": {
+ "description": "The last date that the asset was traded.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "last_updated_utc": {
+ "description": "The information is accurate up to this time.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "locale": {
+ "description": "The locale of the asset.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "type": "string"
+ },
+ "market": {
+ "description": "The market type of the asset.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc",
+ "indices"
+ ],
+ "type": "string"
+ },
+ "name": {
+ "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.",
+ "type": "string"
+ },
+ "primary_exchange": {
+ "description": "The ISO code of the primary listing exchange for this asset.",
+ "type": "string"
+ },
+ "share_class_figi": {
+ "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "type": {
+ "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://massive.com/docs/stocks/get_v3_reference_tickers_types).",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "name",
+ "market",
+ "locale"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "ReferenceTicker",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ },
+ "type": "array"
+ },
"status": {
+ "description": "The status of this request's response.",
"type": "string"
}
},
- "required": [
- "request_id",
- "error"
- ],
"type": "object"
}
- }
- },
- "description": "the requested update was unable to be performed due to an invalid request body"
- },
- "409": {
- "content": {
- "application/json": {
+ },
+ "text/csv": {
+ "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,last_updated_utc\nA,Agilent Technologies Inc.,stocks,us,XNYS,CS,true,usd,0001090872,BBG000BWQYZ5,BBG001SCTQY4,2021-04-25T00:00:00Z\n",
"schema": {
- "properties": {
- "error": {
- "type": "string"
- },
- "request_id": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- },
- "required": [
- "request_id",
- "error"
- ],
- "type": "object"
+ "type": "string"
}
}
},
- "description": "a dividend already exists for this date and ticker"
+ "description": "Reference Tickers."
},
- "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"
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
}
},
- "summary": "Dividends v3",
+ "summary": "Tickers",
"tags": [
- "reference:stocks"
+ "reference:tickers:list"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 100,
+ "max": 1000
+ },
+ "sort": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "name",
+ "market",
+ "locale",
+ "primary_exchange",
+ "type",
+ "currency_symbol",
+ "currency_name",
+ "base_currency_symbol",
+ "base_currency_name",
+ "cik",
+ "composite_figi",
+ "share_class_figi",
+ "last_updated_utc",
+ "delisted_utc"
+ ]
+ }
}
}
},
- "/v3/reference/exchanges": {
+ "/v3/reference/tickers/types": {
"get": {
- "description": "List all exchanges that Polygon.io knows about.",
- "operationId": "ListExchanges",
+ "description": "List all ticker types that Massive.com has.",
+ "operationId": "ListTickerTypes",
"parameters": [
{
"description": "Filter by asset class.",
@@ -21250,7 +26352,8 @@
"stocks",
"options",
"crypto",
- "fx"
+ "fx",
+ "indices"
],
"example": "stocks",
"type": "string"
@@ -21289,28 +26392,29 @@
},
"results": {
"items": {
- "description": "An entity that reports trades.",
+ "description": "Describes the type of financial instrument represented by a ticker.",
"properties": {
- "acronym": {
- "description": "A commonly used abbreviation for this exchange.",
- "example": "AMEX",
- "type": "string"
- },
"asset_class": {
"description": "An identifier for a group of similar financial instruments.",
"enum": [
"stocks",
"options",
"crypto",
- "fx"
+ "fx",
+ "indices"
],
"example": "stocks",
"type": "string"
},
- "id": {
- "description": "A unique identifier used by Polygon.io for this exchange.",
- "example": 1,
- "type": "integer"
+ "code": {
+ "description": "A code used by Massive.com to refer to this ticker type.",
+ "example": "CS",
+ "type": "string"
+ },
+ "description": {
+ "description": "A short description of this ticker type.",
+ "example": "Common Stock",
+ "type": "string"
},
"locale": {
"description": "An identifier for a geographical location.",
@@ -21320,49 +26424,13 @@
],
"example": "us",
"type": "string"
- },
- "mic": {
- "description": "The Market Identifer Code of this exchange (see ISO 10383).",
- "example": "XASE",
- "type": "string"
- },
- "name": {
- "description": "Name of this exchange.",
- "example": "NYSE American, LLC",
- "type": "string"
- },
- "operating_mic": {
- "description": "The MIC of the entity that operates this exchange.",
- "example": "XNYS",
- "type": "string"
- },
- "participant_id": {
- "description": "The ID used by SIP's to represent this exchange.",
- "example": "A",
- "type": "string"
- },
- "type": {
- "description": "Represents the type of exchange.",
- "enum": [
- "exchange",
- "TRF",
- "SIP"
- ],
- "example": "exchange",
- "type": "string"
- },
- "url": {
- "description": "A link to this exchange's website, if one exists.",
- "example": "https://www.nyse.com/markets/nyse-american",
- "type": "string"
}
},
"required": [
- "id",
- "type",
+ "code",
+ "description",
"asset_class",
- "locale",
- "name"
+ "locale"
],
"type": "object"
},
@@ -21382,7 +26450,7 @@
}
},
"text/csv": {
- "example": "id,type,asset_class,locale,name,acronym,mic,operating_mic,participant_id,url\n1,exchange,stocks,us,\"NYSE American, LLC\",AMEX,XASE,XNYS,65,https://www.nyse.com/markets/nyse-american\n2,exchange,stocks,us,\"Nasdaq OMX BX, Inc.\",,XBOS,XNAS,66,https://www.nasdaq.com/solutions/nasdaq-bx-stock-market\n3,exchange,stocks,us,\"NYSE National, Inc.\",NSX,XCIS,XNYS,67,https://www.nyse.com/markets/nyse-national\n",
+ "example": "code,description,asset_class,locale\nCS,Common Stock,stocks,us\nPFD,Preferred Stock,stocks,us\n",
"schema": {
"type": "string"
}
@@ -21411,230 +26479,416 @@
"type": "string"
}
},
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "a query parameter was malformed"
- },
- "default": {
- "content": {
- "application/json": {
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "a query parameter was malformed"
+ },
+ "default": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "example": 1,
+ "type": "integer"
+ },
+ "request_id": {
+ "description": "A request ID assigned by the server.",
+ "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "type": "string"
+ },
+ "status": {
+ "description": "The status of this request's response.",
+ "example": "OK",
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "an unknown error occurred"
+ }
+ },
+ "summary": "Ticker Types",
+ "tags": [
+ "reference:tickers:types"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ }
+ }
+ },
+ "/v3/reference/tickers/{ticker}": {
+ "get": {
+ "description": "Get a single ticker supported by Massive.com. This response will have detailed information about the ticker and the company behind it.",
+ "operationId": "GetTicker",
+ "parameters": [
+ {
+ "description": "The ticker symbol of the asset.",
+ "example": "AAPL",
+ "in": "path",
+ "name": "ticker",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Specify a point in time to get information about the ticker available on that date.\nWhen retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing.\n\nFor example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on 2019-06-29.\nThat means that the filing was submitted on 2019-07-31, but the filing was created based on information from 2019-06-29.\nIf you were to query for AAPL details on 2019-06-29, the ticker details would include information from the SEC filing.\n\nDefaults to the most recent available date.",
+ "in": "query",
+ "name": "date",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "content": {
+ "application/json": {
+ "example": {
+ "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "results": {
+ "active": true,
+ "address": {
+ "address1": "One Apple Park Way",
+ "city": "Cupertino",
+ "postal_code": "95014",
+ "state": "CA"
+ },
+ "branding": {
+ "icon_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png",
+ "logo_url": "https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg"
+ },
+ "cik": "0000320193",
+ "composite_figi": "BBG000B9XRY4",
+ "currency_name": "usd",
+ "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.",
+ "homepage_url": "https://www.apple.com",
+ "list_date": "1980-12-12",
+ "locale": "us",
+ "market": "stocks",
+ "market_cap": 2771126040150,
+ "name": "Apple Inc.",
+ "phone_number": "(408) 996-1010",
+ "primary_exchange": "XNAS",
+ "round_lot": 100,
+ "share_class_figi": "BBG001S5N8V8",
+ "share_class_shares_outstanding": 16406400000,
+ "sic_code": "3571",
+ "sic_description": "ELECTRONIC COMPUTERS",
+ "ticker": "AAPL",
+ "ticker_root": "AAPL",
+ "total_employees": 154000,
+ "type": "CS",
+ "weighted_shares_outstanding": 16334371000
+ },
+ "status": "OK"
+ },
"schema": {
"properties": {
"count": {
"description": "The total number of results for this request.",
- "example": 1,
"type": "integer"
},
"request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "description": "A request id assigned by the server.",
"type": "string"
},
+ "results": {
+ "description": "Ticker with details.",
+ "properties": {
+ "active": {
+ "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
+ "type": "boolean"
+ },
+ "address": {
+ "properties": {
+ "address1": {
+ "description": "The first line of the company's headquarters address.",
+ "type": "string"
+ },
+ "address2": {
+ "description": "The second line of the company's headquarters address, if applicable.",
+ "type": "string"
+ },
+ "city": {
+ "description": "The city of the company's headquarters address.",
+ "type": "string"
+ },
+ "postal_code": {
+ "description": "The postal code of the company's headquarters address.",
+ "type": "string"
+ },
+ "state": {
+ "description": "The state of the company's headquarters address.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "branding": {
+ "properties": {
+ "icon_url": {
+ "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
+ "type": "string"
+ },
+ "logo_url": {
+ "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.",
+ "type": "string"
+ }
+ },
+ "type": "object"
+ },
+ "cik": {
+ "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
+ "type": "string"
+ },
+ "composite_figi": {
+ "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)",
+ "type": "string"
+ },
+ "currency_name": {
+ "description": "The name of the currency that this asset is traded with.",
+ "type": "string"
+ },
+ "delisted_utc": {
+ "description": "The last date that the asset was traded.",
+ "format": "date-time",
+ "type": "string"
+ },
+ "description": {
+ "description": "A description of the company and what they do/offer.",
+ "type": "string"
+ },
+ "homepage_url": {
+ "description": "The URL of the company's website homepage.",
+ "type": "string"
+ },
+ "list_date": {
+ "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.",
+ "type": "string"
+ },
+ "locale": {
+ "description": "The locale of the asset.",
+ "enum": [
+ "us",
+ "global"
+ ],
+ "type": "string"
+ },
+ "market": {
+ "description": "The market type of the asset.",
+ "enum": [
+ "stocks",
+ "crypto",
+ "fx",
+ "otc",
+ "indices"
+ ],
+ "type": "string"
+ },
+ "market_cap": {
+ "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.",
+ "format": "double",
+ "type": "number"
+ },
+ "name": {
+ "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.",
+ "type": "string"
+ },
+ "phone_number": {
+ "description": "The phone number for the company behind this ticker.",
+ "type": "string"
+ },
+ "primary_exchange": {
+ "description": "The ISO code of the primary listing exchange for this asset.",
+ "type": "string"
+ },
+ "round_lot": {
+ "description": "Round lot size of this security.",
+ "format": "double",
+ "type": "number"
+ },
+ "share_class_figi": {
+ "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/about/figi)",
+ "type": "string"
+ },
+ "share_class_shares_outstanding": {
+ "description": "The recorded number of outstanding shares for this particular share class.",
+ "format": "double",
+ "type": "number"
+ },
+ "sic_code": {
+ "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's SIC Code List.",
+ "type": "string"
+ },
+ "sic_description": {
+ "description": "A description of this ticker's SIC code.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The exchange symbol that this item is traded under.",
+ "type": "string"
+ },
+ "ticker_root": {
+ "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.",
+ "type": "string"
+ },
+ "ticker_suffix": {
+ "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.",
+ "type": "string"
+ },
+ "total_employees": {
+ "description": "The approximate number of employees for the company.",
+ "type": "number"
+ },
+ "type": {
+ "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://massive.com/docs/stocks/get_v3_reference_tickers_types).",
+ "type": "string"
+ },
+ "weighted_shares_outstanding": {
+ "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "ticker",
+ "name",
+ "market",
+ "locale",
+ "active",
+ "currency_name"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "ReferenceTicker",
+ "path": "github.com/massive-com/go-lib-models/v2/globals"
+ }
+ },
"status": {
"description": "The status of this request's response.",
- "example": "OK",
"type": "string"
}
},
- "required": [
- "status",
- "request_id"
- ],
"type": "object"
}
+ },
+ "text/csv": {
+ "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,share_class_shares_outstanding,weighted_shares_outstanding,round_lot,market_cap,phone_number,address1,address2,city,state,postal_code,sic_code,sic_description,ticker_root,total_employees,list_date,homepage_url,description,branding/logo_url,branding/icon_url\nAAPL,Apple Inc.,stocks,us,XNAS,CS,true,usd,0000320193,BBG000B9XRY4,BBG001S5N8V8,16406400000,16334371000,100,2771126040150,(408) 996-1010,One Apple Park Way,,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.massive.com/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n",
+ "schema": {
+ "type": "string"
+ }
}
},
- "description": "an unknown error occurred"
+ "description": "Reference Tickers."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
}
},
- "summary": "Exchanges",
+ "summary": "Ticker Details v3",
"tags": [
- "reference:exchanges"
+ "reference:tickers:get"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
}
}
},
- "/v3/reference/options/contracts": {
+ "/v3/snapshot": {
"get": {
- "description": "Query for historical options contracts. This provides both active and expired options contracts.",
- "operationId": "ListOptionsContracts",
+ "description": "Get snapshots for assets of all types",
+ "operationId": "Snapshots",
"parameters": [
{
- "description": "This parameter has been deprecated. To search by specific options ticker, use the Options Contract endpoint [here](https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker).",
"in": "query",
"name": "ticker",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query for contracts relating to an underlying stock ticker.",
- "in": "query",
- "name": "underlying_ticker",
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
+ "anyOf": {
+ "description": "Comma separated list of tickers, up to a maximum of 250. If no tickers are passed then all results will be returned in a paginated manner.\n\nWarning: The maximum number of characters allowed in a URL are subject to your technology stack.\n",
+ "enabled": true,
+ "example": "NCLH,O:SPY250321C00380000,C:EURUSD,X:BTCUSD,I:SPX"
+ },
"range": true,
"type": "string"
}
},
{
- "description": "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": "Query by contract expiration with date format YYYY-MM-DD.",
- "in": "query",
- "name": "expiration_date",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Specify a point in time for contracts as of this date with format YYYY-MM-DD. Defaults to today's date.",
- "in": "query",
- "name": "as_of",
- "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 for expired contracts. Default is false.",
- "in": "query",
- "name": "expired",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "description": "Search by underlying_ticker.",
- "in": "query",
- "name": "underlying_ticker.gte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by underlying_ticker.",
- "in": "query",
- "name": "underlying_ticker.gt",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by underlying_ticker.",
- "in": "query",
- "name": "underlying_ticker.lte",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by underlying_ticker.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "underlying_ticker.lt",
+ "name": "ticker.gte",
"schema": {
"type": "string"
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "expiration_date.gte",
+ "name": "ticker.gt",
"schema": {
"type": "string"
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "expiration_date.gt",
+ "name": "ticker.lte",
"schema": {
"type": "string"
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "expiration_date.lte",
+ "name": "ticker.lt",
"schema": {
"type": "string"
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Comma separated list of tickers, up to a maximum of 250. If no tickers are passed then all results will be returned in a paginated manner.\n\nWarning: The maximum number of characters allowed in a URL are subject to your technology stack.\n",
+ "example": "NCLH,O:SPY250321C00380000,C:EURUSD,X:BTCUSD,I:SPX",
"in": "query",
- "name": "expiration_date.lt",
+ "name": "ticker.any_of",
"schema": {
"type": "string"
}
},
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gt",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.lte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.lt",
- "schema": {
- "type": "number"
- }
- },
{
"description": "Order results based on the `sort` field.",
"in": "query",
@@ -21649,13 +26903,13 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "description": "Limit the number of results returned, default is 10 and max is 250.",
"in": "query",
"name": "limit",
"schema": {
"default": 10,
"example": 10,
- "maximum": 1000,
+ "maximum": 250,
"minimum": 1,
"type": "integer"
}
@@ -21667,10 +26921,7 @@
"schema": {
"default": "ticker",
"enum": [
- "ticker",
- "underlying_ticker",
- "expiration_date",
- "strike_price"
+ "ticker"
],
"example": "ticker",
"type": "string"
@@ -21682,41 +26933,120 @@
"content": {
"application/json": {
"example": {
- "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
+ "request_id": "abc123",
"results": [
{
- "cfi": "OCASPS",
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2021-11-19",
- "primary_exchange": "BATO",
- "shares_per_contract": 100,
- "strike_price": 85,
- "ticker": "O:AAPL211119C00085000",
- "underlying_ticker": "AAPL"
+ "break_even_price": 171.075,
+ "details": {
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2022-10-14",
+ "shares_per_contract": 100,
+ "strike_price": 5,
+ "underlying_ticker": "NCLH"
+ },
+ "fmv": 0.05,
+ "greeks": {
+ "delta": 0.5520187372272933,
+ "gamma": 0.00706756515659829,
+ "theta": -0.018532772783847958,
+ "vega": 0.7274811132998142
+ },
+ "implied_volatility": 0.3048997097864957,
+ "last_quote": {
+ "ask": 21.25,
+ "ask_exchange": 12,
+ "ask_size": 110,
+ "bid": 20.9,
+ "bid_exchange": 10,
+ "bid_size": 172,
+ "last_updated": 1636573458756383500,
+ "midpoint": 21.075,
+ "timeframe": "REAL-TIME"
+ },
+ "last_trade": {
+ "conditions": [
+ 209
+ ],
+ "exchange": 316,
+ "price": 0.05,
+ "sip_timestamp": 1675280958783136800,
+ "size": 2,
+ "timeframe": "REAL-TIME"
+ },
+ "market_status": "closed",
+ "name": "NCLH $5 Call",
+ "open_interest": 8921,
+ "session": {
+ "change": -0.05,
+ "change_percent": -1.07,
+ "close": 6.65,
+ "early_trading_change": -0.01,
+ "early_trading_change_percent": -0.03,
+ "high": 7.01,
+ "late_trading_change": -0.4,
+ "late_trading_change_percent": -0.02,
+ "low": 5.42,
+ "open": 6.7,
+ "previous_close": 6.71,
+ "volume": 67
+ },
+ "ticker": "O:NCLH221014C00005000",
+ "type": "options",
+ "underlying_asset": {
+ "change_to_break_even": 23.123999999999995,
+ "last_updated": 1636573459862384600,
+ "price": 147.951,
+ "ticker": "AAPL",
+ "timeframe": "REAL-TIME"
+ }
},
{
- "additional_underlyings": [
- {
- "amount": 44,
- "type": "equity",
- "underlying": "VMW"
- },
- {
- "amount": 6.53,
- "type": "currency",
- "underlying": "USD"
- }
- ],
- "cfi": "OCASPS",
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2021-11-19",
- "primary_exchange": "BATO",
- "shares_per_contract": 100,
- "strike_price": 90,
- "ticker": "O:AAPL211119C00090000",
- "underlying_ticker": "AAPL"
+ "fmv": 0.05,
+ "last_quote": {
+ "ask": 21.25,
+ "ask_exchange": 300,
+ "ask_size": 110,
+ "bid": 20.9,
+ "bid_exchange": 323,
+ "bid_size": 172,
+ "last_updated": 1636573458756383500,
+ "timeframe": "REAL-TIME"
+ },
+ "last_trade": {
+ "conditions": [
+ 209
+ ],
+ "exchange": 316,
+ "id": "4064",
+ "last_updated": 1675280958783136800,
+ "price": 0.05,
+ "size": 2,
+ "timeframe": "REAL-TIME"
+ },
+ "market_status": "closed",
+ "name": "Apple Inc.",
+ "session": {
+ "change": -1.05,
+ "change_percent": -4.67,
+ "close": 21.4,
+ "early_trading_change": -0.39,
+ "early_trading_change_percent": -0.07,
+ "high": 22.49,
+ "late_trading_change": 1.2,
+ "late_trading_change_percent": 3.92,
+ "low": 21.35,
+ "open": 22.49,
+ "previous_close": 22.45,
+ "volume": 37
+ },
+ "ticker": "AAPL",
+ "type": "stocks"
+ },
+ {
+ "error": "NOT_FOUND",
+ "message": "Ticker not found.",
+ "ticker": "TSLAAPL"
}
],
"status": "OK"
@@ -21733,344 +27063,510 @@
"results": {
"items": {
"properties": {
- "additional_underlyings": {
- "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee here for some examples of what might cause a contract to have additional underlyings.",
- "items": {
- "properties": {
- "amount": {
- "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
- "type": "number"
- },
- "type": {
- "description": "The type of the additional underlying asset, either equity or currency.",
- "type": "string"
- },
- "underlying": {
- "description": "The name of the additional underlying asset.",
- "type": "string"
+ "break_even_price": {
+ "description": "The price of the underlying asset for the contract to break even. For a call, this value is (strike price + premium paid). For a put, this value is (strike price - premium paid).",
+ "format": "double",
+ "type": "number"
+ },
+ "details": {
+ "description": "The details for this contract.",
+ "properties": {
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "enum": [
+ "put",
+ "call",
+ "other"
+ ],
+ "type": "string"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See this link for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "format": "date",
+ "type": "string",
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
}
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlying"
+ "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"
}
},
- "type": "array",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlyings"
- }
+ "required": [
+ "contract_type",
+ "exercise_style",
+ "expiration_date",
+ "shares_per_contract",
+ "strike_price"
+ ],
+ "type": "object"
},
- "cfi": {
- "description": "The 6 letter CFI code of the contract (defined in ISO 10962)",
+ "error": {
+ "description": "The error while looking for this ticker.",
"type": "string"
},
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "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"
},
- "correction": {
- "description": "The correction number for this option contract.",
- "type": "integer"
+ "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"
+ }
},
- "exercise_style": {
- "description": "The exercise style of this contract. See this link for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
+ "implied_volatility": {
+ "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.",
+ "format": "double",
+ "type": "number"
+ },
+ "last_quote": {
+ "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.",
+ "properties": {
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "ask_exchange": {
+ "description": "The ask side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "ask_size": {
+ "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "bid_exchange": {
+ "description": "The bid side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "bid_size": {
+ "description": "The bid size. This represents the number of round lot orders at the given bid price. The normal round lot size is 100 shares. A bid size of 2 means there are 200 shares for purchase at the given bid price.",
+ "format": "double",
+ "type": "number"
+ },
+ "last_updated": {
+ "description": "The nanosecond timestamp of when this information was updated.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "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",
+ "bid",
+ "last_updated",
+ "timeframe"
],
- "type": "string"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SnapshotLastQuote"
+ }
},
- "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"
+ "last_trade": {
+ "description": "The most recent quote for this contract. This is only returned if your current plan includes trades.",
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
+ },
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "id": {
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per combination of ticker, exchange, and TRF. For example: A trade for AAPL executed on NYSE and a trade for AAPL executed on NASDAQ could potentially have the same Trade ID.",
+ "type": "string"
+ },
+ "last_updated": {
+ "description": "The nanosecond timestamp of when this information was updated.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "int32",
+ "type": "integer"
+ },
+ "timeframe": {
+ "description": "The time relevance of the data.",
+ "enum": [
+ "DELAYED",
+ "REAL-TIME"
+ ],
+ "type": "string"
+ }
+ },
+ "required": [
+ "price",
+ "size"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SnapshotLastTrade"
}
},
- "primary_exchange": {
- "description": "The MIC code of the primarcy exchange that this contract is listed on.",
+ "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"
},
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
+ "message": {
+ "description": "The error message while looking for this ticker.",
"type": "string"
},
- "underlying_ticker": {
- "description": "The underlying ticker that the option contract relates to.",
+ "name": {
+ "description": "The name of this contract.",
"type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionsContract"
- }
- },
- "type": "array"
- },
- "status": {
- "type": "string"
- }
- },
- "type": "object"
- }
- },
- "text/csv": {
- "schema": {
- "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,85,O:AAPL211119C00085000,AAPL,\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n",
- "type": "string"
- }
- }
- },
- "description": "A list of options contracts"
- }
- },
- "summary": "Options Contracts",
- "tags": [
- "reference:options:contracts:list"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- },
- "x-polygon-paginate": {
- "limit": {
- "default": 10,
- "max": 1000
- },
- "sort": {
- "default": "ticker",
- "enum": [
- "ticker",
- "underlying_ticker",
- "expiration_date",
- "strike_price"
- ]
- }
- }
- }
- },
- "/v3/reference/options/contracts/{options_ticker}": {
- "get": {
- "description": "Get an options contract",
- "operationId": "GetOptionsContract",
- "parameters": [
- {
- "description": "Query for a contract by options ticker. You can learn more about the structure of options tickers [here](https://polygon.io/blog/how-to-read-a-stock-options-ticker/).",
- "example": "O:EVRI240119C00002500",
- "in": "path",
- "name": "options_ticker",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Specify a point in time for the contract as of this date with format YYYY-MM-DD. Defaults to today's date.",
- "in": "query",
- "name": "as_of",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "example": {
- "request_id": "603902c0-a5a5-406f-bd08-f030f92418fa",
- "results": {
- "additional_underlyings": [
- {
- "amount": 44,
- "type": "equity",
- "underlying": "VMW"
- },
- {
- "amount": 6.53,
- "type": "currency",
- "underlying": "USD"
- }
- ],
- "cfi": "OCASPS",
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2021-11-19",
- "primary_exchange": "BATO",
- "shares_per_contract": 100,
- "strike_price": 85,
- "ticker": "O:AAPL211119C00085000",
- "underlying_ticker": "AAPL"
- },
- "status": "OK"
- },
- "schema": {
- "properties": {
- "request_id": {
- "type": "string"
- },
- "results": {
- "properties": {
- "additional_underlyings": {
- "description": "If an option contract has additional underlyings or deliverables associated with it, they will appear here.\nSee here for some examples of what might cause a contract to have additional underlyings.",
- "items": {
+ },
+ "open_interest": {
+ "description": "The quantity of this contract held at the end of the last trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "session": {
"properties": {
- "amount": {
- "description": "The number of shares per contract of the additional underlying, or the cash-in-lieu amount of the currency.",
+ "change": {
+ "description": "The value of the price change for the asset from the previous trading day.",
+ "format": "double",
"type": "number"
},
- "type": {
- "description": "The type of the additional underlying asset, either equity or currency.",
- "type": "string"
+ "change_percent": {
+ "description": "The percent of the price change for the asset from the previous trading day.",
+ "format": "double",
+ "type": "number"
},
- "underlying": {
- "description": "The name of the additional underlying asset.",
- "type": "string"
+ "close": {
+ "description": "The closing price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "early_trading_change": {
+ "description": "Today's early trading change amount, difference between price and previous close if in early trading hours, otherwise difference between last price during early trading and previous close.",
+ "format": "double",
+ "type": "number"
+ },
+ "early_trading_change_percent": {
+ "description": "Today's early trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "high": {
+ "description": "The highest price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "late_trading_change": {
+ "description": "Today's late trading change amount, difference between price and today's close if in late trading hours, otherwise difference between last price during late trading and today's close.",
+ "format": "double",
+ "type": "number"
+ },
+ "late_trading_change_percent": {
+ "description": "Today's late trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "low": {
+ "description": "The lowest price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price of the asset for the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "previous_close": {
+ "description": "The closing price of the asset for the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "price": {
+ "description": "The price of the most recent trade or bid price for this asset.",
+ "format": "double",
+ "type": "number"
+ },
+ "regular_trading_change": {
+ "description": "Today's change in regular trading hours, difference between current price and previous trading day's close, otherwise difference between today's close and previous day's close.",
+ "format": "double",
+ "type": "number"
+ },
+ "regular_trading_change_percent": {
+ "description": "Today's regular trading change as a percentage.",
+ "format": "double",
+ "type": "number"
+ },
+ "volume": {
+ "description": "The trading volume for the asset for the day.",
+ "format": "double",
+ "type": "number"
}
},
+ "required": [
+ "change",
+ "change_percent",
+ "close",
+ "high",
+ "low",
+ "open",
+ "previous_close"
+ ],
"type": "object",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlying"
+ "x-massive-go-type": {
+ "name": "Session"
}
},
- "type": "array",
- "x-polygon-go-type": {
- "name": "AdditionalUnderlyings"
- }
- },
- "cfi": {
- "description": "The 6 letter CFI code of the contract (defined in ISO 10962)",
- "type": "string"
- },
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "type": "string"
- },
- "correction": {
- "description": "The correction number for this option contract.",
- "type": "integer"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See this link for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
+ "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"
}
},
- "primary_exchange": {
- "description": "The MIC code of the primarcy exchange that this contract is listed on.",
- "type": "string"
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- },
- "underlying_ticker": {
- "description": "The underlying ticker that the option contract relates to.",
- "type": "string"
+ "required": [
+ "ticker"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "SnapshotResponseModel"
}
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionsContract"
- }
+ "type": "array"
},
"status": {
+ "description": "The status of this request's response.",
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id"
+ ],
"type": "object"
}
- },
- "text/csv": {
- "schema": {
- "example": "cfi,contract_type,exercise_style,expiration_date,primary_exchange,shares_per_contract,strike_price,ticker,underlying_ticker,additional_underlyings_json\nOCASPS,call,american,2021-11-19,BATO,100,90,O:AAPL211119C00090000,AAPL,\"[{'type': 'equity', 'underlying': 'VMW', 'amount': 44}, {'type': 'currency', 'underlying': 'USD', 'amount': 6.53}]\"\n",
- "type": "string"
- }
}
},
- "description": "A specific options contract"
+ "description": "Snapshots for the ticker list"
}
},
- "summary": "Options Contract",
- "tags": [
- "reference:options:contract"
+ "summary": "Universal Snapshot",
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-massive-entitlement-data-type": {
+ "description": "Snapshot data",
+ "name": "snapshots"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "All asset classes",
+ "name": "universal"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 250,
+ "min": 1
+ },
+ "sort": {
+ "default": "ticker",
+ "enum": [
+ "ticker"
+ ]
+ }
}
}
},
- "/v3/reference/splits": {
+ "/v3/snapshot/indices": {
"get": {
- "description": "Get a list of historical stock splits, including the ticker symbol, the execution date, and the factors of the split ratio.",
- "operationId": "ListStockSplits",
+ "description": "Get a Snapshot of indices data for said tickers",
+ "operationId": "IndicesSnapshot",
"parameters": [
{
- "description": "Return the stock splits that contain this ticker.",
+ "description": "Comma separated list of tickers, up to a maximum of 250. If no tickers are passed then all results will be returned in a paginated manner.\n\nWarning: The maximum number of characters allowed in a URL are subject to your technology stack.",
+ "example": "I:DJI",
"in": "query",
- "name": "ticker",
+ "name": "ticker.any_of",
"schema": {
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "string"
}
},
{
- "description": "Query by execution date with the format YYYY-MM-DD.",
+ "description": "Search a range of tickers lexicographically.",
"in": "query",
- "name": "execution_date",
+ "name": "ticker",
"schema": {
- "format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true,
"type": "string"
}
},
{
- "description": "Query for reverse stock splits. A split ratio where split_from is greater than split_to represents a reverse split. By default this filter is not used.",
- "in": "query",
- "name": "reverse_split",
- "schema": {
- "nullable": true,
- "type": "boolean"
- }
- },
- {
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gte",
"schema": {
@@ -22078,7 +27574,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.gt",
"schema": {
@@ -22086,7 +27582,7 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lte",
"schema": {
@@ -22094,49 +27590,13 @@
}
},
{
- "description": "Search by ticker.",
+ "description": "Range by ticker.",
"in": "query",
"name": "ticker.lt",
"schema": {
"type": "string"
}
},
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by execution_date.",
- "in": "query",
- "name": "execution_date.lt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
{
"description": "Order results based on the `sort` field.",
"in": "query",
@@ -22151,13 +27611,13 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "description": "Limit the number of results returned, default is 10 and max is 250.",
"in": "query",
"name": "limit",
"schema": {
"default": 10,
"example": 10,
- "maximum": 1000,
+ "maximum": 250,
"minimum": 1,
"type": "integer"
}
@@ -22167,12 +27627,11 @@
"in": "query",
"name": "sort",
"schema": {
- "default": "execution_date",
+ "default": "ticker",
"enum": [
- "execution_date",
"ticker"
],
- "example": "execution_date",
+ "example": "ticker",
"type": "string"
}
}
@@ -22182,19 +27641,35 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/splits/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
"results": [
{
- "execution_date": "2020-08-31",
- "split_from": 1,
- "split_to": 4,
- "ticker": "AAPL"
+ "last_updated": 1679597116344223500,
+ "market_status": "closed",
+ "name": "Dow Jones Industrial Average",
+ "session": {
+ "change": -50.01,
+ "change_percent": -1.45,
+ "close": 3822.39,
+ "high": 3834.41,
+ "low": 38217.11,
+ "open": 3827.38,
+ "previous_close": 3812.19
+ },
+ "ticker": "I:DJI",
+ "timeframe": "REAL-TIME",
+ "type": "indices",
+ "value": 3822.39
},
{
- "execution_date": "2005-02-28",
- "split_from": 1,
- "split_to": 2,
- "ticker": "AAPL"
+ "error": "NOT_FOUND",
+ "message": "Ticker not found.",
+ "ticker": "APx"
+ },
+ {
+ "error": "NOT_ENTITLED",
+ "message": "Not entitled to this ticker.",
+ "ticker": "APy"
}
],
"status": "OK"
@@ -22211,30 +27686,105 @@
"results": {
"items": {
"properties": {
- "execution_date": {
- "description": "The execution date of the stock split. On this date the stock split was applied.",
+ "error": {
+ "description": "The error while looking for this ticker.",
"type": "string"
},
- "split_from": {
- "description": "The second number in the split ratio.\n\nFor example: In a 2-for-1 split, split_from would be 1.",
- "format": "float",
- "type": "number"
+ "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"
+ }
},
- "split_to": {
- "description": "The first number in the split ratio.\n\nFor example: In a 2-for-1 split, split_to would be 2.",
- "format": "float",
- "type": "number"
+ "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-massive-go-type": {
+ "name": "IndicesSession"
+ }
},
"ticker": {
- "description": "The ticker symbol of the stock split.",
+ "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"
}
},
"required": [
- "split_from",
- "split_to"
+ "ticker"
],
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "IndicesResult"
+ }
},
"type": "array"
},
@@ -22243,191 +27793,169 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id"
+ ],
"type": "object"
}
- },
- "text/csv": {
- "example": "ticker,execution_date,split_from,split_to\nAAPL,2020-08-31,1.0,4.0\nAAPL,2005-02-28,1.0,2.0\n",
- "schema": {
- "type": "string"
- }
}
},
- "description": "A list of stock splits."
+ "description": "Snapshots for indices data of the underlying ticker"
}
},
- "summary": "Stock Splits v3",
+ "summary": "Indices Snapshot",
"tags": [
- "reference:stocks"
+ "indices:snapshot"
],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Indices data",
+ "name": "indices"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
"default": 10,
- "max": 1000
+ "max": 250
},
"sort": {
- "default": "execution_date",
+ "default": "ticker",
"enum": [
- "execution_date",
"ticker"
]
}
}
}
},
- "/v3/reference/tickers": {
+ "/v3/snapshot/options/{underlyingAsset}": {
"get": {
- "description": "Query all ticker symbols which are supported by Polygon.io. This API currently includes Stocks/Equities, Crypto, and Forex.\n",
+ "description": "Get the snapshot of all options contracts for an underlying ticker.",
+ "operationId": "OptionsChain",
"parameters": [
{
- "description": "Specify a ticker symbol.\nDefaults to empty string which queries all tickers.\n",
+ "description": "The underlying ticker symbol of the option contract.",
+ "example": "EVRI",
+ "in": "path",
+ "name": "underlyingAsset",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by strike price of a contract.",
"in": "query",
- "name": "ticker",
+ "name": "strike_price",
+ "schema": {
+ "type": "number"
+ },
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "number"
+ }
+ },
+ {
+ "description": "Query by contract expiration with date format YYYY-MM-DD.",
+ "in": "query",
+ "name": "expiration_date",
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
{
- "description": "Specify the type of the tickers. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).\nDefaults to empty string which queries all types.\n",
+ "description": "Query by the type of contract.",
"in": "query",
- "name": "type",
+ "name": "contract_type",
"schema": {
"enum": [
- "CS",
- "ADRC",
- "ADRP",
- "ADRR",
- "UNIT",
- "RIGHT",
- "PFD",
- "FUND",
- "SP",
- "WARRANT",
- "INDEX",
- "ETF",
- "ETN",
- "OS",
- "GDR",
- "OTHER",
- "NYRS",
- "AGEN",
- "EQLK",
- "BOND",
- "ADRW",
- "BASKET",
- "LT"
+ "call",
+ "put"
],
"type": "string"
}
},
{
- "description": "Filter by market type. By default all markets are included.\n",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "market",
+ "name": "strike_price.gte",
"schema": {
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ],
- "type": "string"
+ "type": "number"
}
},
{
- "description": "Specify the primary exchange of the asset in the ISO code format. Find more information about the ISO codes [at the ISO org website](https://www.iso20022.org/market-identifier-codes).\nDefaults to empty string which queries all exchanges.\n",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "exchange",
+ "name": "strike_price.gt",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "description": "Specify the CUSIP code of the asset you want to search for. Find more information about CUSIP codes [at their website](https://www.cusip.com/identifiers.html#/CUSIP).\nDefaults to empty string which queries all CUSIPs.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "cusip",
+ "name": "strike_price.lte",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "description": "Specify the CIK of the asset you want to search for. Find more information about CIK codes [at their website](https://www.sec.gov/edgar/searchedgar/cik.htm).\nDefaults to empty string which queries all CIKs.\n",
+ "description": "Range by strike_price.",
"in": "query",
- "name": "cik",
+ "name": "strike_price.lt",
"schema": {
- "type": "string"
+ "type": "number"
}
},
{
- "description": "Specify a point in time to retrieve tickers available on that date.\nDefaults to the most recent available date.\n",
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "date",
+ "name": "expiration_date.gte",
"schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
+ "type": "string"
}
},
{
- "description": "Search for terms within the ticker and/or company name.\n",
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "search",
+ "name": "expiration_date.gt",
"schema": {
"type": "string"
}
},
{
- "description": "Specify if the tickers returned should be actively traded on the queried date. Default is true.\n",
- "example": true,
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "active",
+ "name": "expiration_date.lte",
"schema": {
- "type": "boolean"
+ "type": "string"
}
},
{
- "description": "The field to sort the results on. Default is ticker.\nIf the `search` query parameter is present, `sort` is ignored and results are ordered by relevance.\n",
- "example": "ticker",
+ "description": "Range by expiration_date.",
"in": "query",
- "name": "sort",
+ "name": "expiration_date.lt",
"schema": {
- "enum": [
- "ticker",
- "name",
- "market",
- "locale",
- "primary_exchange",
- "type",
- "currency_symbol",
- "currency_name",
- "base_currency_symbol",
- "base_currency_name",
- "cik",
- "composite_figi",
- "share_class_figi",
- "last_updated_utc",
- "delisted_utc"
- ],
"type": "string"
}
},
{
- "description": "The order to sort the results on. Default is asc (ascending).\n",
- "example": "asc",
+ "description": "Order results based on the `sort` field.",
"in": "query",
"name": "order",
"schema": {
@@ -22435,20 +27963,36 @@
"asc",
"desc"
],
+ "example": "asc",
"type": "string"
}
},
{
- "description": "Limit the size of the response, default is 100 and max is 1000.\n\nIf your query returns more than the max limit and you want to retrieve the next page of results,\nsee the `next_url` response attribute.\n",
- "example": 10,
+ "description": "Limit the number of results returned, default is 10 and max is 250.",
"in": "query",
"name": "limit",
"schema": {
- "default": 100,
- "maximum": 1000,
+ "default": 10,
+ "example": 10,
+ "maximum": 250,
"minimum": 1,
"type": "integer"
}
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
+ "schema": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "expiration_date",
+ "strike_price"
+ ],
+ "example": "ticker",
+ "type": "string"
+ }
}
],
"responses": {
@@ -22456,354 +28000,453 @@
"content": {
"application/json": {
"example": {
- "request_id": "aa118eb5574a45d8baea953484dc0336",
- "results": {
- "active": true,
- "address": {
- "address1": "One Apple Park Way",
- "city": "Cupertino",
- "postal_code": "95014",
- "state": "CA"
- },
- "branding": {
- "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png",
- "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg"
- },
- "cik": "0000320193",
- "composite_figi": "BBG000B9XRY4",
- "currency_name": "usd",
- "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.",
- "homepage_url": "https://www.apple.com",
- "list_date": "1980-12-12",
- "locale": "us",
- "market": "stocks",
- "market_cap": 2771126040150,
- "name": "Apple Inc.",
- "phone_number": "(408) 996-1010",
- "primary_exchange": "XNAS",
- "share_class_figi": "BBG001S5N8V8",
- "share_class_shares_outstanding": 16406400000,
- "sic_code": "3571",
- "sic_description": "ELECTRONIC COMPUTERS",
- "ticker": "AAPL",
- "ticker_root": "AAPL",
- "total_employees": 154000,
- "type": "CS",
- "weighted_shares_outstanding": 16334371000
- },
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "results": [
+ {
+ "break_even_price": 151.2,
+ "day": {
+ "change": 4.5,
+ "change_percent": 6.76,
+ "close": 120.73,
+ "high": 120.81,
+ "last_updated": 1605195918507251700,
+ "low": 118.9,
+ "open": 119.32,
+ "previous_close": 119.12,
+ "volume": 868,
+ "vwap": 119.31
+ },
+ "details": {
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2022-01-21",
+ "shares_per_contract": 100,
+ "strike_price": 150,
+ "ticker": "O:AAPL211022C000150000"
+ },
+ "fmv": 0.05,
+ "greeks": {
+ "delta": 1,
+ "gamma": 0,
+ "theta": 0.00229,
+ "vega": 0
+ },
+ "implied_volatility": 5,
+ "last_quote": {
+ "ask": 120.3,
+ "ask_size": 4,
+ "bid": 120.28,
+ "bid_size": 8,
+ "last_updated": 1605195918507251700,
+ "midpoint": 120.29,
+ "timeframe": "REAL-TIME"
+ },
+ "last_trade": {
+ "conditions": [
+ 209
+ ],
+ "exchange": 316,
+ "price": 0.05,
+ "sip_timestamp": 1675280958783136800,
+ "size": 2,
+ "timeframe": "REAL-TIME"
+ },
+ "open_interest": 1543,
+ "underlying_asset": {
+ "change_to_break_even": 4.2,
+ "last_updated": 1605195918507251700,
+ "price": 147,
+ "ticker": "AAPL",
+ "timeframe": "DELAYED"
+ }
+ }
+ ],
"status": "OK"
},
"schema": {
- "allOf": [
- {
- "properties": {
- "results": {
- "description": "An array of tickers that match your query.\n\nNote: Although you can query by CUSIP, due to legal reasons we do not return the CUSIP in the response.\n",
- "items": {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
+ "items": {
+ "properties": {
+ "break_even_price": {
+ "description": "The price of the underlying asset for the contract to break even. For a call, this value is (strike price + premium paid). For a put, this value is (strike price - premium paid).",
+ "format": "double",
+ "type": "number"
+ },
+ "day": {
+ "description": "The most recent daily bar for this contract.",
"properties": {
- "active": {
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
- "type": "boolean"
+ "change": {
+ "description": "The value of the price change for the contract from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "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"
},
- "cik": {
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
- "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"
+ }
},
- "composite_figi": {
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
+ "low": {
+ "description": "The lowest price for the contract of the day.",
+ "format": "double",
+ "type": "number"
},
- "currency_name": {
- "description": "The name of the currency that this asset is traded with.",
- "type": "string"
+ "open": {
+ "description": "The open price for the contract of the day.",
+ "format": "double",
+ "type": "number"
},
- "delisted_utc": {
- "description": "The last date that the asset was traded.",
- "format": "date-time",
- "type": "string"
+ "previous_close": {
+ "description": "The closing price for the contract of previous trading day.",
+ "format": "double",
+ "type": "number"
},
- "last_updated_utc": {
- "description": "The information is accurate up to this time.",
- "format": "date-time",
- "type": "string"
+ "volume": {
+ "description": "The trading volume for the contract of the day.",
+ "format": "double",
+ "type": "number"
},
- "locale": {
- "description": "The locale of the asset.",
+ "vwap": {
+ "description": "The trading volume weighted average price for the contract of the day.",
+ "format": "double",
+ "type": "number",
+ "x-massive-go-id": "VWAP"
+ }
+ },
+ "required": [
+ "open",
+ "high",
+ "low",
+ "close",
+ "previous_close",
+ "volume",
+ "vwap",
+ "change_percent",
+ "change"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Day"
+ }
+ },
+ "details": {
+ "description": "The details for this contract.",
+ "properties": {
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
"enum": [
- "us",
- "global"
+ "put",
+ "call",
+ "other"
],
"type": "string"
},
- "market": {
- "description": "The market type of the asset.",
+ "exercise_style": {
+ "description": "The exercise style of this contract. See this link for more details on exercise styles.",
"enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
+ "american",
+ "european",
+ "bermudan"
],
"type": "string"
},
- "name": {
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
- "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"
+ }
},
- "primary_exchange": {
- "description": "The ISO code of the primary listing exchange for this asset.",
- "type": "string"
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "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)",
- "type": "string"
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "format": "double",
+ "type": "number"
},
"ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "type": {
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
+ "description": "The ticker symbol for the asset.",
"type": "string"
}
},
"required": [
"ticker",
- "name",
- "market",
- "locale"
+ "contract_type",
+ "exercise_style",
+ "expiration_date",
+ "shares_per_contract",
+ "strike_price"
],
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Details"
+ }
},
- "type": "array"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
- }
- ]
- }
- },
- "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,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,2771126040150,(408) 996-1010,One Apple Park Way,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "Reference Tickers."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
- }
- },
- "summary": "Tickers",
- "tags": [
- "reference:tickers:list"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v3/reference/tickers/types": {
- "get": {
- "description": "List all ticker types that Polygon.io has.",
- "operationId": "ListTickerTypes",
- "parameters": [
- {
- "description": "Filter by asset class.",
- "in": "query",
- "name": "asset_class",
- "schema": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
- ],
- "example": "stocks",
- "type": "string"
- }
- },
- {
- "description": "Filter by locale.",
- "in": "query",
- "name": "locale",
- "schema": {
- "description": "An identifier for a geographical location.",
- "enum": [
- "us",
- "global"
- ],
- "example": "us",
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
- },
- "results": {
- "items": {
- "description": "Describes the type of financial instrument represented by a ticker.",
- "properties": {
- "asset_class": {
- "description": "An identifier for a group of similar financial instruments.",
- "enum": [
- "stocks",
- "options",
- "crypto",
- "fx"
+ "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"
],
- "example": "stocks",
- "type": "string"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "LastQuote"
+ }
},
- "code": {
- "description": "A code used by Polygon.io to refer to this ticker type.",
- "example": "CS",
- "type": "string"
+ "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"
+ }
},
- "description": {
- "description": "A short description of this ticker type.",
- "example": "Common Stock",
- "type": "string"
+ "open_interest": {
+ "description": "The quantity of this contract held at the end of the last trading day.",
+ "format": "double",
+ "type": "number"
},
- "locale": {
- "description": "An identifier for a geographical location.",
- "enum": [
- "us",
- "global"
+ "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"
],
- "example": "us",
- "type": "string"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "UnderlyingAsset"
+ }
}
},
"required": [
- "code",
- "description",
- "asset_class",
- "locale"
+ "day",
+ "last_quote",
+ "underlying_asset",
+ "details",
+ "break_even_price",
+ "open_interest"
],
- "type": "object"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "OptionSnapshotResult"
+ }
},
"type": "array"
},
"status": {
"description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- },
- "text/csv": {
- "example": "code,description,asset_class,locale\nCS,Common Stock,stocks,us\nPFD,Preferred Stock,stocks,us\n",
- "schema": {
- "type": "string"
- }
- }
- },
- "description": "OK"
- },
- "400": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
- },
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
- "type": "string"
- }
- },
- "required": [
- "status",
- "request_id"
- ],
- "type": "object"
- }
- }
- },
- "description": "a query parameter was malformed"
- },
- "default": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "example": 1,
- "type": "integer"
- },
- "request_id": {
- "description": "A request ID assigned by the server.",
- "example": "31d59dda-80e5-4721-8496-d0d32a654afe",
- "type": "string"
- },
- "status": {
- "description": "The status of this request's response.",
- "example": "OK",
"type": "string"
}
},
@@ -22815,49 +28458,71 @@
}
}
},
- "description": "an unknown error occurred"
+ "description": "Snapshots for options contracts of the underlying ticker"
}
},
- "summary": "Ticker Types",
+ "summary": "Options Chain",
"tags": [
- "reference:tickers:types"
+ "options:snapshot"
],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
+ },
+ {
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 10,
+ "max": 250
+ },
+ "sort": {
+ "default": "ticker",
+ "enum": [
+ "ticker",
+ "expiration_date",
+ "strike_price"
+ ]
+ }
}
}
},
- "/v3/reference/tickers/{ticker}": {
+ "/v3/snapshot/options/{underlyingAsset}/{optionContract}": {
"get": {
- "description": "Get a single ticker supported by Polygon.io. This response will have detailed information about the ticker and the company behind it.\n",
+ "description": "Get the snapshot of an option contract for a stock equity.",
+ "operationId": "OptionContract",
"parameters": [
{
- "description": "The ticker symbol of the asset.",
- "example": "AAPL",
+ "description": "The underlying ticker symbol of the option contract.",
+ "example": "EVRI",
"in": "path",
- "name": "ticker",
+ "name": "underlyingAsset",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "The option contract identifier.",
+ "example": "O:EVRI240920P00012500",
+ "in": "path",
+ "name": "optionContract",
"required": true,
"schema": {
"type": "string"
}
- },
- {
- "description": "Specify a point in time to get information about the ticker available on that date.\nWhen retrieving information from SEC filings, we compare this date with the period of report date on the SEC filing.\n\nFor example, consider an SEC filing submitted by AAPL on 2019-07-31, with a period of report date ending on 2019-06-29.\nThat means that the filing was submitted on 2019-07-31, but the filing was created based on information from 2019-06-29.\nIf you were to query for AAPL details on 2019-06-29, the ticker details would include information from the SEC filing.\n\nDefaults to the most recent available date.\n",
- "in": "query",
- "name": "date",
- "schema": {
- "oneOf": [
- {
- "format": "date-time",
- "type": "string"
- },
- {
- "format": "date",
- "type": "string"
- }
- ]
- }
}
],
"responses": {
@@ -22865,366 +28530,548 @@
"content": {
"application/json": {
"example": {
- "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "request_id": "d9ff18dac69f55c218f69e4753706acd",
"results": {
- "active": true,
- "address": {
- "address1": "One Apple Park Way",
- "city": "Cupertino",
- "postal_code": "95014",
- "state": "CA"
+ "break_even_price": 171.075,
+ "day": {
+ "change": -1.05,
+ "change_percent": -4.67,
+ "close": 21.4,
+ "high": 22.49,
+ "last_updated": 1636520400000000000,
+ "low": 21.35,
+ "open": 22.49,
+ "previous_close": 22.45,
+ "volume": 37,
+ "vwap": 21.6741
},
- "branding": {
- "icon_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png",
- "logo_url": "https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg"
+ "details": {
+ "contract_type": "call",
+ "exercise_style": "american",
+ "expiration_date": "2023-06-16",
+ "shares_per_contract": 100,
+ "strike_price": 150,
+ "ticker": "O:AAPL230616C00150000"
},
- "cik": "0000320193",
- "composite_figi": "BBG000B9XRY4",
- "currency_name": "usd",
- "description": "Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.",
- "homepage_url": "https://www.apple.com",
- "list_date": "1980-12-12",
- "locale": "us",
- "market": "stocks",
- "market_cap": 2771126040150,
- "name": "Apple Inc.",
- "phone_number": "(408) 996-1010",
- "primary_exchange": "XNAS",
- "share_class_figi": "BBG001S5N8V8",
- "share_class_shares_outstanding": 16406400000,
- "sic_code": "3571",
- "sic_description": "ELECTRONIC COMPUTERS",
- "ticker": "AAPL",
- "ticker_root": "AAPL",
- "total_employees": 154000,
- "type": "CS",
- "weighted_shares_outstanding": 16334371000
+ "fmv": 0.05,
+ "greeks": {
+ "delta": 0.5520187372272933,
+ "gamma": 0.00706756515659829,
+ "theta": -0.018532772783847958,
+ "vega": 0.7274811132998142
+ },
+ "implied_volatility": 0.3048997097864957,
+ "last_quote": {
+ "ask": 21.25,
+ "ask_exchange": 301,
+ "ask_size": 110,
+ "bid": 20.9,
+ "bid_exchange": 301,
+ "bid_size": 172,
+ "last_updated": 1636573458756383500,
+ "midpoint": 21.075,
+ "timeframe": "REAL-TIME"
+ },
+ "last_trade": {
+ "conditions": [
+ 209
+ ],
+ "exchange": 316,
+ "price": 0.05,
+ "sip_timestamp": 1675280958783136800,
+ "size": 2,
+ "timeframe": "REAL-TIME"
+ },
+ "open_interest": 8921,
+ "underlying_asset": {
+ "change_to_break_even": 23.123999999999995,
+ "last_updated": 1636573459862384600,
+ "price": 147.951,
+ "ticker": "AAPL",
+ "timeframe": "REAL-TIME"
+ }
},
"status": "OK"
},
"schema": {
- "allOf": [
- {
+ "properties": {
+ "next_url": {
+ "description": "If present, this value can be used to fetch the next page of data.",
+ "type": "string"
+ },
+ "request_id": {
+ "type": "string"
+ },
+ "results": {
"properties": {
- "results": {
- "description": "Ticker with details.\n",
+ "break_even_price": {
+ "description": "The price of the underlying asset for the contract to break even. For a call, this value is (strike price + premium paid). For a put, this value is (strike price - premium paid).",
+ "format": "double",
+ "type": "number"
+ },
+ "day": {
+ "description": "The most recent daily bar for this contract.",
+ "properties": {
+ "change": {
+ "description": "The value of the price change for the contract from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "change_percent": {
+ "description": "The percent of the price change for the contract from the previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "close": {
+ "description": "The closing price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "high": {
+ "description": "The highest price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "last_updated": {
+ "description": "The nanosecond timestamp of when this information was updated.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "low": {
+ "description": "The lowest price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "open": {
+ "description": "The open price for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "previous_close": {
+ "description": "The closing price for the contract of previous trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "volume": {
+ "description": "The trading volume for the contract of the day.",
+ "format": "double",
+ "type": "number"
+ },
+ "vwap": {
+ "description": "The trading volume weighted average price for the contract of the day.",
+ "format": "double",
+ "type": "number",
+ "x-massive-go-id": "VWAP"
+ }
+ },
+ "required": [
+ "open",
+ "high",
+ "low",
+ "close",
+ "previous_close",
+ "volume",
+ "vwap",
+ "change_percent",
+ "change"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Day"
+ }
+ },
+ "details": {
+ "description": "The details for this contract.",
+ "properties": {
+ "contract_type": {
+ "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
+ "enum": [
+ "put",
+ "call",
+ "other"
+ ],
+ "type": "string"
+ },
+ "exercise_style": {
+ "description": "The exercise style of this contract. See this link for more details on exercise styles.",
+ "enum": [
+ "american",
+ "european",
+ "bermudan"
+ ],
+ "type": "string"
+ },
+ "expiration_date": {
+ "description": "The contract's expiration date in YYYY-MM-DD format.",
+ "format": "date",
+ "type": "string",
+ "x-massive-go-type": {
+ "name": "IDaysMassiveDateString",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "shares_per_contract": {
+ "description": "The number of shares per contract for this contract.",
+ "type": "number"
+ },
+ "strike_price": {
+ "description": "The strike price of the option contract.",
+ "format": "double",
+ "type": "number"
+ },
+ "ticker": {
+ "description": "The ticker symbol for the asset.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "ticker",
+ "contract_type",
+ "exercise_style",
+ "expiration_date",
+ "shares_per_contract",
+ "strike_price"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Details"
+ }
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It's it our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security.\nFor more information, contact us.",
+ "type": "number"
+ },
+ "greeks": {
+ "description": "The greeks for this contract.\nThere are certain circumstances where greeks will not be returned, such as options contracts that are deep in the money.\nSee this article for more information.",
+ "properties": {
+ "delta": {
+ "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.",
+ "format": "double",
+ "type": "number"
+ },
+ "gamma": {
+ "description": "The change in delta per $0.01 change in the price of the underlying asset.",
+ "format": "double",
+ "type": "number"
+ },
+ "theta": {
+ "description": "The change in the option's price per day.",
+ "format": "double",
+ "type": "number"
+ },
+ "vega": {
+ "description": "The change in the option's price per 1% increment in volatility.",
+ "format": "double",
+ "type": "number"
+ }
+ },
+ "required": [
+ "delta",
+ "gamma",
+ "theta",
+ "vega"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "Greeks"
+ }
+ },
+ "implied_volatility": {
+ "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.",
+ "format": "double",
+ "type": "number"
+ },
+ "last_quote": {
+ "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.",
"properties": {
- "active": {
- "description": "Whether or not the asset is actively traded. False means the asset has been delisted.",
- "type": "boolean"
- },
- "address": {
- "properties": {
- "address1": {
- "description": "The first line of the company's headquarters address.",
- "type": "string"
- },
- "city": {
- "description": "The city of the company's headquarters address.",
- "type": "string"
- },
- "postal_code": {
- "description": "The postal code of the company's headquarters address.",
- "type": "string"
- },
- "state": {
- "description": "The state of the company's headquarters address.",
- "type": "string"
- }
- },
- "type": "object"
- },
- "branding": {
- "properties": {
- "icon_url": {
- "description": "A link to this ticker's company's icon. Icon's are generally smaller, square images that represent the company at a glance.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n",
- "type": "string"
- },
- "logo_url": {
- "description": "A link to this ticker's company's logo.\nNote that you must provide an API key when accessing this URL. See the \"Authentication\" section at the top of this page for more details.\n",
- "type": "string"
- }
- },
- "type": "object"
+ "ask": {
+ "description": "The ask price.",
+ "format": "double",
+ "type": "number"
},
- "cik": {
- "description": "The CIK number for this ticker. Find more information [here](https://en.wikipedia.org/wiki/Central_Index_Key).",
- "type": "string"
+ "ask_exchange": {
+ "description": "The ask side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "format": "int32",
+ "type": "number"
},
- "composite_figi": {
- "description": "The composite OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
- "type": "string"
+ "ask_size": {
+ "description": "The ask size.",
+ "format": "double",
+ "type": "number"
},
- "currency_name": {
- "description": "The name of the currency that this asset is traded with.",
- "type": "string"
+ "bid": {
+ "description": "The bid price.",
+ "format": "double",
+ "type": "number"
},
- "delisted_utc": {
- "description": "The last date that the asset was traded.",
- "format": "date-time",
- "type": "string"
+ "bid_exchange": {
+ "description": "The bid side exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "format": "int32",
+ "type": "number"
},
- "description": {
- "description": "A description of the company and what they do/offer.",
- "type": "string"
+ "bid_size": {
+ "description": "The bid size.",
+ "format": "double",
+ "type": "number"
},
- "homepage_url": {
- "description": "The URL of the company's website homepage.",
- "type": "string"
+ "last_updated": {
+ "description": "The nanosecond timestamp of when this information was updated.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
},
- "list_date": {
- "description": "The date that the symbol was first publicly listed in the format YYYY-MM-DD.",
- "type": "string"
+ "midpoint": {
+ "description": "The average of the bid and ask price.",
+ "format": "double",
+ "type": "number"
},
- "locale": {
- "description": "The locale of the asset.",
+ "timeframe": {
+ "description": "The time relevance of the data.",
"enum": [
- "us",
- "global"
+ "DELAYED",
+ "REAL-TIME"
],
"type": "string"
+ }
+ },
+ "required": [
+ "ask",
+ "ask_size",
+ "bid_size",
+ "bid",
+ "midpoint"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "LastQuote"
+ }
+ },
+ "last_trade": {
+ "description": "The most recent trade for this contract. This is only returned if your current plan includes trades.",
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/options/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array"
},
- "market": {
- "description": "The market type of the asset.",
- "enum": [
- "stocks",
- "crypto",
- "fx",
- "otc"
- ],
- "type": "string"
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
},
- "market_cap": {
- "description": "The most recent close price of the ticker multiplied by weighted outstanding shares.",
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
"format": "double",
"type": "number"
},
- "name": {
- "description": "The name of the asset. For stocks/equities this will be the companies registered name. For crypto/fx this will be the name of the currency or coin pair.\n",
- "type": "string"
- },
- "phone_number": {
- "description": "The phone number for the company behind this ticker.",
- "type": "string"
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer"
},
- "primary_exchange": {
- "description": "The ISO code of the primary listing exchange for this asset.",
- "type": "string"
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "int32",
+ "type": "integer"
},
- "share_class_figi": {
- "description": "The share Class OpenFIGI number for this ticker. Find more information [here](https://www.openfigi.com/assets/content/Open_Symbology_Fields-2a61f8aa4d.pdf)",
+ "timeframe": {
+ "description": "The time relevance of the data.",
+ "enum": [
+ "DELAYED",
+ "REAL-TIME"
+ ],
"type": "string"
- },
- "share_class_shares_outstanding": {
- "description": "The recorded number of outstanding shares for this particular share class.",
+ }
+ },
+ "required": [
+ "exchange",
+ "price",
+ "sip_timestamp",
+ "size"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "OptionsLastTrade"
+ }
+ },
+ "open_interest": {
+ "description": "The quantity of this contract held at the end of the last trading day.",
+ "format": "double",
+ "type": "number"
+ },
+ "underlying_asset": {
+ "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.",
+ "properties": {
+ "change_to_break_even": {
+ "description": "The change in price for the contract to break even.",
"format": "double",
"type": "number"
},
- "sic_code": {
- "description": "The standard industrial classification code for this ticker. For a list of SIC Codes, see the SEC's SIC Code List.\n",
- "type": "string"
+ "last_updated": {
+ "description": "The nanosecond timestamp of when this information was updated.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
},
- "sic_description": {
- "description": "A description of this ticker's SIC code.",
- "type": "string"
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
},
"ticker": {
- "description": "The exchange symbol that this item is traded under.",
- "type": "string"
- },
- "ticker_root": {
- "description": "The root of a specified ticker. For example, the root of BRK.A is BRK.",
- "type": "string"
- },
- "ticker_suffix": {
- "description": "The suffix of a specified ticker. For example, the suffix of BRK.A is A.",
+ "description": "The ticker symbol for the contract's underlying asset.",
"type": "string"
},
- "total_employees": {
- "description": "The approximate number of employees for the company.",
- "type": "number"
- },
- "type": {
- "description": "The type of the asset. Find the types that we support via our [Ticker Types API](https://polygon.io/docs/stocks/get_v3_reference_tickers_types).",
+ "timeframe": {
+ "description": "The time relevance of the data.",
+ "enum": [
+ "DELAYED",
+ "REAL-TIME"
+ ],
"type": "string"
},
- "weighted_shares_outstanding": {
- "description": "The shares outstanding calculated assuming all shares of other share classes are converted to this share class.\n",
+ "value": {
+ "description": "The value of the underlying index.",
"format": "double",
"type": "number"
}
},
"required": [
"ticker",
- "name",
- "market",
- "locale",
- "active",
- "currency_name"
+ "change_to_break_even"
],
- "type": "object"
- }
- },
- "type": "object"
- },
- {
- "properties": {
- "request_id": {
- "description": "A request id assigned by the server.",
- "type": "string"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "UnderlyingAsset"
+ }
}
},
- "type": "object"
+ "required": [
+ "day",
+ "last_quote",
+ "underlying_asset",
+ "details",
+ "break_even_price",
+ "open_interest"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "OptionSnapshotResult"
+ }
},
- {
- "properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "status": {
- "description": "The status of this request's response.",
- "type": "string"
- }
- },
- "type": "object"
+ "status": {
+ "description": "The status of this request's response.",
+ "type": "string"
}
- ]
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
}
},
"text/csv": {
- "example": "ticker,name,market,locale,primary_exchange,type,active,currency_name,cik,composite_figi,share_class_figi,share_class_shares_outstanding,weighted_shares_outstanding,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,2771126040150,(408) 996-1010,One Apple Park Way,Cupertino,CA,95014,3571,ELECTRONIC COMPUTERS,AAPL,154000,1980-12-12,https://www.apple.com,\"Apple designs a wide variety of consumer electronic devices, including smartphones (iPhone), tablets (iPad), PCs (Mac), smartwatches (Apple Watch), AirPods, and TV boxes (Apple TV), among others. The iPhone makes up the majority of Apple's total revenue. In addition, Apple offers its customers a variety of services such as Apple Music, iCloud, Apple Care, Apple TV+, Apple Arcade, Apple Card, and Apple Pay, among others. Apple's products run internally developed software and semiconductors, and the firm is well known for its integration of hardware, software and services. Apple's products are distributed online as well as through company-owned stores and third-party retailers. The company generates roughly 40% of its revenue from the Americas, with the remainder earned internationally.\",https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_logo.svg,https://api.polygon.io/v1/reference/company-branding/d3d3LmFwcGxlLmNvbQ/images/2022-01-10_icon.png\n",
"schema": {
+ "example": "break_even_price,day_close,day_high,day_last_updated,day_low,day_open,day_previous_close,day_volume,day_vwap,day_change,day_change_percent,details_contract_type,details_exercise_style,details_expiration_date,details_shares_per_contract,details_strike_price,details_ticker,greeks_delta,greeks_gamma,greeks_theta,greeks_vega,implied_volatility,last_quote_ask,last_quote_ask_size,last_quote_bid,last_quote_bid_size,last_quote_last_updated,last_quote_midpoint,last_quote_timeframe,open_interest,underlying_asset_change_to_break_even,underlying_asset_last_updated,underlying_asset_price,underlying_asset_ticker,underlying_asset_timeframe\n0,171.075,21.4,22.49,1636520400000000000,21.35,22.49,22.45,37,21.6741,-1.05,-4.67,call,american,2023-06-16,100,150,O:AAPL230616C00150000,0.5520187372272933,0.00706756515659829,-0.018532772783847958,0.7274811132998142,0.3048997097864957,21.25,110,20.9,172,1636573458756383500,21.075,REAL-TIME,8921,23.123999999999995,1636573459862384600,147.951,AAPL,REAL-TIME\n",
"type": "string"
}
}
},
- "description": "Reference Tickers."
- },
- "401": {
- "description": "Unauthorized - Check our API Key and account status"
+ "description": "Snapshot of the option contract."
}
},
- "summary": "Ticker Details v3",
+ "summary": "Option Contract",
"tags": [
- "reference:tickers:get"
- ],
- "x-polygon-entitlement-data-type": {
- "description": "Reference data",
- "name": "reference"
- }
- }
- },
- "/v3/snapshot/options/{underlyingAsset}": {
- "get": {
- "description": "Get the snapshot of all options contracts for an underlying ticker.",
- "operationId": "OptionsChain",
- "parameters": [
- {
- "description": "The underlying ticker symbol of the option contract.",
- "example": "AAPL",
- "in": "path",
- "name": "underlyingAsset",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by strike price of a contract.",
- "in": "query",
- "name": "strike_price",
- "schema": {
- "type": "number"
- },
- "x-polygon-filter-field": {
- "range": true,
- "type": "number"
- }
- },
- {
- "description": "Query by contract expiration with date format YYYY-MM-DD.",
- "in": "query",
- "name": "expiration_date",
- "schema": {
- "type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
- }
- },
- {
- "description": "Query by the type of contract.",
- "in": "query",
- "name": "contract_type",
- "schema": {
- "enum": [
- "call",
- "put"
- ],
- "type": "string"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gte",
- "schema": {
- "type": "number"
- }
- },
- {
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.gt",
- "schema": {
- "type": "number"
- }
+ "options:snapshot"
+ ],
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "description": "Real Time Data",
+ "name": "realtime"
},
{
- "description": "Search by strike_price.",
- "in": "query",
- "name": "strike_price.lte",
+ "description": "15 minute delayed data",
+ "name": "delayed"
+ }
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Aggregate data",
+ "name": "aggregates"
+ },
+ "x-massive-entitlement-market-type": {
+ "description": "Options data",
+ "name": "options"
+ }
+ }
+ },
+ "/v3/trades/{cryptoTicker}": {
+ "get": {
+ "description": "Get trades for a crypto ticker symbol in a given time range.",
+ "operationId": "TradesCrypto",
+ "parameters": [
+ {
+ "description": "The ticker symbol to get trades for.",
+ "example": "X:BTC-USD",
+ "in": "path",
+ "name": "cryptoTicker",
+ "required": true,
"schema": {
- "type": "number"
+ "type": "string"
}
},
{
- "description": "Search by strike_price.",
+ "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
"in": "query",
- "name": "strike_price.lt",
+ "name": "timestamp",
"schema": {
- "type": "number"
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "expiration_date.gte",
+ "name": "timestamp.gte",
"schema": {
"type": "string"
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "expiration_date.gt",
+ "name": "timestamp.gt",
"schema": {
"type": "string"
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "expiration_date.lte",
+ "name": "timestamp.lte",
"schema": {
"type": "string"
}
},
{
- "description": "Search by expiration_date.",
+ "description": "Range by timestamp.",
"in": "query",
- "name": "expiration_date.lt",
+ "name": "timestamp.lt",
"schema": {
"type": "string"
}
@@ -23234,6 +29081,7 @@
"in": "query",
"name": "order",
"schema": {
+ "default": "desc",
"enum": [
"asc",
"desc"
@@ -23243,13 +29091,13 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 1000.",
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
"in": "query",
"name": "limit",
"schema": {
- "default": 10,
+ "default": 1000,
"example": 10,
- "maximum": 1000,
+ "maximum": 50000,
"minimum": 1,
"type": "integer"
}
@@ -23259,13 +29107,11 @@
"in": "query",
"name": "sort",
"schema": {
- "default": "ticker",
+ "default": "timestamp",
"enum": [
- "ticker",
- "expiration_date",
- "strike_price"
+ "timestamp"
],
- "example": "ticker",
+ "example": "timestamp",
"type": "string"
}
}
@@ -23275,53 +29121,28 @@
"content": {
"application/json": {
"example": {
- "request_id": "6a7e466379af0a71039d60cc78e72282",
+ "next_url": "https://api.massive.com/v3/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": [
{
- "break_even_price": 151.2,
- "day": {
- "change": 4.5,
- "change_percent": 6.76,
- "close": 120.73,
- "high": 120.81,
- "last_updated": 1605195918507251700,
- "low": 118.9,
- "open": 119.32,
- "previous_close": 119.12,
- "volume": 868,
- "vwap": 119.31
- },
- "details": {
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2022-01-21",
- "shares_per_contract": 100,
- "strike_price": 150,
- "ticker": "AAPL211022C000150000"
- },
- "greeks": {
- "delta": 1,
- "gamma": 0,
- "implied_volatility": 5,
- "theta": 0.00229,
- "vega": 0
- },
- "last_quote": {
- "ask": 120.3,
- "ask_size": 4,
- "bid": 120.28,
- "bid_size": 8,
- "last_updated": 1605195918507251700,
- "midpoint": 120.29
- },
- "open_interest": 1543,
- "underlying_asset": {
- "change_to_break_even": 4.2,
- "last_updated": 1605195918507251700,
- "price": 147,
- "ticker": "AAPL",
- "timeframe": "DELAYED"
- }
+ "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"
@@ -23332,264 +29153,56 @@
"description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
- "request_id": {
- "type": "string"
- },
- "results": {
- "items": {
- "properties": {
- "break_even_price": {
- "description": "The price the underlying asset for the contract to break even. For a call this value is (strike price + premium paid), where a put this value is (strike price - premium paid)",
- "format": "double",
- "type": "number"
- },
- "day": {
- "description": "The most recent daily bar for this contract.",
- "properties": {
- "change": {
- "description": "The value of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "change_percent": {
- "description": "The percent of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The closing price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "high": {
- "description": "The highest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "low": {
- "description": "The lowest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing price for the contract of previous trading day.",
- "format": "double",
- "type": "number"
- },
- "volume": {
- "description": "The trading volume for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "vwap": {
- "description": "The trading volume weighted average price for the contract of the day.",
- "format": "double",
- "type": "number",
- "x-polygon-go-id": "VWAP"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Day"
- }
- },
- "details": {
- "properties": {
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "enum": [
- "put",
- "call",
- "other"
- ],
- "type": "string"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See this link for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "format": "date",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Details"
- }
- },
- "greeks": {
- "description": "The greeks for this contract. This is only returned if your current plan includes greeks.",
- "properties": {
- "delta": {
- "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "gamma": {
- "description": "The change in delta per $0.01 change in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "theta": {
- "description": "The change in the option's price per day.",
- "format": "double",
- "type": "number"
- },
- "vega": {
- "description": "The change in the option's price per 1% increment in volatility.",
- "format": "double",
- "type": "number"
- }
+ "results": {
+ "items": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "Greeks"
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
}
},
- "implied_volatility": {
- "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.",
- "format": "double",
- "type": "number"
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
},
- "last_quote": {
- "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.",
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "description": "The ask size.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "description": "The bid size.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "midpoint": {
- "description": "The average of the bid and ask price.",
- "format": "double",
- "type": "number"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuote"
+ "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"
}
},
- "open_interest": {
- "description": "The quantity of this contract held at the end of the last trading day.",
+ "price": {
+ "description": "The price of the trade in the base currency of the crypto pair.",
"format": "double",
"type": "number"
},
- "underlying_asset": {
- "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.",
- "properties": {
- "change_to_break_even": {
- "description": "The change in price for the contract to break even.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker symbol for the contract's underlying asset.",
- "type": "string"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "UnderlyingAsset"
- }
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
}
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionSnapshotResult"
- }
+ "required": [
+ "exchange",
+ "price",
+ "size",
+ "id"
+ ],
+ "type": "object"
},
"type": "array"
},
@@ -23598,74 +29211,155 @@
"type": "string"
}
},
+ "required": [
+ "status"
+ ],
"type": "object"
}
+ },
+ "text/csv": {
+ "example": "conditions,exchange,id,participant_timestamp,price,size\n1,1,191450340,1625097600103000000,35060,1.0434526\n2,1,191450341,1625097600368000000,35059.99,0.0058883\n",
+ "schema": {
+ "type": "string"
+ }
}
},
- "description": "Snapshots for options contracts of the underlying ticker"
+ "description": "A list of trades."
}
},
- "summary": "Options Chain",
+ "summary": "Trades",
"tags": [
- "options:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "crypto:trades"
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
},
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-market-type": {
+ "description": "Crypto data",
+ "name": "crypto"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
- "default": 10,
- "max": 1000
+ "default": 1000,
+ "example": 10,
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
},
"sort": {
- "default": "ticker",
+ "default": "timestamp",
"enum": [
- "ticker",
- "expiration_date",
- "strike_price"
+ "timestamp"
]
}
+ },
+ "x-massive-replaces": {
+ "date": 1654056060000,
+ "replaces": {
+ "name": "Historic Crypto Trades",
+ "path": "get_v1_historic_crypto__from___to___date"
+ }
}
},
- "x-polygon-draft": true
+ "x-massive-ignore": true
},
- "/v3/snapshot/options/{underlyingAsset}/{optionContract}": {
+ "/v3/trades/{optionsTicker}": {
"get": {
- "description": "Get the snapshot of an option contract for a stock equity.",
- "operationId": "OptionContract",
+ "description": "Get trades for an options ticker symbol in a given time range.",
+ "operationId": "TradesOptions",
"parameters": [
{
- "description": "The underlying ticker symbol of the option contract.",
- "example": "AAPL",
+ "description": "The options ticker symbol to get trades for.",
+ "example": "O:TSLA210903C00700000",
"in": "path",
- "name": "underlyingAsset",
+ "name": "optionsTicker",
"required": true,
"schema": {
"type": "string"
+ },
+ "x-massive-go-id": "Ticker"
+ },
+ {
+ "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "in": "query",
+ "name": "timestamp",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "range": true
}
},
{
- "description": "The option contract identifier.",
- "example": "O:AAPL230616C00150000",
- "in": "path",
- "name": "optionContract",
- "required": true,
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.gt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lte",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by timestamp.",
+ "in": "query",
+ "name": "timestamp.lt",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Order results based on the `sort` field.",
+ "in": "query",
+ "name": "order",
+ "schema": {
+ "default": "desc",
+ "enum": [
+ "asc",
+ "desc"
+ ],
+ "example": "asc",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
+ "in": "query",
+ "name": "limit",
+ "schema": {
+ "default": 1000,
+ "example": 10,
+ "maximum": 50000,
+ "minimum": 1,
+ "type": "integer"
+ }
+ },
+ {
+ "description": "Sort field used for ordering.",
+ "in": "query",
+ "name": "sort",
"schema": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ],
+ "example": "timestamp",
"type": "string"
}
}
@@ -23675,54 +29369,27 @@
"content": {
"application/json": {
"example": {
- "request_id": "d9ff18dac69f55c218f69e4753706acd",
- "results": {
- "break_even_price": 171.075,
- "day": {
- "change": -1.05,
- "change_percent": -4.67,
- "close": 21.4,
- "high": 22.49,
- "last_updated": 1636520400000000000,
- "low": 21.35,
- "open": 22.49,
- "previous_close": 22.45,
- "volume": 37,
- "vwap": 21.6741
- },
- "details": {
- "contract_type": "call",
- "exercise_style": "american",
- "expiration_date": "2023-06-16",
- "shares_per_contract": 100,
- "strike_price": 150,
- "ticker": "O:AAPL230616C00150000"
- },
- "greeks": {
- "delta": 0.5520187372272933,
- "gamma": 0.00706756515659829,
- "theta": -0.018532772783847958,
- "vega": 0.7274811132998142
- },
- "implied_volatility": 0.3048997097864957,
- "last_quote": {
- "ask": 21.25,
- "ask_size": 110,
- "bid": 20.9,
- "bid_size": 172,
- "last_updated": 1636573458756383500,
- "midpoint": 21.075,
- "timeframe": "REAL-TIME"
+ "next_url": "https://api.massive.com/v3/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "results": [
+ {
+ "exchange": 46,
+ "participant_timestamp": 1401715883806000000,
+ "price": 6.91,
+ "sip_timestamp": 1401715883806000000,
+ "size": 1
},
- "open_interest": 8921,
- "underlying_asset": {
- "change_to_break_even": 23.123999999999995,
- "last_updated": 1636573459862384600,
- "price": 147.951,
- "ticker": "AAPL",
- "timeframe": "REAL-TIME"
+ {
+ "conditions": [
+ 209
+ ],
+ "exchange": 67,
+ "participant_timestamp": 1401716547786000000,
+ "price": 7.2,
+ "sip_timestamp": 1401716547786000000,
+ "size": 1
}
- },
+ ],
"status": "OK"
},
"schema": {
@@ -23731,320 +29398,135 @@
"description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
- "request_id": {
- "type": "string"
- },
"results": {
- "properties": {
- "break_even_price": {
- "description": "The price the underlying asset for the contract to break even. For a call this value is (strike price + premium paid), where a put this value is (strike price - premium paid)",
- "format": "double",
- "type": "number"
- },
- "day": {
- "description": "The most recent daily bar for this contract.",
- "properties": {
- "change": {
- "description": "The value of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "change_percent": {
- "description": "The percent of the price change for the contract from the previous trading day.",
- "format": "double",
- "type": "number"
- },
- "close": {
- "description": "The closing price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "high": {
- "description": "The highest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "low": {
- "description": "The lowest price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "open": {
- "description": "The open price for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "previous_close": {
- "description": "The closing price for the contract of previous trading day.",
- "format": "double",
- "type": "number"
- },
- "volume": {
- "description": "The trading volume for the contract of the day.",
- "format": "double",
- "type": "number"
- },
- "vwap": {
- "description": "The trading volume weighted average price for the contract of the day.",
- "format": "double",
- "type": "number",
- "x-polygon-go-id": "VWAP"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Day"
- }
- },
- "details": {
- "properties": {
- "contract_type": {
- "description": "The type of contract. Can be \"put\", \"call\", or in some rare cases, \"other\".",
- "enum": [
- "put",
- "call",
- "other"
- ],
- "type": "string"
- },
- "exercise_style": {
- "description": "The exercise style of this contract. See this link for more details on exercise styles.",
- "enum": [
- "american",
- "european",
- "bermudan"
- ],
- "type": "string"
- },
- "expiration_date": {
- "description": "The contract's expiration date in YYYY-MM-DD format.",
- "format": "date",
- "type": "string",
- "x-polygon-go-type": {
- "name": "IDaysPolygonDateString",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "shares_per_contract": {
- "description": "The number of shares per contract for this contract.",
- "type": "number"
- },
- "strike_price": {
- "description": "The strike price of the option contract.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker for the option contract.",
- "type": "string"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Details"
- }
- },
- "greeks": {
- "description": "The greeks for this contract. This is only returned if your current plan includes greeks.",
- "properties": {
- "delta": {
- "description": "The change in the option's price per $0.01 increment in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "gamma": {
- "description": "The change in delta per $0.01 change in the price of the underlying asset.",
- "format": "double",
- "type": "number"
- },
- "theta": {
- "description": "The change in the option's price per day.",
- "format": "double",
- "type": "number"
- },
- "vega": {
- "description": "The change in the option's price per 1% increment in volatility.",
- "format": "double",
- "type": "number"
- }
- },
- "type": "object",
- "x-polygon-go-type": {
- "name": "Greeks"
- }
- },
- "implied_volatility": {
- "description": "The market's forecast for the volatility of the underlying asset, based on this option's current price.",
- "format": "double",
- "type": "number"
- },
- "last_quote": {
- "description": "The most recent quote for this contract. This is only returned if your current plan includes quotes.",
- "properties": {
- "ask": {
- "description": "The ask price.",
- "format": "double",
- "type": "number"
- },
- "ask_size": {
- "description": "The ask size.",
- "format": "double",
- "type": "number"
- },
- "bid": {
- "description": "The bid price.",
- "format": "double",
- "type": "number"
- },
- "bid_size": {
- "description": "The bid size.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "midpoint": {
- "description": "The average of the bid and ask price.",
- "format": "double",
- "type": "number"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
+ "items": {
+ "properties": {
+ "conditions": {
+ "description": "A list of condition codes.",
+ "items": {
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "format": "int32",
+ "type": "integer"
+ },
+ "type": "array",
+ "x-massive-go-type": {
+ "name": "Int32Array"
}
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "LastQuote"
- }
- },
- "open_interest": {
- "description": "The quantity of this contract held at the end of the last trading day.",
- "format": "double",
- "type": "number"
- },
- "underlying_asset": {
- "description": "Information on the underlying stock for this options contract. The market data returned depends on your current stocks plan.",
- "properties": {
- "change_to_break_even": {
- "description": "The change in price for the contract to break even.",
- "format": "double",
- "type": "number"
- },
- "last_updated": {
- "description": "The nanosecond timestamp of when this information was updated.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
- },
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of this trade. A trade of 100 shares with a price of $2.00 would be worth a total dollar value of $200.00.",
- "format": "double",
- "type": "number"
- },
- "ticker": {
- "description": "The ticker symbol for the contract's underlying asset.",
- "type": "string"
- },
- "timeframe": {
- "description": "The time relevance of the data.",
- "enum": [
- "DELAYED",
- "REAL-TIME"
- ],
- "type": "string"
+ "correction": {
+ "description": "The trade correction indicator.",
+ "type": "integer"
+ },
+ "exchange": {
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
+ "type": "integer"
+ },
+ "participant_timestamp": {
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
}
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "UnderlyingAsset"
+ "price": {
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
+ "format": "double",
+ "type": "number"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
+ "size": {
+ "description": "The size of a trade (also known as volume).",
+ "format": "double",
+ "type": "number"
}
- }
+ },
+ "required": [
+ "exchange",
+ "price",
+ "sip_timestamp",
+ "size"
+ ],
+ "type": "object"
},
- "type": "object",
- "x-polygon-go-type": {
- "name": "OptionSnapshotResult"
- }
+ "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": {
- "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": "A list of trades."
}
},
- "summary": "Option Contract",
+ "summary": "Trades",
"tags": [
- "options:snapshot"
- ],
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "description": "Real Time Data",
- "name": "realtime"
- },
- {
- "description": "15 minute delayed data",
- "name": "delayed"
- }
+ "options:trades"
],
- "x-polygon-entitlement-data-type": {
- "description": "Aggregate data",
- "name": "aggregates"
+ "x-massive-entitlement-data-type": {
+ "description": "Trade data",
+ "name": "trades"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"description": "Options data",
"name": "options"
+ },
+ "x-massive-paginate": {
+ "limit": {
+ "default": 1000,
+ "example": 10,
+ "max": 50000
+ },
+ "order": {
+ "default": "desc"
+ },
+ "sort": {
+ "default": "timestamp",
+ "enum": [
+ "timestamp"
+ ]
+ }
}
- }
+ },
+ "x-massive-ignore": true
},
- "/v3/trades/{cryptoTicker}": {
+ "/v3/trades/{stockTicker}": {
"get": {
- "description": "Get trades for a crypto ticker symbol in a given time range.",
- "operationId": "TradesCrypto",
+ "description": "Get trades for a ticker symbol in a given time range.",
+ "operationId": "Trades",
"parameters": [
{
"description": "The ticker symbol to get trades for.",
- "example": "X:BTC-USD",
+ "example": "AAPL",
"in": "path",
- "name": "cryptoTicker",
+ "name": "stockTicker",
"required": true,
"schema": {
"type": "string"
- }
+ },
+ "x-massive-go-id": "Ticker"
},
{
"description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
@@ -24053,12 +29535,12 @@
"schema": {
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gte",
"schema": {
@@ -24066,7 +29548,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.gt",
"schema": {
@@ -24074,7 +29556,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lte",
"schema": {
@@ -24082,7 +29564,7 @@
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by timestamp.",
"in": "query",
"name": "timestamp.lt",
"schema": {
@@ -24104,11 +29586,11 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Limit the number of results returned, default is 1000 and max is 50000.",
"in": "query",
"name": "limit",
"schema": {
- "default": 10,
+ "default": 1000,
"example": 10,
"maximum": 50000,
"minimum": 1,
@@ -24134,28 +29616,36 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/trades/X:BTC-USD?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "next_url": "https://api.massive.com/v3/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": [
{
"conditions": [
- 1
+ 12,
+ 41
],
- "exchange": 1,
- "id": "191450340",
- "participant_timestamp": 1625097600103000000,
- "price": 35060,
- "size": 1.0434526
+ "exchange": 11,
+ "id": "1",
+ "participant_timestamp": 1517562000015577000,
+ "price": 171.55,
+ "sequence_number": 1063,
+ "sip_timestamp": 1517562000016036600,
+ "size": 100,
+ "tape": 3
},
{
"conditions": [
- 2
+ 12,
+ 41
],
- "exchange": 1,
- "id": "191450341",
- "participant_timestamp": 1625097600368000000,
- "price": 35059.99,
- "size": 0.0058883
+ "exchange": 11,
+ "id": "2",
+ "participant_timestamp": 1517562000015577600,
+ "price": 171.55,
+ "sequence_number": 1064,
+ "sip_timestamp": 1517562000016038100,
+ "size": 100,
+ "tape": 3
}
],
"status": "OK"
@@ -24172,44 +29662,92 @@
"conditions": {
"description": "A list of condition codes.",
"items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
+ "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://massive.com/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
"format": "int32",
"type": "integer"
},
"type": "array",
- "x-polygon-go-type": {
+ "x-massive-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.",
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs.",
"type": "integer"
},
"id": {
- "description": "The Trade ID which uniquely identifies a trade on the exchange that the trade happened on.",
+ "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
"type": "string"
},
"participant_timestamp": {
- "description": "The nanosecond Exchange Unix Timestamp. This is the timestamp of when the trade was generated at the exchange.",
+ "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
"format": "int64",
"type": "integer",
- "x-polygon-go-type": {
+ "x-massive-go-type": {
"name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
+ "path": "github.com/massive-com/ptime"
}
},
"price": {
- "description": "The price of the trade in the base currency of the crypto pair.",
+ "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
"format": "double",
"type": "number"
},
+ "sequence_number": {
+ "description": "The sequence number represents the sequence in which trade events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
+ "format": "int64",
+ "type": "integer"
+ },
+ "sip_timestamp": {
+ "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
+ },
"size": {
"description": "The size of a trade (also known as volume).",
"format": "double",
"type": "number"
+ },
+ "tape": {
+ "description": "There are 3 tapes which define which exchange the ticker is listed on. These are integers in our objects which represent the letter of the alphabet. Eg: 1 = A, 2 = B, 3 = C.\n* Tape A is NYSE listed securities\n* Tape B is NYSE ARCA / NYSE American\n* Tape C is NASDAQ",
+ "format": "int32",
+ "type": "integer"
+ },
+ "trf_id": {
+ "description": "The ID for the Trade Reporting Facility where the trade took place.",
+ "type": "integer"
+ },
+ "trf_timestamp": {
+ "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this trade.",
+ "format": "int64",
+ "type": "integer",
+ "x-massive-go-type": {
+ "name": "INanoseconds",
+ "path": "github.com/massive-com/ptime"
+ }
}
},
- "type": "object"
+ "required": [
+ "exchange",
+ "id",
+ "price",
+ "sequence_number",
+ "sip_timestamp",
+ "participant_timestamp",
+ "size"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "CommonTrade"
+ }
},
"type": "array"
},
@@ -24218,11 +29756,14 @@
"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",
+ "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"
}
@@ -24233,18 +29774,20 @@
},
"summary": "Trades",
"tags": [
- "crypto:trades"
+ "stocks:trades"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Trade data",
"name": "trades"
},
- "x-polygon-entitlement-market-type": {
- "description": "Crypto data",
- "name": "crypto"
+ "x-massive-entitlement-market-type": {
+ "description": "Stocks data",
+ "name": "stocks"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
+ "default": 1000,
+ "example": 10,
"max": 50000
},
"order": {
@@ -24257,72 +29800,178 @@
]
}
},
- "x-polygon-replaces": {
+ "x-massive-replaces": {
"date": 1654056060000,
"replaces": {
- "name": "Historic Crypto Trades",
- "path": "get_v1_historic_crypto__from___to___date"
+ "name": "Trades",
+ "path": "get_v2_ticks_stocks_trades__ticker___date"
}
}
- },
- "x-polygon-ignore": true
+ }
},
- "/v3/trades/{optionsTicker}": {
+ "/vX/reference/financials": {
"get": {
- "description": "Get trades for an options ticker symbol in a given time range.",
- "operationId": "TradesOptions",
+ "description": "Get historical financial data for a stock ticker.\nThe financials data is extracted from XBRL from company SEC filings using the methodology outlined here.",
+ "operationId": "ListFinancials",
"parameters": [
{
- "description": "The options ticker symbol to get trades for.",
- "example": "O:TSLA210903C00700000",
- "in": "path",
- "name": "optionsTicker",
- "required": true,
+ "description": "Query by company ticker.",
+ "in": "query",
+ "name": "ticker",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by central index key (CIK) Number",
+ "in": "query",
+ "name": "cik",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by company name.",
+ "in": "query",
+ "name": "company_name",
+ "schema": {
+ "type": "string"
+ },
+ "x-massive-filter-field": {
+ "search": true
+ }
+ },
+ {
+ "description": "Query by standard industrial classification (SIC)",
+ "in": "query",
+ "name": "sic",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Query by the date when the filing with financials data was filed in YYYY-MM-DD format.\n\nBest used when querying over date ranges to find financials based on filings that happen in a time period.\n\nExamples:\n\nTo get financials based on filings that have happened after January 1, 2009 use the query param filing_date.gte=2009-01-01\n\nTo get financials based on filings that happened in the year 2009 use the query params filing_date.gte=2009-01-01&filing_date.lt=2010-01-01",
+ "in": "query",
+ "name": "filing_date",
"schema": {
+ "format": "date",
"type": "string"
},
- "x-polygon-go-id": "Ticker"
+ "x-massive-filter-field": {
+ "range": true
+ }
},
{
- "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "description": "The period of report for the filing with financials data in YYYY-MM-DD format.",
"in": "query",
- "name": "timestamp",
+ "name": "period_of_report_date",
"schema": {
+ "format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
+ "x-massive-filter-field": {
"range": true
}
},
{
- "description": "Search by timestamp.",
+ "description": "Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their annual report, so some companies my not return quarterly financials for Q4",
"in": "query",
- "name": "timestamp.gte",
+ "name": "timeframe",
"schema": {
+ "enum": [
+ "annual",
+ "quarterly",
+ "ttm"
+ ],
"type": "string"
}
},
{
- "description": "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"
}
},
@@ -24331,7 +29980,6 @@
"in": "query",
"name": "order",
"schema": {
- "default": "desc",
"enum": [
"asc",
"desc"
@@ -24341,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"
}
@@ -24357,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"
}
}
@@ -24371,88 +30020,438 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/trades/O:AZO140621P00530000?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "count": 1,
+ "next_url": "https://api.massive.com/vX/reference/financials?",
+ "request_id": "55eb92ed43b25568ab0cce159830ea34",
"results": [
{
- "exchange": 46,
- "participant_timestamp": 1401715883806000000,
- "price": 6.91,
- "sip_timestamp": 1401715883806000000,
- "size": 1
- },
- {
- "conditions": [
- 209
- ],
- "exchange": 67,
- "participant_timestamp": 1401716547786000000,
- "price": 7.2,
- "sip_timestamp": 1401716547786000000,
- "size": 1
+ "cik": "0001650729",
+ "company_name": "SiteOne Landscape Supply, Inc.",
+ "end_date": "2022-04-03",
+ "filing_date": "2022-05-04",
+ "financials": {
+ "balance_sheet": {
+ "assets": {
+ "label": "Assets",
+ "order": 100,
+ "unit": "USD",
+ "value": 2407400000
+ },
+ "current_assets": {
+ "label": "Current Assets",
+ "order": 200,
+ "unit": "USD",
+ "value": 1385900000
+ },
+ "current_liabilities": {
+ "label": "Current Liabilities",
+ "order": 700,
+ "unit": "USD",
+ "value": 597500000
+ },
+ "equity": {
+ "label": "Equity",
+ "order": 1400,
+ "unit": "USD",
+ "value": 1099200000
+ },
+ "equity_attributable_to_noncontrolling_interest": {
+ "label": "Equity Attributable To Noncontrolling Interest",
+ "order": 1500,
+ "unit": "USD",
+ "value": 0
+ },
+ "equity_attributable_to_parent": {
+ "label": "Equity Attributable To Parent",
+ "order": 1600,
+ "unit": "USD",
+ "value": 1099200000
+ },
+ "liabilities": {
+ "label": "Liabilities",
+ "order": 600,
+ "unit": "USD",
+ "value": 1308200000
+ },
+ "liabilities_and_equity": {
+ "label": "Liabilities And Equity",
+ "order": 1900,
+ "unit": "USD",
+ "value": 2407400000
+ },
+ "noncurrent_assets": {
+ "label": "Noncurrent Assets",
+ "order": 300,
+ "unit": "USD",
+ "value": 1021500000
+ },
+ "noncurrent_liabilities": {
+ "label": "Noncurrent Liabilities",
+ "order": 800,
+ "unit": "USD",
+ "value": 710700000
+ }
+ },
+ "cash_flow_statement": {
+ "exchange_gains_losses": {
+ "label": "Exchange Gains/Losses",
+ "order": 1000,
+ "unit": "USD",
+ "value": 100000
+ },
+ "net_cash_flow": {
+ "label": "Net Cash Flow",
+ "order": 1100,
+ "unit": "USD",
+ "value": -8600000
+ },
+ "net_cash_flow_continuing": {
+ "label": "Net Cash Flow, Continuing",
+ "order": 1200,
+ "unit": "USD",
+ "value": -8700000
+ },
+ "net_cash_flow_from_financing_activities": {
+ "label": "Net Cash Flow From Financing Activities",
+ "order": 700,
+ "unit": "USD",
+ "value": 150600000
+ },
+ "net_cash_flow_from_financing_activities_continuing": {
+ "label": "Net Cash Flow From Financing Activities, Continuing",
+ "order": 800,
+ "unit": "USD",
+ "value": 150600000
+ },
+ "net_cash_flow_from_investing_activities": {
+ "label": "Net Cash Flow From Investing Activities",
+ "order": 400,
+ "unit": "USD",
+ "value": -41000000
+ },
+ "net_cash_flow_from_investing_activities_continuing": {
+ "label": "Net Cash Flow From Investing Activities, Continuing",
+ "order": 500,
+ "unit": "USD",
+ "value": -41000000
+ },
+ "net_cash_flow_from_operating_activities": {
+ "label": "Net Cash Flow From Operating Activities",
+ "order": 100,
+ "unit": "USD",
+ "value": -118300000
+ },
+ "net_cash_flow_from_operating_activities_continuing": {
+ "label": "Net Cash Flow From Operating Activities, Continuing",
+ "order": 200,
+ "unit": "USD",
+ "value": -118300000
+ }
+ },
+ "comprehensive_income": {
+ "comprehensive_income_loss": {
+ "label": "Comprehensive Income/Loss",
+ "order": 100,
+ "unit": "USD",
+ "value": 40500000
+ },
+ "comprehensive_income_loss_attributable_to_noncontrolling_interest": {
+ "label": "Comprehensive Income/Loss Attributable To Noncontrolling Interest",
+ "order": 200,
+ "unit": "USD",
+ "value": 0
+ },
+ "comprehensive_income_loss_attributable_to_parent": {
+ "label": "Comprehensive Income/Loss Attributable To Parent",
+ "order": 300,
+ "unit": "USD",
+ "value": 40500000
+ },
+ "other_comprehensive_income_loss": {
+ "label": "Other Comprehensive Income/Loss",
+ "order": 400,
+ "unit": "USD",
+ "value": 40500000
+ },
+ "other_comprehensive_income_loss_attributable_to_parent": {
+ "label": "Other Comprehensive Income/Loss Attributable To Parent",
+ "order": 600,
+ "unit": "USD",
+ "value": 8200000
+ }
+ },
+ "income_statement": {
+ "basic_earnings_per_share": {
+ "label": "Basic Earnings Per Share",
+ "order": 4200,
+ "unit": "USD / shares",
+ "value": 0.72
+ },
+ "benefits_costs_expenses": {
+ "label": "Benefits Costs and Expenses",
+ "order": 200,
+ "unit": "USD",
+ "value": 768400000
+ },
+ "cost_of_revenue": {
+ "label": "Cost Of Revenue",
+ "order": 300,
+ "unit": "USD",
+ "value": 536100000
+ },
+ "costs_and_expenses": {
+ "label": "Costs And Expenses",
+ "order": 600,
+ "unit": "USD",
+ "value": 768400000
+ },
+ "diluted_earnings_per_share": {
+ "label": "Diluted Earnings Per Share",
+ "order": 4300,
+ "unit": "USD / shares",
+ "value": 0.7
+ },
+ "gross_profit": {
+ "label": "Gross Profit",
+ "order": 800,
+ "unit": "USD",
+ "value": 269200000
+ },
+ "income_loss_from_continuing_operations_after_tax": {
+ "label": "Income/Loss From Continuing Operations After Tax",
+ "order": 1400,
+ "unit": "USD",
+ "value": 32300000
+ },
+ "income_loss_from_continuing_operations_before_tax": {
+ "label": "Income/Loss From Continuing Operations Before Tax",
+ "order": 1500,
+ "unit": "USD",
+ "value": 36900000
+ },
+ "income_tax_expense_benefit": {
+ "label": "Income Tax Expense/Benefit",
+ "order": 2200,
+ "unit": "USD",
+ "value": 4600000
+ },
+ "interest_expense_operating": {
+ "label": "Interest Expense, Operating",
+ "order": 2700,
+ "unit": "USD",
+ "value": 4300000
+ },
+ "net_income_loss": {
+ "label": "Net Income/Loss",
+ "order": 3200,
+ "unit": "USD",
+ "value": 32300000
+ },
+ "net_income_loss_attributable_to_noncontrolling_interest": {
+ "label": "Net Income/Loss Attributable To Noncontrolling Interest",
+ "order": 3300,
+ "unit": "USD",
+ "value": 0
+ },
+ "net_income_loss_attributable_to_parent": {
+ "label": "Net Income/Loss Attributable To Parent",
+ "order": 3500,
+ "unit": "USD",
+ "value": 32300000
+ },
+ "net_income_loss_available_to_common_stockholders_basic": {
+ "label": "Net Income/Loss Available To Common Stockholders, Basic",
+ "order": 3700,
+ "unit": "USD",
+ "value": 32300000
+ },
+ "operating_expenses": {
+ "label": "Operating Expenses",
+ "order": 1000,
+ "unit": "USD",
+ "value": 228000000
+ },
+ "operating_income_loss": {
+ "label": "Operating Income/Loss",
+ "order": 1100,
+ "unit": "USD",
+ "value": 41200000
+ },
+ "participating_securities_distributed_and_undistributed_earnings_loss_basic": {
+ "label": "Participating Securities, Distributed And Undistributed Earnings/Loss, Basic",
+ "order": 3800,
+ "unit": "USD",
+ "value": 0
+ },
+ "preferred_stock_dividends_and_other_adjustments": {
+ "label": "Preferred Stock Dividends And Other Adjustments",
+ "order": 3900,
+ "unit": "USD",
+ "value": 0
+ },
+ "revenues": {
+ "label": "Revenues",
+ "order": 100,
+ "unit": "USD",
+ "value": 805300000
+ }
+ }
+ },
+ "fiscal_period": "Q1",
+ "fiscal_year": "2022",
+ "source_filing_file_url": "https://api.massive.com/v1/reference/sec/filings/0001650729-22-000010/files/site-20220403_htm.xml",
+ "source_filing_url": "https://api.massive.com/v1/reference/sec/filings/0001650729-22-000010",
+ "start_date": "2022-01-03"
}
],
"status": "OK"
},
"schema": {
"properties": {
+ "count": {
+ "description": "The total number of results for this request.",
+ "type": "integer"
+ },
"next_url": {
"description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
"results": {
"items": {
"properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
+ "acceptance_datetime": {
+ "description": "The datetime (EST timezone) the filing was accepted by EDGAR in YYYYMMDDHHMMSS format."
+ },
+ "cik": {
+ "description": "The CIK number for the company.",
+ "type": "string"
+ },
+ "company_name": {
+ "description": "The company name.",
+ "type": "string"
+ },
+ "end_date": {
+ "description": "The end date of the period that these financials cover in YYYYMMDD format.",
+ "type": "string"
+ },
+ "filing_date": {
+ "description": "The date that the SEC filing which these financials were derived from was made available. Note that this is not necessarily the date when this information became public, as some companies may publish a press release before filing with the SEC."
+ },
+ "financials": {
+ "properties": {
+ "balance_sheet": {
+ "description": "Balance sheet.\nThe keys in this object can be any of the fields listed in the Balance Sheet section of the financials API glossary of terms.",
+ "properties": {
+ "*": {
+ "description": "An individual financial data point.",
+ "properties": {
+ "derived_from": {
+ "description": "The list of report IDs (or errata) which were used to derive this data point.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true` and if source is SourceInterReportDerived.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "formula": {
+ "description": "The name of the formula used to derive this data point from other financial data points.\nInformation about the formulas can be found here.\nThis value is only returned for data points that are not explicitly expressed within the XBRL source file when the `include_sources` query parameter is `true` and if source is SourceIntraReportImpute.",
+ "type": "string"
+ },
+ "label": {
+ "description": "A human readable label for the financial data point.",
+ "type": "string"
+ },
+ "order": {
+ "description": "An indicator of what order within the statement that you would find this data point.",
+ "type": "integer"
+ },
+ "source": {
+ "description": "The source where this data point came from. This will be one of: SourceDirectReport, SourceIntraReportImpute or SourceInterReportDerived."
+ },
+ "unit": {
+ "description": "The unit of the financial data point.",
+ "type": "string"
+ },
+ "value": {
+ "description": "The value of the financial data point.",
+ "type": "number"
+ },
+ "xpath": {
+ "description": "The XPath 1.0 query that identifies the fact from within the XBRL source file.\nThis value is only returned for data points taken directly from XBRL when the `include_sources` query parameter is `true` and if source is SourceDirectReport.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "label",
+ "order",
+ "value",
+ "unit"
+ ],
+ "type": "object"
+ }
+ },
+ "type": "object"
+ },
+ "cash_flow_statement": {
+ "description": "Cash flow statement.\nThe keys in this object can be any of the fields listed in the Cash Flow Statement section of the financials API glossary of terms.\nSee the attributes of the objects within `balance_sheet` for more details.",
+ "type": "object"
+ },
+ "comprehensive_income": {
+ "description": "Comprehensive income.\nThe keys in this object can be any of the fields listed in the Comprehensive Income section of the financials API glossary of terms.\nSee the attributes of the objects within `balance_sheet` for more details.",
+ "type": "object"
+ },
+ "income_statement": {
+ "description": "Income statement.\nThe keys in this object can be any of the fields listed in the Income Statement section of the financials API glossary of terms.\nSee the attributes of the objects within `balance_sheet` for more details.",
+ "type": "object"
+ }
},
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
+ "type": "object"
},
- "correction": {
- "description": "The trade correction indicator.",
- "type": "integer"
+ "fiscal_period": {
+ "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).",
+ "type": "string"
},
- "exchange": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "fiscal_year": {
+ "description": "Fiscal year of the report according to the company.",
+ "type": "string"
},
- "participant_timestamp": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
+ "source_filing_file_url": {
+ "description": "The URL of the specific XBRL instance document within the SEC filing that these financials were derived from."
},
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
- "type": "number"
+ "source_filing_url": {
+ "description": "The URL of the SEC filing that these financials were derived from.",
+ "type": "string"
},
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
+ "start_date": {
+ "description": "The start date of the period that these financials cover in YYYYMMDD format.",
+ "type": "string"
},
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
- "type": "number"
+ "tickers": {
+ "description": "The list of ticker symbols for the company.",
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ "timeframe": {
+ "description": "The timeframe of the report (quarterly, annual or ttm).",
+ "type": "string"
}
},
- "type": "object"
+ "required": [
+ "cik",
+ "company_name",
+ "financials",
+ "timeframe",
+ "fiscal_period"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "FinancialReport"
+ }
},
"type": "array"
},
@@ -24461,104 +30460,135 @@
"type": "string"
}
},
+ "required": [
+ "status",
+ "request_id",
+ "count",
+ "results"
+ ],
"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."
+ "description": "FIXME"
}
},
- "summary": "Trades",
+ "summary": "Stock Financials vX",
"tags": [
- "options:trades"
+ "reference:stocks"
],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Options data",
- "name": "options"
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-experimental": {},
+ "x-massive-paginate": {
"limit": {
- "max": 50000
- },
- "order": {
- "default": "desc"
+ "default": 10,
+ "max": 100
},
"sort": {
- "default": "timestamp",
+ "default": "period_of_report_date",
"enum": [
- "timestamp"
+ "filing_date",
+ "period_of_report_date"
]
}
}
- },
- "x-polygon-ignore": true
+ }
},
- "/v3/trades/{stockTicker}": {
+ "/vX/reference/ipos": {
"get": {
- "description": "Get trades for a ticker symbol in a given time range.",
- "operationId": "Trades",
+ "description": "The IPOs API provides access to detailed information about Initial Public Offerings (IPOs), including both upcoming and historical events. With this API, you can query for a comprehensive list of IPOs, along with key details such as the issuer name, ticker symbol, ISIN, IPO date, number of shares offered, expected price range, and final offering price. You can filter the results by status to focus on new, rumors, pending, historical, and more.",
+ "operationId": "ListIPOs",
"parameters": [
{
- "description": "The ticker symbol to get trades for.",
- "example": "AAPL",
- "in": "path",
- "name": "stockTicker",
- "required": true,
+ "description": "Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.",
+ "in": "query",
+ "name": "ticker",
"schema": {
"type": "string"
- },
- "x-polygon-go-id": "Ticker"
+ }
},
{
- "description": "Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp.",
+ "description": "Specify a us_code. This is a unique nine-character alphanumeric code that identifies a North American financial security for the purposes of facilitating clearing and settlement of trades.",
"in": "query",
- "name": "timestamp",
+ "name": "us_code",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Specify an International Securities Identification Number (ISIN). This is a unique twelve-digit code that is assigned to every security issuance in the world.",
+ "in": "query",
+ "name": "isin",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "description": "Specify a listing date. This is the first trading date for the newly listed entity.",
+ "in": "query",
+ "name": "listing_date",
"schema": {
+ "format": "date",
"type": "string"
},
- "x-polygon-filter-field": {
- "range": true
+ "x-massive-filter-field": {
+ "range": true,
+ "type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Specify an IPO status.",
"in": "query",
- "name": "timestamp.gte",
+ "name": "ipo_status",
"schema": {
+ "enum": [
+ "direct_listing_process",
+ "history",
+ "new",
+ "pending",
+ "postponed",
+ "rumor",
+ "withdrawn"
+ ],
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by listing_date.",
"in": "query",
- "name": "timestamp.gt",
+ "name": "listing_date.gte",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by listing_date.",
"in": "query",
- "name": "timestamp.lte",
+ "name": "listing_date.gt",
"schema": {
+ "format": "date",
"type": "string"
}
},
{
- "description": "Search by timestamp.",
+ "description": "Range by listing_date.",
"in": "query",
- "name": "timestamp.lt",
+ "name": "listing_date.lte",
+ "schema": {
+ "format": "date",
+ "type": "string"
+ }
+ },
+ {
+ "description": "Range by listing_date.",
+ "in": "query",
+ "name": "listing_date.lt",
"schema": {
+ "format": "date",
"type": "string"
}
},
@@ -24577,13 +30607,13 @@
}
},
{
- "description": "Limit the number of results returned, default is 10 and max is 50000.",
+ "description": "Limit the number of results returned, default is 10 and max is 1000.",
"in": "query",
"name": "limit",
"schema": {
"default": 10,
"example": 10,
- "maximum": 50000,
+ "maximum": 1000,
"minimum": 1,
"type": "integer"
}
@@ -24593,11 +30623,29 @@
"in": "query",
"name": "sort",
"schema": {
- "default": "timestamp",
+ "default": "listing_date",
"enum": [
- "timestamp"
+ "listing_date",
+ "ticker",
+ "last_updated",
+ "security_type",
+ "issuer_name",
+ "currency_code",
+ "isin",
+ "us_code",
+ "final_issue_price",
+ "min_shares_offered",
+ "max_shares_offered",
+ "lowest_offer_price",
+ "highest_offer_price",
+ "total_offer_size",
+ "shares_outstanding",
+ "primary_exchange",
+ "lot_size",
+ "security_description",
+ "ipo_status"
],
- "example": "timestamp",
+ "example": "listing_date",
"type": "string"
}
}
@@ -24607,36 +30655,31 @@
"content": {
"application/json": {
"example": {
- "next_url": "https://api.polygon.io/v3/trades/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
- "request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
+ "next_url": "https://api.massive.com/vX/reference/ipos?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
+ "request_id": "6a7e466379af0a71039d60cc78e72282",
"results": [
{
- "conditions": [
- 12,
- 41
- ],
- "exchange": 11,
- "id": "1",
- "participant_timestamp": 1517562000015577000,
- "price": 171.55,
- "sequence_number": 1063,
- "sip_timestamp": 1517562000016036600,
- "size": 100,
- "tape": 3
- },
- {
- "conditions": [
- 12,
- 41
- ],
- "exchange": 11,
- "id": "2",
- "participant_timestamp": 1517562000015577600,
- "price": 171.55,
- "sequence_number": 1064,
- "sip_timestamp": 1517562000016038100,
- "size": 100,
- "tape": 3
+ "currency_code": "USD",
+ "final_issue_price": 17,
+ "highest_offer_price": 17,
+ "ipo_status": "history",
+ "isin": "US75383L1026",
+ "issue_end_date": "2024-06-06",
+ "issue_start_date": "2024-06-01",
+ "issuer_name": "Rapport Therapeutics Inc.",
+ "last_updated": "2024-06-27",
+ "listing_date": "2024-06-07",
+ "lot_size": 100,
+ "lowest_offer_price": 17,
+ "max_shares_offered": 8000000,
+ "min_shares_offered": 1000000,
+ "primary_exchange": "XNAS",
+ "security_description": "Ordinary Shares",
+ "security_type": "CS",
+ "shares_outstanding": 35376457,
+ "ticker": "RAPP",
+ "total_offer_size": 136000000,
+ "us_code": "75383L102"
}
],
"status": "OK"
@@ -24647,86 +30690,137 @@
"description": "If present, this value can be used to fetch the next page of data.",
"type": "string"
},
+ "request_id": {
+ "description": "A request id assigned by the server.",
+ "type": "string"
+ },
"results": {
+ "description": "An array of results containing the requested data.",
"items": {
"properties": {
- "conditions": {
- "description": "A list of condition codes.",
- "items": {
- "description": "The condition code. These are the conditions of this message. See\n[Condition Mappings](https://polygon.io/docs/stocks/get_v3_reference_conditions)\nfor a mapping to exchange conditions.",
- "format": "int32",
- "type": "integer"
- },
- "type": "array",
- "x-polygon-go-type": {
- "name": "Int32Array"
- }
+ "currency_code": {
+ "description": "Underlying currency of the security.",
+ "example": "USD",
+ "type": "string"
},
- "correction": {
- "description": "The trade correction indicator.",
- "type": "integer"
+ "final_issue_price": {
+ "description": "The price set by the company and its underwriters before the IPO goes live.",
+ "example": 14.5,
+ "format": "float",
+ "type": "number"
},
- "exchange": {
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs.",
- "type": "integer"
+ "highest_offer_price": {
+ "description": "The highest price within the IPO price range that the company might use to price the shares.",
+ "example": 20,
+ "format": "float",
+ "type": "number"
},
- "id": {
- "description": "The Trade ID which uniquely identifies a trade. These are unique per\ncombination of ticker, exchange, and TRF. For example: A trade for AAPL\nexecuted on NYSE and a trade for AAPL executed on NASDAQ could potentially\nhave the same Trade ID.",
+ "ipo_status": {
+ "description": "The status of the IPO event. IPO events start out as status \"rumor\" or \"pending\". On listing day, the status changes to \"new\". After the listing day, the status changes to \"history\".\n\nThe status \"direct_listing_process\" corresponds to a type of offering where, instead of going through all the IPO processes, the company decides to list its shares directly on an exchange, without using an investment bank or other intermediaries. This is called a direct listing, direct placement, or direct public offering (DPO).",
+ "enum": [
+ "direct_listing_process",
+ "history",
+ "new",
+ "pending",
+ "postponed",
+ "rumor",
+ "withdrawn"
+ ],
+ "example": "history",
"type": "string"
},
- "participant_timestamp": {
- "description": "The nanosecond accuracy Participant/Exchange Unix Timestamp. This is the timestamp of when the trade was actually generated at the exchange.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
+ "isin": {
+ "description": "International Securities Identification Number. This is a unique twelve-digit code that is assigned to every security issuance in the world.",
+ "example": "US0378331005",
+ "type": "string"
},
- "price": {
- "description": "The price of the trade. This is the actual dollar value per whole share of\nthis trade. A trade of 100 shares with a price of $2.00 would be worth a\ntotal dollar value of $200.00.",
- "format": "double",
+ "issuer_name": {
+ "description": "Name of issuer.",
+ "example": "Apple Inc.",
+ "type": "string"
+ },
+ "last_updated": {
+ "description": "The date when the IPO event was last modified.",
+ "example": "2023-01-02",
+ "format": "date",
+ "type": "string"
+ },
+ "listing_date": {
+ "description": "First trading date for the newly listed entity.",
+ "example": "2023-02-01",
+ "format": "date",
+ "type": "string"
+ },
+ "lot_size": {
+ "description": "The minimum number of shares that can be bought or sold in a single transaction.",
+ "example": 100,
"type": "number"
},
- "sequence_number": {
- "description": "The sequence number represents the sequence in which trade events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.",
- "format": "int64",
- "type": "integer"
+ "lowest_offer_price": {
+ "description": "The lowest price within the IPO price range that the company is willing to offer its shares to investors.",
+ "example": 10,
+ "format": "float",
+ "type": "number"
},
- "sip_timestamp": {
- "description": "The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
+ "max_shares_offered": {
+ "description": "The upper limit of the shares that the company is offering to investors.",
+ "example": 1000,
+ "type": "number"
+ },
+ "min_shares_offered": {
+ "description": "The lower limit of shares that the company is willing to sell in the IPO.",
+ "example": 1000,
+ "type": "number"
+ },
+ "primary_exchange": {
+ "description": "Market Identifier Code (MIC) of the primary exchange where the security is listed. The Market Identifier Code (MIC) (ISO 10383) is a unique identification code used to identify securities trading exchanges, regulated and non-regulated trading markets.",
+ "example": "XNAS",
+ "type": "string"
+ },
+ "security_description": {
+ "description": "Description of the security.",
+ "example": "Ordinary Shares - Class A",
+ "type": "string"
+ },
+ "security_type": {
+ "description": "The classification of the stock. For example, \"CS\" stands for Common Stock.",
+ "example": "CS",
+ "type": "string"
},
- "size": {
- "description": "The size of a trade (also known as volume).",
- "format": "double",
+ "shares_outstanding": {
+ "description": "The total number of shares that the company has issued and are held by investors.",
+ "example": 1000000,
"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"
+ "ticker": {
+ "description": "The ticker symbol of the IPO event.",
+ "example": "AAPL",
+ "type": "string"
},
- "trf_id": {
- "description": "The ID for the Trade Reporting Facility where the trade took place.",
- "type": "integer"
+ "total_offer_size": {
+ "description": "The total amount raised by the company for IPO.",
+ "example": 1000000,
+ "format": "float",
+ "type": "number"
},
- "trf_timestamp": {
- "description": "The nanosecond accuracy TRF (Trade Reporting Facility) Unix Timestamp. This is the timestamp of when the trade reporting facility received this trade.",
- "format": "int64",
- "type": "integer",
- "x-polygon-go-type": {
- "name": "INanoseconds",
- "path": "github.com/polygon-io/ptime"
- }
+ "us_code": {
+ "description": "This is a unique nine-character alphanumeric code that identifies a North American financial security for the purposes of facilitating clearing and settlement of trades.",
+ "example": 37833100,
+ "type": "string"
}
},
- "type": "object"
+ "required": [
+ "name",
+ "last_updated",
+ "primary_exchange",
+ "security_type",
+ "security_description",
+ "ipo_status"
+ ],
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "IPOsResult"
+ }
},
"type": "array"
},
@@ -24737,253 +30831,262 @@
},
"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."
+ "description": "A list of IPO events."
}
},
- "summary": "Trades",
+ "summary": "IPOs",
"tags": [
- "stocks:trades"
+ "reference:stocks:ipos"
],
- "x-polygon-entitlement-data-type": {
- "description": "Trade data",
- "name": "trades"
- },
- "x-polygon-entitlement-market-type": {
- "description": "Stocks data",
- "name": "stocks"
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
},
- "x-polygon-paginate": {
+ "x-massive-paginate": {
"limit": {
- "max": 50000
+ "default": 10,
+ "max": 1000
},
"order": {
"default": "desc"
},
"sort": {
- "default": "timestamp",
+ "default": "listing_date",
"enum": [
- "timestamp"
+ "listing_date",
+ "ticker",
+ "last_updated",
+ "security_type",
+ "issuer_name",
+ "currency_code",
+ "isin",
+ "us_code",
+ "final_issue_price",
+ "min_shares_offered",
+ "max_shares_offered",
+ "lowest_offer_price",
+ "highest_offer_price",
+ "total_offer_size",
+ "shares_outstanding",
+ "primary_exchange",
+ "lot_size",
+ "security_description",
+ "ipo_status"
]
}
- },
- "x-polygon-replaces": {
- "date": 1654056060000,
- "replaces": {
- "name": "Trades",
- "path": "get_v2_ticks_stocks_trades__ticker___date"
- }
}
}
},
- "/vX/reference/financials": {
+ "/vX/reference/tickers/taxonomies": {
"get": {
- "description": "Get historical financial data for a stock ticker.\nThe financials data is extracted from XBRL from company SEC filings using the methodology outlined here.",
- "operationId": "ListFinancials",
+ "description": "Many investors place a high value on sector data. It is used to measure economic activity, identify peers and competitors, build ETF products, quantify market share, and compare company performance. However, there are some limitations to industry standard sectors:\n* They have difficulty identifying the primary area of activity for large, complex businesses.\n* Studies confirm significant disagreement between classification schemes when attempting to categorize the same companies.\n* The systems' hierarchical nature is inflexible and struggles to convey business nuances.\n \n \nAs a result, we've developed a new taxonomy to supplement existing sector classifications. The taxonomy is created by reviewing related 10K filings to create a set of structured categories and tags.\n \n \nThe categories are based on company operating models and are industry agnostic. Our current version only supports one category, Revenue Streams, with future plans to support more.\n \n \nThe tags define a specific type within the category. Within the Revenue Streams category, for example, tags for \"product sales\" and \"advertising\" may be found. A company may have many tags in a given category. The complete Revenue Streams taxonomy is shown below.\n \n \nOur taxonomy is powered by AI and is currently in early beta testing. You should expect some inaccuracies in the responses.\n \n \n## **Revenue Streams**\n *Latest Revision (7/7/2023)*\n \n \n- **Physical Product Sales:**\n Revenue generated from the sale of tangible goods or physical products to customers, either in-store or online.\n - Consumer Goods\n - Industrial Goods\n - Electronics\n - Vehicles\n - Healthcare Products\n \n \n- **Digital Product Sales:**\n Revenue earned from the sale of digital goods or products, such as software licenses, e-books, music downloads, or digital media content. It also includes revenue obtained by selling aggregated, anonymized, or processed data to third parties for market research, analytics, or other purposes.\n - Software\n - E-books and Digital Media\n - Mobile Applications\n - Games\n - Online Courses\n - Market Research Data\n - Customer Behavior Data\n \n \n- **Professional Services:**\n Revenue obtained by providing specialized services, expertise, or consulting to clients in exchange for fees. This includes services offered by professionals such as lawyers, accountants, or consultants.\n - Consulting\n - Legal Services\n - Financial Services\n - Marketing Services\n - Construction Services\n - Education & Tutoring\n \n \n- **Consumer Services:**\n Revenue earned from providing services directly to consumers, including services like healthcare, personal grooming, fitness, or hospitality.\n - Dining & Hospitality\n - Personal Care\n - Entertainment & Recreation\n - Fitness & Wellness\n - Travel & Tourism\n - Transportation\n - Home Services\n - Child & Family Care\n - Automotive\n \n \n- **Subscription-based Revenue:**\n Revenue obtained from recurring fees charged to customers for accessing a product or service over a defined period. This includes revenue from subscription-based models, membership programs, or software-as-a-service (SaaS) offerings.\n - Software as a Service (SaaS)\n - Streaming Services\n - Physical Media\n - Memberships\n \n \n- **Licensing and Royalties:**\n Revenue generated from the licensing of intellectual property rights to third parties, including franchise rights, patent licensing, brand licensing, and the receipt of royalties for authorized use of intellectual property like music royalties, book royalties, or patent royalties.\n - Franchise Fees\n - Patent Licensing\n - Brand Licensing\n - Media Royalties\n \n \n- **Advertising:**\n Revenue generated by displaying ads or promotional content to customers, whether through traditional or digital advertising channels, including revenue from display ads, sponsored content, or affiliate marketing.\n - Print Advertising\n - Online Display Advertising\n - Social Media Advertising\n - Influencer Marketing\n \n \n- **Commission-Based Revenue:**\n Revenue earned by acting as an intermediary and receiving a percentage or commission on sales made on behalf of another party. This includes revenue from affiliate programs, referral fees, or any other commission-based revenue models.\n - Real Estate Commissions\n - Affiliate Marketing Commissions\n - Online Marketplace Commissions\n \n \n- **Rentals or Leasing:**\n Revenue earned by leasing or renting out assets, properties, or equipment to customers, including rental income from real estate properties, equipment leasing, or vehicle rentals.\n - Property Rentals\n - Equipment Leasing\n - Vehicle Rentals",
+ "operationId": "ListTickerTaxonomyClassifications",
"parameters": [
{
- "description": "Query by company ticker.",
"in": "query",
"name": "ticker",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Query by central index key (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": {
+ "x-massive-filter-field": {
+ "anyOf": {
+ "description": "Comma separated list of tickers, up to a maximum of 250.\n\nWarning: The maximum number of characters allowed in a URL are subject to your own technology stack.\n",
+ "enabled": true,
+ "example": "AAPL,AMD,MSFT"
+ },
+ "range": true,
"type": "string"
}
},
{
- "description": "Query by the date when the filing with financials data was filed in YYYY-MM-DD format.\n\nBest used when querying over date ranges to find financials based on filings that happen in a time period.\n\nExamples:\n\nTo get financials based on filings that have happened after January 1, 2009 use the query param filing_date.gte=2009-01-01\n\nTo get financials based on filings that happened in the year 2009 use the query params filing_date.gte=2009-01-01&filing_date.lt=2010-01-01",
+ "description": "Filter by taxonomy category. The current version of this API supports the following category: revenue_streams",
"in": "query",
- "name": "filing_date",
+ "name": "category",
"schema": {
- "format": "date",
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
}
},
{
- "description": "The period of report for the filing with financials data in YYYY-MM-DD format.",
+ "description": "Filter by taxonomy tag. Each category has a set of associated tags.",
"in": "query",
- "name": "period_of_report_date",
+ "name": "tag",
"schema": {
- "format": "date",
"type": "string"
- },
- "x-polygon-filter-field": {
- "range": true
}
},
{
- "description": "Query by timeframe. Annual financials originate from 10-K filings, and quarterly financials originate from 10-Q filings. Note: Most companies do not file quarterly reports for Q4 and instead include those financials in their annual report, so some companies my not return quarterly financials for Q4",
+ "description": "Order results ascending or descending based on the ticker.",
"in": "query",
- "name": "timeframe",
+ "name": "order",
"schema": {
"enum": [
- "annual",
- "quarterly"
+ "asc",
+ "desc"
],
"type": "string"
}
},
{
- "description": "Whether or not to include the `xpath` and `formula` attributes for each financial data point.\nSee the `xpath` and `formula` response attributes for more info. False by default.",
- "in": "query",
- "name": "include_sources",
- "schema": {
- "default": false,
- "type": "boolean"
- }
- },
- {
- "description": "Search by company_name.",
- "in": "query",
- "name": "company_name.search",
- "schema": {
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.gt",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
- "in": "query",
- "name": "filing_date.lte",
- "schema": {
- "format": "date",
- "type": "string"
- }
- },
- {
- "description": "Search by filing_date.",
+ "description": "Limit the number of results returned. The default is 10 and the max is 250.",
"in": "query",
- "name": "filing_date.lt",
+ "name": "limit",
"schema": {
- "format": "date",
- "type": "string"
+ "default": 10,
+ "maximum": 250,
+ "minimum": 1,
+ "type": "integer"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "period_of_report_date.gte",
+ "name": "ticker.gte",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "period_of_report_date.gt",
+ "name": "ticker.gt",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "period_of_report_date.lte",
+ "name": "ticker.lte",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Search by period_of_report_date.",
+ "description": "Range by ticker.",
"in": "query",
- "name": "period_of_report_date.lt",
+ "name": "ticker.lt",
"schema": {
- "format": "date",
"type": "string"
}
},
{
- "description": "Order results based on the `sort` field.",
+ "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": "order",
+ "name": "ticker.any_of",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
- "example": "asc",
"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": {
+ "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": {
+ "category": {
+ "description": "A dimension of a company\u2019s operating model that is agnostic to industry. Category contains a comprehensive list of tags which reflect defined types within that category. The current version of this API supports the following category: revenue_streams",
+ "type": "string"
+ },
+ "reason": {
+ "description": "The reason why the classification was given. The reason is provided by our AI to help you determine whether or not you agree with its applicability for your uses.",
+ "type": "string"
+ },
+ "tag": {
+ "description": "A specific type within a category. For example \u201cproduct_sales\u201d is a type of revenue stream. A company may have multiple tags within a given category. A taxonomy of tags are determined based on 10k filings.",
+ "type": "string"
+ },
+ "ticker": {
+ "description": "The identifying ticker symbol for the asset.",
+ "type": "string"
+ }
+ },
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "TaxonomyClassificationResult"
+ }
+ },
+ "type": "array"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "status",
+ "request_id"
+ ],
+ "type": "object"
+ }
+ }
+ },
+ "description": "Taxonomy classification data."
+ }
+ },
+ "summary": "Ticker Taxonomies",
+ "tags": [
+ "Internal",
+ "Public"
+ ],
+ "x-massive-entitlement-data-type": {
+ "description": "Reference data",
+ "name": "reference"
+ },
+ "x-massive-experimental": {}
+ },
+ "x-massive-draft": true
+ },
+ "/vX/reference/tickers/{id}/events": {
+ "get": {
+ "description": "Get a timeline of events for the entity associated with the given ticker, CUSIP, or Composite FIGI.",
+ "operationId": "GetEvents",
+ "parameters": [
{
- "description": "Limit the number of results returned, default is 1 and max is 100.",
- "in": "query",
- "name": "limit",
+ "description": "Identifier of an asset. This can currently be a Ticker, CUSIP, or Composite FIGI.\nWhen given a ticker, we return events for the entity currently represented by that ticker.\nTo find events for entities previously associated with a ticker, find the relevant identifier using the \n[Ticker Details Endpoint](https://massive.com/docs/stocks/get_v3_reference_tickers__ticker)",
+ "example": "META",
+ "in": "path",
+ "name": "id",
+ "required": true,
"schema": {
- "default": 1,
- "example": 1,
- "maximum": 100,
- "minimum": 1,
- "type": "integer"
+ "type": "string"
}
},
{
- "description": "Sort field used for ordering.",
+ "description": "A comma-separated list of the types of event to include. Currently ticker_change is the only supported event_type.\nLeave blank to return all supported event_types.",
"in": "query",
- "name": "sort",
+ "name": "types",
"schema": {
- "default": "period_of_report_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ],
- "example": "filing_date",
"type": "string"
}
}
@@ -24992,297 +31095,103 @@
"200": {
"content": {
"application/json": {
- "count": 1,
- "description": "FIXME",
"example": {
- "cik": "0000789019",
- "company_name": "MICROSOFT CORPORATION",
- "end_date": "2020-12-31",
- "financials": {
- "balance_sheet": {
- "assets": {
- "label": "Assets",
- "order": 100,
- "unit": "USD",
- "value": 304137000000,
- "xpath": "//*[local-name()='Assets' and @id='F_000165']"
- },
- "equity": {
- "formula": "BS-Impute-07",
- "label": "Equity",
- "order": 1400,
- "unit": "USD",
- "value": 130236000000
- },
- "liabilities": {
- "label": "Liabilities",
- "order": 600,
- "unit": "USD",
- "value": 173901000000,
- "xpath": "//*[local-name()='Liabilities' and @id='F_000193']"
- }
- },
- "cash_flow_statement": {
- "exchange_gains_losses": {
- "label": "Exchange Gains/Losses",
- "order": 1000,
- "unit": "USD",
- "value": 14000000,
- "xpath": "//*[local-name()='EffectOfExchangeRateOnCashAndCashEquivalents' and @id='F_000327']"
- },
- "net_cash_flow": {
- "formula": "CF-Impute-20",
- "label": "Net Cash Flow",
- "order": 1100,
- "unit": "USD",
- "value": -2773000000
- },
- "net_cash_flow_from_financing_activities": {
- "label": "Net Cash Flow From Financing Activities",
- "order": 700,
- "unit": "USD",
- "value": -13634000000,
- "xpath": "//*[local-name()='NetCashProvidedByUsedInFinancingActivities' and @id='F_000295']"
- }
- },
- "comprehensive_income": {
- "comprehensive_income_loss": {
- "formula": "CI-Impute-04",
- "label": "Comprehensive Income/Loss",
- "order": 100,
- "unit": "USD",
- "value": 15720000000
- },
- "comprehensive_income_loss_attributable_to_parent": {
- "label": "Comprehensive Income/Loss Attributable To Parent",
- "order": 300,
- "unit": "USD",
- "value": 15720000000,
- "xpath": "//*[local-name()='ComprehensiveIncomeNetOfTax' and @id='F_000135']"
- },
- "other_comprehensive_income_loss": {
- "formula": "CI-Impute-07",
- "label": "Other Comprehensive Income/Loss",
- "order": 400,
- "unit": "USD",
- "value": 15720000000
- }
- },
- "income_statement": {
- "basic_earnings_per_share": {
- "label": "Basic Earnings Per Share",
- "order": 4200,
- "unit": "USD / shares",
- "value": 2.05,
- "xpath": "//*[local-name()='EarningsPerShareBasic' and @id='F_000099']"
- },
- "cost_of_revenue": {
- "label": "Cost Of Revenue",
- "order": 300,
- "unit": "USD",
- "value": 14194000000,
- "xpath": "//*[local-name()='CostOfGoodsAndServicesSold' and @id='F_000059']"
- },
- "gross_profit": {
- "label": "Gross Profit",
- "order": 800,
- "unit": "USD",
- "value": 28882000000,
- "xpath": "//*[local-name()='GrossProfit' and @id='F_000063']"
- },
- "operating_expenses": {
- "formula": "IS-Impute-22",
- "label": "Operating Expenses",
- "order": 1000,
- "unit": "USD",
- "value": 10985000000
+ "request_id": "31d59dda-80e5-4721-8496-d0d32a654afe",
+ "results": {
+ "events": [
+ {
+ "date": "2022-06-09",
+ "ticker_change": {
+ "ticker": "META"
+ },
+ "type": "ticker_change"
},
- "revenues": {
- "label": "Revenues",
- "order": 100,
- "unit": "USD",
- "value": 43076000000,
- "xpath": "//*[local-name()='RevenueFromContractWithCustomerExcludingAssessedTax' and @id='F_000047']"
+ {
+ "date": "2012-05-18",
+ "ticker_change": {
+ "ticker": "FB"
+ },
+ "type": "ticker_change"
}
- }
+ ],
+ "name": "Meta Platforms, Inc. Class A Common Stock"
},
- "fiscal_period": "Q2",
- "fiscal_year": "2021",
- "source_filing_file_url": "https:/api.polygon.io/v1/reference/sec/filings/0001564590-21-002316/files/0001564590-21-002316:12:msft-10q_20201231_htm.xml",
- "source_filing_url": "https://api.polygon.io/v1/reference/sec/filings/0001564590-21-002316",
- "start_date": "2020-10-01"
+ "status": "OK"
},
- "next_url": "https:/api.polygon.io/vX/reference/financials?",
- "request_id": "28173f20a0751f3479afd9e2cc9246ea",
"schema": {
"properties": {
- "count": {
- "description": "The total number of results for this request.",
- "type": "integer"
- },
- "next_url": {
- "description": "If present, this value can be used to fetch the next page of data.",
- "type": "string"
- },
"request_id": {
"description": "A request id assigned by the server.",
"type": "string"
},
"results": {
- "items": {
- "properties": {
- "cik": {
- "description": "The CIK number for the company.",
- "type": "string"
- },
- "company_name": {
- "description": "The company name.",
- "type": "string"
- },
- "end_date": {
- "description": "The end date of the period that these financials cover in YYYYMMDD format.",
- "type": "string"
- },
- "filing_date": {
- "description": "The date that the SEC filing which these financials were derived from was made available. Note that this is not necessarily the date when this information became public, as some companies may publish a press release before filing with the SEC."
- },
- "financials": {
- "properties": {
- "balance_sheet": {
- "description": "Balance sheet.\nNote that the keys in this object can be any of the balance sheet concepts defined in this table of fundamental accounting concepts but converted to `snake_case`.",
+ "properties": {
+ "events": {
+ "items": {
+ "oneOf": [
+ {
"properties": {
- "*": {
- "description": "An individual financial data point.",
+ "date": {
+ "description": "The date the event took place",
+ "format": "date",
+ "type": "string"
+ },
+ "event_type": {
+ "description": "The type of historical event for the asset",
+ "type": "string"
+ },
+ "ticker_change": {
"properties": {
- "formula": {
- "description": "The name of the formula used to derive this data point from other financial data points.\nInformation about the formulas can be found 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`."
- },
- "label": {
- "description": "A human readable label for the financial data point.",
- "type": "string"
- },
- "order": {
- "description": "An indicator of what order within the statement that you would find this data point.",
- "type": "integer"
- },
- "unit": {
- "description": "The unit of the financial data point.",
+ "ticker": {
"type": "string"
- },
- "value": {
- "description": "The value of the financial data point.",
- "type": "number"
- },
- "xpath": {
- "description": "The 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`."
}
},
- "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.",
+ "required": [
+ "event_type",
+ "date"
+ ],
"type": "object"
}
- },
- "type": "object"
- },
- "fiscal_period": {
- "description": "Fiscal period of the report according to the company (Q1, Q2, Q3, Q4, or FY).",
- "type": "string"
- },
- "fiscal_year": {
- "description": "Fiscal year of the report according to the company.",
- "type": "string"
- },
- "source_filing_file_url": {
- "description": "The URL of the specific XBRL instance document within the SEC filing that these financials were derived from."
- },
- "source_filing_url": {
- "description": "The URL of the SEC filing that these financials were derived from.",
- "type": "string"
+ ]
},
- "start_date": {
- "description": "The start date of the period that these financials cover in YYYYMMDD format.",
- "type": "string"
- }
+ "type": "array"
},
- "required": [
- "reporting_period",
- "cik",
- "company_name",
- "financials",
- "fiscal_period",
- "fiscal_year",
- "filing_type",
- "source_filing_url",
- "source_filing_file_url"
- ],
- "type": "object",
- "x-polygon-go-type": {
- "name": "ResolvedFinancials",
- "path": "github.com/polygon-io/go-app-api-financials/extract"
+ "name": {
+ "type": "string"
}
},
- "type": "array"
+ "type": "object",
+ "x-massive-go-type": {
+ "name": "EventsResults"
+ }
},
"status": {
"description": "The status of this request's response.",
"type": "string"
}
},
- "required": [
- "status",
- "request_id",
- "count",
- "results"
- ],
"type": "object"
- },
- "status": "OK"
+ }
}
},
- "description": "FIXME"
+ "description": "Ticker Events."
+ },
+ "401": {
+ "description": "Unauthorized - Check our API Key and account status"
}
},
- "summary": "Stock Financials vX",
+ "summary": "Ticker Events",
"tags": [
- "reference:stocks"
+ "reference:tickers:get"
],
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"description": "Reference data",
"name": "reference"
},
- "x-polygon-experimental": {},
- "x-polygon-paginate": {
- "limit": {
- "default": 1,
- "max": 100
- },
- "sort": {
- "default": "period_of_report_date",
- "enum": [
- "filing_date",
- "period_of_report_date"
- ]
- }
- }
+ "x-massive-experimental": {}
}
}
},
@@ -25293,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",
@@ -25327,7 +31236,7 @@
{
"description": "Stocks API",
"name": "stocks",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"quotes",
"last:trade",
@@ -25340,7 +31249,7 @@
{
"description": "Options API",
"name": "options",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"quotes",
"last:trade",
@@ -25353,7 +31262,7 @@
{
"description": "Forex API",
"name": "fx",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
"trades",
"quotes",
"conversion",
@@ -25366,7 +31275,18 @@
{
"description": "Crypto API",
"name": "crypto",
- "x-polygon-sub-tags": [
+ "x-massive-sub-tags": [
+ "trades",
+ "last:trade",
+ "open-close",
+ "aggregates",
+ "snapshot"
+ ]
+ },
+ {
+ "description": "Indices API",
+ "name": "indices",
+ "x-massive-sub-tags": [
"trades",
"last:trade",
"open-close",
@@ -25375,14 +31295,21 @@
]
}
],
- "x-polygon-order": {
+ "x-massive-order": {
"crypto": {
"market": [
{
+ "launchpad": "shared",
"paths": [
"/v2/aggs/ticker/{cryptoTicker}/range/{multiplier}/{timespan}/{from}/{to}"
]
},
+ {
+ "launchpad": "exclusive",
+ "paths": [
+ "/v1/summaries"
+ ]
+ },
{
"paths": [
"/v2/aggs/grouped/locale/global/market/crypto/{date}"
@@ -25419,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"
]
},
{
@@ -25463,10 +31391,17 @@
"fx": {
"market": [
{
+ "launchpad": "shared",
"paths": [
"/v2/aggs/ticker/{forexTicker}/range/{multiplier}/{timespan}/{from}/{to}"
]
},
+ {
+ "launchpad": "exclusive",
+ "paths": [
+ "/v1/summaries"
+ ]
+ },
{
"paths": [
"/v2/aggs/grouped/locale/global/market/fx/{date}"
@@ -25502,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"
]
},
{
@@ -25543,13 +31479,78 @@
}
]
},
+ "indices": {
+ "market": [
+ {
+ "launchpad": "shared",
+ "paths": [
+ "/v2/aggs/ticker/{indicesTicker}/range/{multiplier}/{timespan}/{from}/{to}"
+ ]
+ },
+ {
+ "paths": [
+ "/v2/aggs/ticker/{indicesTicker}/prev"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/open-close/{indicesTicker}/{date}"
+ ]
+ },
+ {
+ "group": "Technical Indicators",
+ "paths": [
+ "/v1/indicators/sma/{indicesTicker}",
+ "/v1/indicators/ema/{indicesTicker}",
+ "/v1/indicators/macd/{indicesTicker}",
+ "/v1/indicators/rsi/{indicesTicker}"
+ ]
+ },
+ {
+ "group": "Snapshots",
+ "paths": [
+ "/v3/snapshot/indices",
+ "/v3/snapshot"
+ ]
+ }
+ ],
+ "reference": [
+ {
+ "paths": [
+ "/v3/reference/tickers"
+ ]
+ },
+ {
+ "paths": [
+ "/v3/reference/tickers/types"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/upcoming"
+ ]
+ },
+ {
+ "paths": [
+ "/v1/marketstatus/now"
+ ]
+ }
+ ]
+ },
"options": {
"market": [
{
+ "launchpad": "shared",
"paths": [
"/v2/aggs/ticker/{optionsTicker}/range/{multiplier}/{timespan}/{from}/{to}"
]
},
+ {
+ "launchpad": "exclusive",
+ "paths": [
+ "/v1/summaries"
+ ]
+ },
{
"paths": [
"/v1/open-close/{optionsTicker}/{date}"
@@ -25579,7 +31580,8 @@
"group": "Snapshots",
"paths": [
"/v3/snapshot/options/{underlyingAsset}/{optionContract}",
- "/v3/snapshot/options/{underlyingAsset}"
+ "/v3/snapshot/options/{underlyingAsset}",
+ "/v3/snapshot"
]
},
{
@@ -25653,10 +31655,17 @@
"stocks": {
"market": [
{
+ "launchpad": "shared",
"paths": [
"/v2/aggs/ticker/{stocksTicker}/range/{multiplier}/{timespan}/{from}/{to}"
]
},
+ {
+ "launchpad": "exclusive",
+ "paths": [
+ "/v1/summaries"
+ ]
+ },
{
"paths": [
"/v2/aggs/grouped/locale/us/market/stocks/{date}"
@@ -25707,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"
]
},
{
@@ -25736,6 +31746,11 @@
"/v3/reference/tickers/{ticker}"
]
},
+ {
+ "paths": [
+ "/vX/reference/tickers/{id}/events"
+ ]
+ },
{
"paths": [
"/v2/reference/news"
@@ -25746,6 +31761,11 @@
"/v3/reference/tickers/types"
]
},
+ {
+ "paths": [
+ "/vX/reference/tickers/taxonomies"
+ ]
+ },
{
"paths": [
"/v1/marketstatus/upcoming"
@@ -25789,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 54%
rename from .polygon/websocket.json
rename to .massive/websocket.json
index a7feaf84..ddaef95e 100644
--- a/.polygon/websocket.json
+++ b/.massive/websocket.json
@@ -1,21 +1,21 @@
{
"openapi": "3.0.3",
"info": {
- "title": "Polygon Websocket Spec",
+ "title": "Massive Websocket Spec",
"description": "The future of fintech.",
"version": "2.0.0"
},
"servers": [
{
- "url": "wss://socket.polygon.io",
+ "url": "wss://socket.massive.com",
"description": "Real-time"
},
{
- "url": "wss://delayed.polygon.io",
+ "url": "wss://delayed.massive.com",
"description": "Delayed"
}
],
- "x-polygon-order": {
+ "x-massive-order": {
"stocks": {
"market": [
{
@@ -47,6 +47,23 @@
"paths": [
"/stocks/LULD"
]
+ },
+ {
+ "paths": [
+ "/business/stocks/FMV"
+ ]
+ },
+ {
+ "paths": [
+ "/launchpad/stocks/AM"
+ ],
+ "launchpad": "exclusive"
+ },
+ {
+ "paths": [
+ "/launchpad/stocks/LV"
+ ],
+ "launchpad": "exclusive"
}
]
},
@@ -71,6 +88,23 @@
"paths": [
"/options/Q"
]
+ },
+ {
+ "paths": [
+ "/business/options/FMV"
+ ]
+ },
+ {
+ "paths": [
+ "/launchpad/options/AM"
+ ],
+ "launchpad": "exclusive"
+ },
+ {
+ "paths": [
+ "/launchpad/options/LV"
+ ],
+ "launchpad": "exclusive"
}
]
},
@@ -81,10 +115,32 @@
"/forex/CA"
]
},
+ {
+ "paths": [
+ "/forex/CAS"
+ ]
+ },
{
"paths": [
"/forex/C"
]
+ },
+ {
+ "paths": [
+ "/business/forex/FMV"
+ ]
+ },
+ {
+ "paths": [
+ "/launchpad/forex/AM"
+ ],
+ "launchpad": "exclusive"
+ },
+ {
+ "paths": [
+ "/launchpad/forex/LV"
+ ],
+ "launchpad": "exclusive"
}
]
},
@@ -95,6 +151,11 @@
"/crypto/XA"
]
},
+ {
+ "paths": [
+ "/crypto/XAS"
+ ]
+ },
{
"paths": [
"/crypto/XT"
@@ -109,6 +170,42 @@
"paths": [
"/crypto/XL2"
]
+ },
+ {
+ "paths": [
+ "/business/crypto/FMV"
+ ]
+ },
+ {
+ "paths": [
+ "/launchpad/crypto/AM"
+ ],
+ "launchpad": "exclusive"
+ },
+ {
+ "paths": [
+ "/launchpad/crypto/LV"
+ ],
+ "launchpad": "exclusive"
+ }
+ ]
+ },
+ "indices": {
+ "market": [
+ {
+ "paths": [
+ "/indices/AM"
+ ]
+ },
+ {
+ "paths": [
+ "/indices/A"
+ ]
+ },
+ {
+ "paths": [
+ "/indices/V"
+ ]
}
]
}
@@ -122,7 +219,7 @@
{
"name": "ticker",
"in": "query",
- "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -151,7 +248,7 @@
},
"x": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"i": {
"type": "string",
@@ -172,7 +269,7 @@
},
"c": {
"type": "array",
- "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n",
+ "description": "The trade conditions. See Conditions and Indicators for Massive.com's trade conditions glossary.\n",
"items": {
"type": "integer",
"description": "The ID of the condition."
@@ -180,11 +277,19 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
},
"q": {
"type": "integer",
"description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
+ },
+ "trfi": {
+ "type": "integer",
+ "description": "The ID for the Trade Reporting Facility where the trade took place."
+ },
+ "trft": {
+ "type": "integer",
+ "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n"
}
}
},
@@ -207,15 +312,15 @@
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "trades",
"description": "Trade data"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "stocks",
"description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "delayed",
"description": "15 minute delayed data"
@@ -235,7 +340,7 @@
{
"name": "ticker",
"in": "query",
- "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -294,7 +399,7 @@
},
"i": {
"type": "array",
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n",
"items": {
"type": "integer",
"description": "The indicator code.\n"
@@ -302,7 +407,11 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
+ },
+ "q": {
+ "type": "integer",
+ "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n"
},
"z": {
"type": "integer",
@@ -324,21 +433,22 @@
604
],
"t": 1536036818784,
+ "q": 50385480,
"z": 3
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "nbbo",
"description": "NBBO data"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "stocks",
"description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "realtime",
"description": "Real Time Data"
@@ -354,7 +464,7 @@
{
"name": "ticker",
"in": "query",
- "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -429,11 +539,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
},
"otc": {
"type": "boolean",
@@ -473,15 +583,15 @@
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "aggregates",
"description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "stocks",
"description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "delayed",
"description": "15 minute delayed data"
@@ -501,7 +611,7 @@
{
"name": "ticker",
"in": "query",
- "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -576,11 +686,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
},
"otc": {
"type": "boolean",
@@ -620,15 +730,15 @@
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "aggregates",
"description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "stocks",
"description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "delayed",
"description": "15 minute delayed data"
@@ -648,7 +758,7 @@
{
"name": "ticker",
"in": "query",
- "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -722,15 +832,15 @@
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "limit-up-limit-down",
"description": "Limit-Up Limit-Down data"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "stocks",
"description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "realtime",
"description": "Real Time Data"
@@ -746,7 +856,7 @@
{
"name": "ticker",
"in": "query",
- "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -791,7 +901,7 @@
},
"x": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"o": {
"type": "integer",
@@ -824,15 +934,15 @@
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "imbalances",
"description": "Imbalances data"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "stocks",
"description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "realtime",
"description": "Real Time Data"
@@ -840,97 +950,68 @@
]
}
},
- "/options/T": {
+ "/business/stocks/FMV": {
"get": {
- "summary": "Trades",
- "description": "Stream real-time trades for a given option contract.\n",
+ "summary": "Fair Market Value",
+ "description": "Real-time fair market value for a given stock ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ "pattern": "/^([a-zA-Z]+)$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a trade event.",
+ "description": "The WebSocket message for a fair market value event.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ev": {
+ "type": "string",
"enum": [
- "T"
+ "FMV"
],
"description": "The event type."
},
- "sym": {
- "type": "string",
- "description": "The ticker symbol for the given option contract."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "p": {
- "type": "number",
- "format": "double",
- "description": "The price."
- },
- "s": {
- "type": "integer",
- "description": "The trade size."
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n"
},
- "c": {
- "type": "array",
- "description": "The trade conditions",
- "items": {
- "type": "integer",
- "description": "The ID of the condition."
- }
+ "sym": {
+ "description": "The ticker symbol for the given security."
},
"t": {
- "type": "integer",
- "description": "The Timestamp in Unix MS."
- },
- "q": {
- "type": "integer",
- "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)."
+ "description": "The nanosecond timestamp."
}
}
},
"example": {
- "ev": "T",
- "sym": "O:AMC210827C00037000",
- "x": 65,
- "p": 1.54,
- "s": 1,
- "c": [
- 233
- ],
- "t": 1629820676333,
- "q": 651921857
+ "ev": "FMV",
+ "fmv": 189.22,
+ "sym": "AAPL",
+ "t": 1678220098130
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "trades",
- "description": "Trade data"
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
},
- "x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
+ "x-massive-entitlement-market-type": {
+ "name": "stocks",
+ "description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "delayed",
"description": "15 minute delayed data"
@@ -942,102 +1023,128 @@
]
}
},
- "/options/Q": {
+ "/launchpad/stocks/AM": {
"get": {
- "summary": "Quotes",
- "description": "Stream real-time quotes for a given option contract.\n",
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time minute aggregates for a given stock ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ "pattern": "/^([a-zA-Z]+)$/"
},
- "example": "O:SPY241220P00720000"
+ "example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a trade event.",
+ "description": "The WebSocket message for a minute aggregate event.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ev": {
- "enum": [
- "Q"
- ],
"description": "The event type."
},
"sym": {
"type": "string",
- "description": "The ticker symbol for the given option contract."
+ "description": "The ticker symbol for the given stock."
},
- "bx": {
+ "v": {
"type": "integer",
- "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The tick volume."
},
- "ax": {
+ "av": {
"type": "integer",
- "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "Today's accumulated volume."
},
- "bp": {
+ "op": {
"type": "number",
"format": "double",
- "description": "The bid price."
+ "description": "Today's official opening price."
},
- "ap": {
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The volume-weighted average value for the aggregate window."
+ },
+ "o": {
"type": "number",
"format": "double",
- "description": "The ask price."
+ "description": "The open price for the symbol in the given time period."
},
- "bs": {
- "type": "integer",
- "description": "The bid size."
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for the symbol in the given time period."
},
- "as": {
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest price for the symbol in the given time period."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest price for the symbol in the given time period."
+ },
+ "a": {
+ "type": "number",
+ "format": "float",
+ "description": "Today's volume weighted average price."
+ },
+ "z": {
"type": "integer",
- "description": "The ask size."
+ "description": "The average trade size for this aggregate window."
},
- "t": {
+ "s": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
- "q": {
+ "e": {
"type": "integer",
- "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
"example": {
- "ev": "Q",
- "sym": "O:SPY241220P00720000",
- "bx": 302,
- "ax": 302,
- "bp": 9.71,
- "ap": 9.81,
- "bs": 17,
- "as": 24,
- "t": 1644506128351,
- "q": 844090872
+ "ev": "AM",
+ "sym": "GTE",
+ "v": 4110,
+ "av": 9470157,
+ "op": 0.4372,
+ "vw": 0.4488,
+ "o": 0.4488,
+ "c": 0.4486,
+ "h": 0.4489,
+ "l": 0.4486,
+ "a": 0.4352,
+ "z": 685,
+ "s": 1610144640000,
+ "e": 1610144700000
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
+ "x-massive-entitlement-market-type": {
+ "name": "stocks",
+ "description": "Stocks data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1045,142 +1152,1850 @@
]
}
},
- "/options/A": {
+ "/launchpad/stocks/LV": {
"get": {
- "summary": "Aggregates (Per Second)",
- "description": "Stream real-time second aggregates for a given option contract.\n",
+ "summary": "Value",
+ "description": "Real-time value for a given stock ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ "pattern": "/^([a-zA-Z]+)$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a second aggregate event.",
+ "description": "The WebSocket message for a value event.",
"content": {
"application/json": {
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "ev": {
- "description": "The event type."
- },
- "sym": {
- "type": "string",
- "description": "The ticker symbol for the given option contract."
- },
- "v": {
- "type": "integer",
- "description": "The tick volume."
- },
- "av": {
- "type": "integer",
- "description": "Today's accumulated volume."
- },
- "op": {
- "type": "number",
- "format": "double",
- "description": "Today's official opening price."
- },
- "vw": {
- "type": "number",
- "format": "float",
- "description": "The tick's volume weighted average price."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The opening tick price for this aggregate window."
- },
- "c": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "LV"
+ ],
+ "description": "The event type."
+ },
+ "val": {
+ "description": "The current value of the security."
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
+ }
+ }
+ },
+ "example": {
+ "ev": "LV",
+ "val": 189.22,
+ "sym": "AAPL",
+ "t": 1678220098130
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "stocks",
+ "description": "Stocks data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/options/T": {
+ "get": {
+ "summary": "Trades",
+ "description": "Stream real-time trades for a given option contract.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a trade event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "enum": [
+ "T"
+ ],
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given option contract."
+ },
+ "x": {
+ "type": "integer",
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
+ },
+ "p": {
+ "type": "number",
+ "format": "double",
+ "description": "The price."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The trade size."
+ },
+ "c": {
+ "type": "array",
+ "description": "The trade conditions",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the condition."
+ }
+ },
+ "t": {
+ "type": "integer",
+ "description": "The Timestamp in Unix MS."
+ },
+ "q": {
+ "type": "integer",
+ "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)."
+ }
+ }
+ },
+ "example": {
+ "ev": "T",
+ "sym": "O:AMC210827C00037000",
+ "x": 65,
+ "p": 1.54,
+ "s": 1,
+ "c": [
+ 233
+ ],
+ "t": 1629820676333,
+ "q": 651921857
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "trades",
+ "description": "Trade data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/options/Q": {
+ "get": {
+ "summary": "Quotes",
+ "description": "Stream real-time quotes for a given option contract.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ },
+ "example": "O:SPY241220P00720000"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a trade event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "enum": [
+ "Q"
+ ],
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given option contract."
+ },
+ "bx": {
+ "type": "integer",
+ "description": "The bid exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
+ },
+ "ax": {
+ "type": "integer",
+ "description": "The ask exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
+ },
+ "bp": {
+ "type": "number",
+ "format": "double",
+ "description": "The bid price."
+ },
+ "ap": {
+ "type": "number",
+ "format": "double",
+ "description": "The ask price."
+ },
+ "bs": {
+ "type": "integer",
+ "description": "The bid size."
+ },
+ "as": {
+ "type": "integer",
+ "description": "The ask size."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The Timestamp in Unix MS."
+ },
+ "q": {
+ "type": "integer",
+ "description": "The sequence number represents the sequence in which trade events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11)."
+ }
+ }
+ },
+ "example": {
+ "ev": "Q",
+ "sym": "O:SPY241220P00720000",
+ "bx": 302,
+ "ax": 302,
+ "bp": 9.71,
+ "ap": 9.81,
+ "bs": 17,
+ "as": 24,
+ "t": 1644506128351,
+ "q": 844090872
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "nbbo",
+ "description": "NBBO data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/options/A": {
+ "get": {
+ "summary": "Aggregates (Per Second)",
+ "description": "Stream real-time second aggregates for a given option contract.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a second aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given option contract."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The tick volume."
+ },
+ "av": {
+ "type": "integer",
+ "description": "Today's accumulated volume."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening price."
+ },
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The tick's volume weighted average price."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The opening tick price for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The closing tick price for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest tick price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest tick price for this aggregate window."
+ },
+ "a": {
+ "type": "number",
+ "format": "float",
+ "description": "Today's volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "A"
+ ],
+ "description": "The event type."
+ }
+ }
+ }
+ ]
+ },
+ "example": {
+ "ev": "AM",
+ "sym": "O:ONEM220121C00025000",
+ "v": 2,
+ "av": 8,
+ "op": 2.2,
+ "vw": 2.05,
+ "o": 2.05,
+ "c": 2.05,
+ "h": 2.05,
+ "l": 2.05,
+ "a": 2.1312,
+ "z": 2,
+ "s": 1632419640000,
+ "e": 1632419700000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/options/AM": {
+ "get": {
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time minute aggregates for a given option contract.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a minute aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given option contract."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The tick volume."
+ },
+ "av": {
+ "type": "integer",
+ "description": "Today's accumulated volume."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening price."
+ },
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The tick's volume weighted average price."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The opening tick price for this aggregate window."
+ },
+ "c": {
"type": "number",
"format": "double",
"description": "The closing tick price for this aggregate window."
},
- "h": {
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest tick price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest tick price for this aggregate window."
+ },
+ "a": {
+ "type": "number",
+ "format": "float",
+ "description": "Today's volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "AM"
+ ],
+ "description": "The event type."
+ }
+ }
+ }
+ ]
+ },
+ "example": {
+ "ev": "AM",
+ "sym": "O:ONEM220121C00025000",
+ "v": 2,
+ "av": 8,
+ "op": 2.2,
+ "vw": 2.05,
+ "o": 2.05,
+ "c": 2.05,
+ "h": 2.05,
+ "l": 2.05,
+ "a": 2.1312,
+ "z": 2,
+ "s": 1632419640000,
+ "e": 1632419700000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/business/options/FMV": {
+ "get": {
+ "summary": "Fair Market Value",
+ "description": "Real-time fair market value for a given options ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ },
+ "example": "O:SPY241220P00720000"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a fair market value event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "FMV"
+ ],
+ "description": "The event type."
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n"
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
+ }
+ }
+ },
+ "example": {
+ "ev": "FMV",
+ "fmv": 7.2,
+ "sym": "O:TSLA210903C00700000",
+ "t": 1401715883806000000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/launchpad/options/AM": {
+ "get": {
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time minute aggregates for a given option contract.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ },
+ "example": "O:SPY241220P00720000"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a minute aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given stock."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The tick volume."
+ },
+ "av": {
+ "type": "integer",
+ "description": "Today's accumulated volume."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening price."
+ },
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The volume-weighted average value for the aggregate window."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for the symbol in the given time period."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for the symbol in the given time period."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest price for the symbol in the given time period."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest price for the symbol in the given time period."
+ },
+ "a": {
+ "type": "number",
+ "format": "float",
+ "description": "Today's volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "example": {
+ "ev": "AM",
+ "sym": "O:ONEM220121C00025000",
+ "v": 2,
+ "av": 8,
+ "op": 2.2,
+ "vw": 2.05,
+ "o": 2.05,
+ "c": 2.05,
+ "h": 2.05,
+ "l": 2.05,
+ "a": 2.1312,
+ "z": 1,
+ "s": 1632419640000,
+ "e": 1632419700000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/launchpad/options/LV": {
+ "get": {
+ "summary": "Value",
+ "description": "Real-time value for a given options ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ },
+ "example": "O:SPY241220P00720000"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a value event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "LV"
+ ],
+ "description": "The event type."
+ },
+ "val": {
+ "description": "The current value of the security."
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
+ }
+ }
+ },
+ "example": {
+ "ev": "LV",
+ "val": 7.2,
+ "sym": "O:TSLA210903C00700000",
+ "t": 1401715883806000000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "options",
+ "description": "Options data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/forex/C": {
+ "get": {
+ "summary": "Quotes",
+ "description": "Stream real-time forex quotes for a given forex pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a forex quote event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "description": "The event type."
+ },
+ "p": {
+ "type": "string",
+ "description": "The current pair."
+ },
+ "x": {
+ "type": "integer",
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
+ },
+ "a": {
"type": "number",
"format": "double",
- "description": "The highest tick price for this aggregate window."
+ "description": "The ask price."
},
- "l": {
+ "b": {
"type": "number",
"format": "double",
- "description": "The lowest tick price for this aggregate window."
+ "description": "The bid price."
},
- "a": {
+ "t": {
+ "type": "integer",
+ "description": "The Timestamp in Unix MS."
+ }
+ }
+ },
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "C"
+ ],
+ "description": "The event type."
+ }
+ }
+ }
+ ]
+ },
+ "example": {
+ "ev": "C",
+ "p": "USD/CNH",
+ "x": "44",
+ "a": 6.83366,
+ "b": 6.83363,
+ "t": 1536036818784
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "nbbo",
+ "description": "NBBO data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "fx",
+ "description": "Forex data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/forex/CA": {
+ "get": {
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a forex per-minute aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "CA"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The currency pair."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The high price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The low price for this aggregate window."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The volume of trades during this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "example": {
+ "ev": "CA",
+ "pair": "USD/EUR",
+ "o": 0.8687,
+ "c": 0.86889,
+ "h": 0.86889,
+ "l": 0.8686,
+ "v": 20,
+ "s": 1539145740000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "fx",
+ "description": "Forex data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/forex/CAS": {
+ "get": {
+ "summary": "Aggregates (Per Second)",
+ "description": "Stream real-time per-second forex aggregates for a given forex pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a forex per-second aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "CAS"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The currency pair."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The high price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The low price for this aggregate window."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The volume of trades during this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "example": {
+ "ev": "CAS",
+ "pair": "USD/EUR",
+ "o": 0.8687,
+ "c": 0.86889,
+ "h": 0.86889,
+ "l": 0.8686,
+ "v": 20,
+ "s": 1539145740000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "fx",
+ "description": "Forex data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/business/forex/FMV": {
+ "get": {
+ "summary": "Fair Market Value",
+ "description": "Real-time fair market value for a given forex ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a fair market value event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "FMV"
+ ],
+ "description": "The event type."
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n"
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
+ }
+ }
+ },
+ "example": {
+ "ev": "FMV",
+ "fmv": 1.0631,
+ "sym": "C:EURUSD",
+ "t": 1678220098130
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "fx",
+ "description": "Forex data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/launchpad/forex/AM": {
+ "get": {
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a minute aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given stock."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The tick volume."
+ },
+ "av": {
+ "type": "integer",
+ "description": "Today's accumulated volume."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening price."
+ },
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The volume-weighted average value for the aggregate window."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for the symbol in the given time period."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for the symbol in the given time period."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest price for the symbol in the given time period."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest price for the symbol in the given time period."
+ },
+ "a": {
+ "type": "number",
+ "format": "float",
+ "description": "Today's volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "example": {
+ "ev": "AM",
+ "sym": "C:USD-EUR",
+ "v": 4110,
+ "av": 9470157,
+ "op": 0.9272,
+ "vw": 0.9288,
+ "o": 0.9288,
+ "c": 0.9286,
+ "h": 0.9289,
+ "l": 0.9206,
+ "a": 0.9352,
+ "z": 685,
+ "s": 1610144640000,
+ "e": 1610144700000
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "fx",
+ "description": "Forex data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/launchpad/forex/LV": {
+ "get": {
+ "summary": "Value",
+ "description": "Real-time value for a given forex ticker symbol.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a value event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "LV"
+ ],
+ "description": "The event type."
+ },
+ "val": {
+ "description": "The current value of the security."
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
+ }
+ }
+ },
+ "example": {
+ "ev": "LV",
+ "val": 1.0631,
+ "sym": "C:EURUSD",
+ "t": 1678220098130
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "fx",
+ "description": "Forex data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/crypto/XT": {
+ "get": {
+ "summary": "Trades",
+ "description": "Stream real-time crypto trades for a given crypto pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a crypto trade event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "XT"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The crypto pair."
+ },
+ "p": {
+ "type": "number",
+ "format": "double",
+ "description": "The price."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The Timestamp in Unix MS."
+ },
+ "s": {
+ "type": "number",
+ "format": "double",
+ "description": "The size."
+ },
+ "c": {
+ "type": "array",
+ "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n",
+ "items": {
+ "type": "integer",
+ "description": "The ID of the condition."
+ }
+ },
+ "i": {
+ "type": "integer",
+ "description": "The ID of the trade (optional)."
+ },
+ "x": {
+ "type": "integer",
+ "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ },
+ "r": {
+ "type": "integer",
+ "description": "The timestamp that the tick was received by Massive."
+ }
+ }
+ },
+ "example": {
+ "ev": "XT",
+ "pair": "BTC-USD",
+ "p": 33021.9,
+ "t": 1610462007425,
+ "s": 0.01616617,
+ "c": [
+ 2
+ ],
+ "i": 14272084,
+ "x": 3,
+ "r": 1610462007576
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "trades",
+ "description": "Trade data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/crypto/XQ": {
+ "get": {
+ "summary": "Quotes",
+ "description": "Stream real-time crypto quotes for a given crypto pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a crypto quote event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "XQ"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The crypto pair."
+ },
+ "bp": {
+ "type": "number",
+ "format": "double",
+ "description": "The bid price."
+ },
+ "bs": {
+ "type": "number",
+ "format": "double",
+ "description": "The bid size."
+ },
+ "ap": {
+ "type": "number",
+ "format": "double",
+ "description": "The ask price."
+ },
+ "as": {
+ "type": "number",
+ "format": "double",
+ "description": "The ask size."
+ },
+ "t": {
+ "type": "integer",
+ "description": "The Timestamp in Unix MS."
+ },
+ "x": {
+ "type": "integer",
+ "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ },
+ "r": {
+ "type": "integer",
+ "description": "The timestamp that the tick was received by Massive."
+ }
+ }
+ },
+ "example": {
+ "ev": "XQ",
+ "pair": "BTC-USD",
+ "bp": 33052.79,
+ "bs": 0.48,
+ "ap": 33073.19,
+ "as": 0.601,
+ "t": 1610462411115,
+ "x": 1,
+ "r": 1610462411128
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "nbbo",
+ "description": "NBBO data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ]
+ }
+ },
+ "/crypto/XL2": {
+ "get": {
+ "summary": "Level 2 Book",
+ "description": "Stream real-time level 2 book data for a given crypto pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a crypto level 2 book event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "XL2"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The crypto pair."
+ },
+ "b": {
+ "type": "array",
+ "description": "An array of bid prices, where each entry contains two elements: the first is the bid price, and the second is the size, with a maximum depth of 100.",
+ "items": {
+ "type": "array",
+ "description": "An array where the first item is bid price and the second item is size.",
+ "items": {
"type": "number",
- "format": "float",
- "description": "Today's volume weighted average price."
- },
- "z": {
- "type": "integer",
- "description": "The average trade size for this aggregate window."
- },
- "s": {
- "type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
- },
- "e": {
- "type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "format": "double"
}
}
},
- {
- "properties": {
- "ev": {
- "enum": [
- "A"
- ],
- "description": "The event type."
+ "a": {
+ "type": "array",
+ "description": "An array of ask prices, where each entry contains two elements: the first is the ask price, and the second is the size, with a maximum depth of 100.",
+ "items": {
+ "type": "array",
+ "description": "An array where the first item is ask price and the second item is size.",
+ "items": {
+ "type": "number",
+ "format": "double"
}
}
+ },
+ "t": {
+ "type": "integer",
+ "description": "The Timestamp in Unix MS."
+ },
+ "x": {
+ "type": "integer",
+ "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ },
+ "r": {
+ "type": "integer",
+ "description": "The timestamp that the tick was received by Massive."
}
+ }
+ },
+ "example": {
+ "ev": "XL2",
+ "pair": "BTC-USD",
+ "t": 1610462411115,
+ "r": 1610462411128,
+ "x": 1,
+ "b": [
+ [
+ 33712.71,
+ 0.18635
+ ],
+ [
+ 33712.7,
+ 0.134
+ ]
+ ],
+ "a": [
+ [
+ 33718.23,
+ 3.5527483
+ ],
+ [
+ 33718.24,
+ 0.1
+ ]
]
+ }
+ }
+ }
+ }
+ },
+ "x-massive-entitlement-data-type": {
+ "name": "nbbo",
+ "description": "NBBO data"
+ },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "realtime",
+ "description": "Real Time Data"
+ }
+ ],
+ "x-massive-deprecation": {
+ "date": 1719838800000
+ }
+ }
+ },
+ "/crypto/XA": {
+ "get": {
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n",
+ "parameters": [
+ {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ },
+ "example": "*"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The WebSocket message for a crypto per-minute aggregate event.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "XA"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The crypto pair."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The high price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The low price for this aggregate window."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The volume of trades during this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "vw": {
+ "type": "number",
+ "format": "double",
+ "description": "The volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
+ }
+ }
},
"example": {
- "ev": "AM",
- "sym": "O:ONEM220121C00025000",
- "v": 2,
- "av": 8,
- "op": 2.2,
- "vw": 2.05,
- "o": 2.05,
- "c": 2.05,
- "h": 2.05,
- "l": 2.05,
- "a": 2.1312,
- "z": 2,
- "s": 1632419640000,
- "e": 1632419700000
+ "ev": "XA",
+ "pair": "BCD-USD",
+ "v": 951.6112,
+ "vw": 0.7756,
+ "z": 73,
+ "o": 0.772,
+ "c": 0.784,
+ "h": 0.784,
+ "l": 0.771,
+ "s": 1610463240000,
+ "e": 1610463300000
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "aggregates",
"description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
- },
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- },
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
+ },
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "realtime",
"description": "Real Time Data"
@@ -1188,142 +3003,111 @@
]
}
},
- "/options/AM": {
+ "/crypto/XAS": {
"get": {
- "summary": "Aggregates (Per Minute)",
- "description": "Stream real-time minute aggregates for a given option contract.\n",
+ "summary": "Aggregates (Per Second)",
+ "description": "Stream real-time per-second crypto aggregates for a given crypto pair.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(([a-zA-Z]+|[0-9])+)$/"
+ "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a minute aggregate event.",
+ "description": "The WebSocket message for a crypto per-second aggregate event.",
"content": {
"application/json": {
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "ev": {
- "description": "The event type."
- },
- "sym": {
- "type": "string",
- "description": "The ticker symbol for the given option contract."
- },
- "v": {
- "type": "integer",
- "description": "The tick volume."
- },
- "av": {
- "type": "integer",
- "description": "Today's accumulated volume."
- },
- "op": {
- "type": "number",
- "format": "double",
- "description": "Today's official opening price."
- },
- "vw": {
- "type": "number",
- "format": "float",
- "description": "The tick's volume weighted average price."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The opening tick price for this aggregate window."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The closing tick price for this aggregate window."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The highest tick price for this aggregate window."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The lowest tick price for this aggregate window."
- },
- "a": {
- "type": "number",
- "format": "float",
- "description": "Today's volume weighted average price."
- },
- "z": {
- "type": "integer",
- "description": "The average trade size for this aggregate window."
- },
- "s": {
- "type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
- },
- "e": {
- "type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
- }
- }
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "XAS"
+ ],
+ "description": "The event type."
},
- {
- "properties": {
- "ev": {
- "enum": [
- "AM"
- ],
- "description": "The event type."
- }
- }
+ "pair": {
+ "type": "string",
+ "description": "The crypto pair."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The high price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The low price for this aggregate window."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The volume of trades during this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "vw": {
+ "type": "number",
+ "format": "double",
+ "description": "The volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
}
- ]
+ }
},
"example": {
- "ev": "AM",
- "sym": "O:ONEM220121C00025000",
- "v": 2,
- "av": 8,
- "op": 2.2,
- "vw": 2.05,
- "o": 2.05,
- "c": 2.05,
- "h": 2.05,
- "l": 2.05,
- "a": 2.1312,
- "z": 2,
- "s": 1632419640000,
- "e": 1632419700000
+ "ev": "XAS",
+ "pair": "BCD-USD",
+ "v": 951.6112,
+ "vw": 0.7756,
+ "z": 73,
+ "o": 0.772,
+ "c": 0.784,
+ "h": 0.784,
+ "l": 0.771,
+ "s": 1610463240000,
+ "e": 1610463300000
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "aggregates",
"description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
- "name": "options",
- "description": "Options data"
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
},
- "x-polygon-entitlement-allowed-timeframes": [
- {
- "name": "delayed",
- "description": "15 minute delayed data"
- },
+ "x-massive-entitlement-allowed-timeframes": [
{
"name": "realtime",
"description": "Real Time Data"
@@ -1331,94 +3115,72 @@
]
}
},
- "/forex/C": {
+ "/business/crypto/FMV": {
"get": {
- "summary": "Quotes",
- "description": "Stream real-time forex quotes for a given forex pair.\n",
+ "summary": "Fair Market Value",
+ "description": "Real-time fair market value for a given crypto ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a forex quote event.",
+ "description": "The WebSocket message for a fair market value event.",
"content": {
"application/json": {
"schema": {
- "allOf": [
- {
- "type": "object",
- "properties": {
- "ev": {
- "type": "string",
- "description": "The event type."
- },
- "p": {
- "type": "string",
- "description": "The current pair."
- },
- "x": {
- "type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
- },
- "a": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "b": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "t": {
- "type": "integer",
- "description": "The Timestamp in Unix MS."
- }
- }
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "FMV"
+ ],
+ "description": "The event type."
},
- {
- "properties": {
- "ev": {
- "enum": [
- "C"
- ],
- "description": "The event type."
- }
- }
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n"
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
}
- ]
+ }
},
"example": {
- "ev": "C",
- "p": "USD/CNH",
- "x": "44",
- "a": 6.83366,
- "b": 6.83363,
- "t": 1536036818784
+ "ev": "FMV",
+ "fmv": 33021.9,
+ "sym": "X:BTC-USD",
+ "t": 1610462007425
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
},
- "x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1426,99 +3188,128 @@
]
}
},
- "/forex/CA": {
+ "/launchpad/crypto/AM": {
"get": {
"summary": "Aggregates (Per Minute)",
- "description": "Stream real-time per-minute forex aggregates for a given forex pair.\n",
+ "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(?([A-Z]{3})\\/?([A-Z]{3}))$/"
+ "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a forex per-minute aggregate event.",
+ "description": "The WebSocket message for a minute aggregate event.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ev": {
- "type": "string",
- "enum": [
- "CA"
- ],
"description": "The event type."
},
- "pair": {
- "type": "string",
- "description": "The currency pair."
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given stock."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The tick volume."
+ },
+ "av": {
+ "type": "integer",
+ "description": "Today's accumulated volume."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening price."
+ },
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The volume-weighted average value for the aggregate window."
},
"o": {
"type": "number",
"format": "double",
- "description": "The open price for this aggregate window."
+ "description": "The open price for the symbol in the given time period."
},
"c": {
"type": "number",
"format": "double",
- "description": "The close price for this aggregate window."
+ "description": "The close price for the symbol in the given time period."
},
"h": {
"type": "number",
"format": "double",
- "description": "The high price for this aggregate window."
+ "description": "The highest price for the symbol in the given time period."
},
"l": {
"type": "number",
"format": "double",
- "description": "The low price for this aggregate window."
+ "description": "The lowest price for the symbol in the given time period."
},
- "v": {
+ "a": {
+ "type": "number",
+ "format": "float",
+ "description": "Today's volume weighted average price."
+ },
+ "z": {
"type": "integer",
- "description": "The volume of trades during this aggregate window."
+ "description": "The average trade size for this aggregate window."
},
"s": {
"type": "integer",
- "description": "The start time for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The end time for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
"example": {
- "ev": "CA",
- "pair": "USD/EUR",
- "o": 0.8687,
- "c": 0.86889,
- "h": 0.86889,
- "l": 0.8686,
- "v": 20,
- "s": 1539145740000
+ "ev": "AM",
+ "sym": "X:BTC-USD",
+ "v": 951.6112,
+ "av": 738.6112,
+ "op": 26503.8,
+ "vw": 26503.8,
+ "o": 27503.8,
+ "c": 27203.8,
+ "h": 27893.8,
+ "l": 26503.8,
+ "a": 26503.8,
+ "z": 10,
+ "s": 1610463240000,
+ "e": 1610463300000
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
+ "x-massive-entitlement-data-type": {
"name": "aggregates",
"description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
- "name": "fx",
- "description": "Forex data"
+ "x-massive-entitlement-market-type": {
+ "name": "crypto",
+ "description": "Crypto data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1526,15 +3317,15 @@
]
}
},
- "/crypto/XT": {
+ "/launchpad/crypto/LV": {
"get": {
- "summary": "Trades",
- "description": "Stream real-time crypto trades for a given crypto pair.\n",
+ "summary": "Value",
+ "description": "Real-time value for a given crypto ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -1545,7 +3336,7 @@
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto trade event.",
+ "description": "The WebSocket message for a value event.",
"content": {
"application/json": {
"schema": {
@@ -1554,76 +3345,44 @@
"ev": {
"type": "string",
"enum": [
- "XT"
+ "LV"
],
"description": "The event type."
},
- "pair": {
- "type": "string",
- "description": "The crypto pair."
+ "val": {
+ "description": "The current value of the security."
},
- "p": {
- "type": "number",
- "format": "double",
- "description": "The price."
+ "sym": {
+ "description": "The ticker symbol for the given security."
},
"t": {
- "type": "integer",
- "description": "The Timestamp in Unix MS."
- },
- "s": {
- "type": "number",
- "format": "double",
- "description": "The size."
- },
- "c": {
- "type": "array",
- "description": "The conditions.\n0 (or empty array): empty\n1: sellside\n2: buyside\n",
- "items": {
- "type": "integer",
- "description": "The ID of the condition."
- }
- },
- "i": {
- "type": "integer",
- "description": "The ID of the trade (optional)."
- },
- "x": {
- "type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
- },
- "r": {
- "type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ "description": "The nanosecond timestamp."
}
}
},
"example": {
- "ev": "XT",
- "pair": "BTC-USD",
- "p": 33021.9,
- "t": 1610462007425,
- "s": 0.01616617,
- "c": [
- 2
- ],
- "i": 14272084,
- "x": 3,
- "r": 1610462007576
+ "ev": "LV",
+ "val": 33021.9,
+ "sym": "X:BTC-USD",
+ "t": 1610462007425
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "trades",
- "description": "Trade data"
+ "x-massive-entitlement-data-type": {
+ "name": "indicative-price",
+ "description": "Indicative Price"
},
- "x-polygon-entitlement-market-type": {
+ "x-massive-entitlement-market-type": {
"name": "crypto",
"description": "Crypto data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1631,100 +3390,115 @@
]
}
},
- "/crypto/XQ": {
+ "/indices/A": {
"get": {
- "summary": "Quotes",
- "description": "Stream real-time crypto quotes for a given crypto pair.\n",
+ "summary": "Aggregates (Per Second)",
+ "description": "Stream real-time second aggregates for a given index ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n",
+ "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ "pattern": "/^(I:[a-zA-Z0-9]+)$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto quote event.",
+ "description": "The WebSocket message for a second aggregate event.",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "ev": {
- "type": "string",
- "enum": [
- "XQ"
- ],
- "description": "The event type."
- },
- "pair": {
- "type": "string",
- "description": "The crypto pair."
- },
- "bp": {
- "type": "number",
- "format": "double",
- "description": "The bid price."
- },
- "bs": {
- "type": "number",
- "format": "double",
- "description": "The bid size."
- },
- "ap": {
- "type": "number",
- "format": "double",
- "description": "The ask price."
- },
- "as": {
- "type": "number",
- "format": "double",
- "description": "The ask size."
- },
- "t": {
- "type": "integer",
- "description": "The Timestamp in Unix MS."
- },
- "x": {
- "type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The symbol representing the given index."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening value."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The opening index value for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The closing index value for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest index value for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest index value for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
},
- "r": {
- "type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "A"
+ ],
+ "description": "The event type."
+ }
+ }
}
- }
+ ]
},
"example": {
- "ev": "XQ",
- "pair": "BTC-USD",
- "bp": 33052.79,
- "bs": 0.48,
- "ap": 33073.19,
- "as": 0.601,
- "t": 1610462411115,
- "x": 1,
- "r": 1610462411128
+ "ev": "A",
+ "sym": "I:SPX",
+ "op": 3985.67,
+ "o": 3985.67,
+ "c": 3985.67,
+ "h": 3985.67,
+ "l": 3985.67,
+ "s": 1678220675805,
+ "e": 1678220675805
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "x-massive-entitlement-market-type": {
+ "name": "indices",
+ "description": "Indices data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1732,120 +3506,115 @@
]
}
},
- "/crypto/XL2": {
+ "/indices/AM": {
"get": {
- "summary": "Level 2 Book",
- "description": "Stream real-time level 2 book data for a given crypto pair.\n",
+ "summary": "Aggregates (Per Minute)",
+ "description": "Stream real-time minute aggregates for a given index ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n",
+ "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ "pattern": "/^(I:[a-zA-Z0-9]+)$/"
},
"example": "*"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto level 2 book event.",
+ "description": "The WebSocket message for a minute aggregate event.",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "ev": {
- "type": "string",
- "enum": [
- "XL2"
- ],
- "description": "The event type."
- },
- "pair": {
- "type": "string",
- "description": "The crypto pair."
- },
- "b": {
- "type": "array",
- "description": "An array of bid prices with a maximum depth of 100.",
- "items": {
- "type": "array",
- "description": "An array where the first item is bid price and the second item is size.",
- "items": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The symbol representing the given index."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening value."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The opening index value for this aggregate window."
+ },
+ "c": {
"type": "number",
- "format": "double"
+ "format": "double",
+ "description": "The closing index value for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest index value for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest index value for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
- "a": {
- "type": "array",
- "description": "An array of ask prices with a maximum depth of 100.",
- "items": {
- "type": "array",
- "description": "An array where the first item is ask price and the second item is size.",
- "items": {
- "type": "number",
- "format": "double"
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "AM"
+ ],
+ "description": "The event type."
}
}
- },
- "t": {
- "type": "integer",
- "description": "The Timestamp in Unix MS."
- },
- "x": {
- "type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
- },
- "r": {
- "type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
}
- }
+ ]
},
"example": {
- "ev": "XL2",
- "pair": "BTC-USD",
- "t": 1610462411115,
- "r": 1610462411128,
- "x": 1,
- "b": [
- [
- 33712.71,
- 0.18635
- ],
- [
- 33712.7,
- 0.134
- ]
- ],
- "a": [
- [
- 33718.23,
- 3.5527483
- ],
- [
- 33718.24,
- 0.1
- ]
- ]
+ "ev": "AM",
+ "sym": "I:SPX",
+ "op": 3985.67,
+ "o": 3985.67,
+ "c": 3985.67,
+ "h": 3985.67,
+ "l": 3985.67,
+ "s": 1678220675805,
+ "e": 1678220675805
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "nbbo",
- "description": "NBBO data"
+ "x-massive-entitlement-data-type": {
+ "name": "aggregates",
+ "description": "Aggregate data"
},
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "x-massive-entitlement-market-type": {
+ "name": "indices",
+ "description": "Indices data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -1853,26 +3622,26 @@
]
}
},
- "/crypto/XA": {
+ "/indices/V": {
"get": {
- "summary": "Aggregates (Per Minute)",
- "description": "Stream real-time per-minute crypto aggregates for a given crypto pair.\n",
+ "summary": "Value",
+ "description": "Real-time value for a given index ticker symbol.\n",
"parameters": [
{
"name": "ticker",
"in": "query",
- "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n",
+ "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
- "pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
+ "pattern": "/^(I:[a-zA-Z0-9]+)$/"
},
- "example": "*"
+ "example": "I:SPX"
}
],
"responses": {
"200": {
- "description": "The WebSocket message for a crypto per-minute aggregate event.",
+ "description": "The WebSocket message for a value event.",
"content": {
"application/json": {
"schema": {
@@ -1881,83 +3650,44 @@
"ev": {
"type": "string",
"enum": [
- "XA"
+ "V"
],
"description": "The event type."
},
- "pair": {
- "type": "string",
- "description": "The crypto pair."
- },
- "o": {
- "type": "number",
- "format": "double",
- "description": "The open price for this aggregate window."
- },
- "c": {
- "type": "number",
- "format": "double",
- "description": "The close price for this aggregate window."
- },
- "h": {
- "type": "number",
- "format": "double",
- "description": "The high price for this aggregate window."
- },
- "l": {
- "type": "number",
- "format": "double",
- "description": "The low price for this aggregate window."
- },
- "v": {
- "type": "integer",
- "description": "The volume of trades during this aggregate window."
- },
- "s": {
- "type": "integer",
- "description": "The start time for this aggregate window in Unix Milliseconds."
- },
- "e": {
- "type": "integer",
- "description": "The end time for this aggregate window in Unix Milliseconds."
+ "val": {
+ "description": "The value of the index."
},
- "vw": {
- "type": "number",
- "format": "double",
- "description": "The volume weighted average price."
+ "T": {
+ "description": "The assigned ticker of the index."
},
- "z": {
- "type": "integer",
- "description": "The average trade size for this aggregate window."
+ "t": {
+ "description": "The Timestamp in Unix MS."
}
}
},
"example": {
- "ev": "XA",
- "pair": "BCD-USD",
- "v": 951.6112,
- "vw": 0.7756,
- "z": 73,
- "o": 0.772,
- "c": 0.784,
- "h": 0.784,
- "l": 0.771,
- "s": 1610463240000,
- "e": 1610463300000
+ "ev": "V",
+ "val": 3988.5,
+ "T": "I:SPX",
+ "t": 1678220098130
}
}
}
}
},
- "x-polygon-entitlement-data-type": {
- "name": "aggregates",
- "description": "Aggregate data"
+ "x-massive-entitlement-data-type": {
+ "name": "value",
+ "description": "Value data"
},
- "x-polygon-entitlement-market-type": {
- "name": "crypto",
- "description": "Crypto data"
+ "x-massive-entitlement-market-type": {
+ "name": "indices",
+ "description": "Indices data"
},
- "x-polygon-entitlement-allowed-timeframes": [
+ "x-massive-entitlement-allowed-timeframes": [
+ {
+ "name": "delayed",
+ "description": "15 minute delayed data"
+ },
{
"name": "realtime",
"description": "Real Time Data"
@@ -2192,11 +3922,11 @@
},
"AggsStartTime": {
"type": "integer",
- "description": "The start time for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"AggsEndTime": {
"type": "integer",
- "description": "The end time for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
},
"StockTradeEvent": {
"type": "object",
@@ -2213,7 +3943,7 @@
},
"x": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"i": {
"type": "string",
@@ -2234,7 +3964,7 @@
},
"c": {
"type": "array",
- "description": "The trade conditions. See Conditions and Indicators\" for Polygon.io's trade conditions glossary.\n",
+ "description": "The trade conditions. See Conditions and Indicators for Massive.com's trade conditions glossary.\n",
"items": {
"type": "integer",
"description": "The ID of the condition."
@@ -2242,11 +3972,19 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
},
"q": {
"type": "integer",
"description": "The sequence number represents the sequence in which message events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11).\n"
+ },
+ "trfi": {
+ "type": "integer",
+ "description": "The ID for the Trade Reporting Facility where the trade took place."
+ },
+ "trft": {
+ "type": "integer",
+ "description": "The TRF (Trade Reporting Facility) Timestamp in Unix MS. \nThis is the timestamp of when the trade reporting facility received this trade.\n"
}
}
},
@@ -2295,7 +4033,7 @@
},
"i": {
"type": "array",
- "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://polygon.io/glossary/us/stocks/conditions-indicators).\n",
+ "description": "The indicators. For more information, see our glossary of [Conditions and\nIndicators](https://massive.com/glossary/us/stocks/conditions-indicators).\n",
"items": {
"type": "integer",
"description": "The indicator code.\n"
@@ -2303,7 +4041,11 @@
},
"t": {
"type": "integer",
- "description": "The Timestamp in Unix MS."
+ "description": "The SIP timestamp in Unix MS."
+ },
+ "q": {
+ "type": "integer",
+ "description": "The sequence number represents the sequence in which quote events happened.\nThese are increasing and unique per ticker symbol, but will not always be\nsequential (e.g., 1, 2, 6, 9, 10, 11). Values reset after each trading session/day.\n"
},
"z": {
"type": "integer",
@@ -2370,11 +4112,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
},
"otc": {
"type": "boolean",
@@ -2443,11 +4185,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
},
"otc": {
"type": "boolean",
@@ -2528,11 +4270,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
},
"otc": {
"type": "boolean",
@@ -2627,7 +4369,7 @@
},
"x": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"o": {
"type": "integer",
@@ -2654,7 +4396,7 @@
},
"StockExchangeID": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"OptionTradeEvent": {
"type": "object",
@@ -2671,7 +4413,7 @@
},
"x": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"p": {
"type": "number",
@@ -2715,11 +4457,11 @@
},
"bx": {
"type": "integer",
- "description": "The bid exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The bid exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"ax": {
"type": "integer",
- "description": "The ask exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The ask exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"bp": {
"type": "number",
@@ -2808,11 +4550,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
@@ -2877,11 +4619,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
@@ -2958,11 +4700,11 @@
},
"s": {
"type": "integer",
- "description": "The timestamp of the starting tick for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The timestamp of the ending tick for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
@@ -2995,7 +4737,7 @@
},
"x": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"a": {
"type": "number",
@@ -3028,7 +4770,7 @@
},
"x": {
"type": "integer",
- "description": "The exchange ID. See Exchanges for Polygon.io's mapping of exchange IDs."
+ "description": "The exchange ID. See Exchanges for Massive.com's mapping of exchange IDs."
},
"a": {
"type": "number",
@@ -3058,7 +4800,7 @@
}
]
},
- "ForexAggregateEvent": {
+ "ForexMinuteAggregateEvent": {
"type": "object",
"properties": {
"ev": {
@@ -3098,11 +4840,59 @@
},
"s": {
"type": "integer",
- "description": "The start time for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "ForexSecondAggregateEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "CAS"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The currency pair."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The high price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The low price for this aggregate window."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The volume of trades during this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The end time for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
}
}
},
@@ -3146,11 +4936,11 @@
},
"x": {
"type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
},
"r": {
"type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ "description": "The timestamp that the tick was received by Massive."
}
}
},
@@ -3196,15 +4986,15 @@
},
"x": {
"type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
},
"r": {
"type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ "description": "The timestamp that the tick was received by Massive."
}
}
},
- "CryptoAggregateEvent": {
+ "CryptoMinuteAggregateEvent": {
"type": "object",
"properties": {
"ev": {
@@ -3244,11 +5034,68 @@
},
"s": {
"type": "integer",
- "description": "The start time for this aggregate window in Unix Milliseconds."
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "vw": {
+ "type": "number",
+ "format": "double",
+ "description": "The volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
+ }
+ }
+ },
+ "CryptoSecondAggregateEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "XAS"
+ ],
+ "description": "The event type."
+ },
+ "pair": {
+ "type": "string",
+ "description": "The crypto pair."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The high price for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The low price for this aggregate window."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The volume of trades during this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
},
"e": {
"type": "integer",
- "description": "The end time for this aggregate window in Unix Milliseconds."
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
},
"vw": {
"type": "number",
@@ -3277,7 +5124,7 @@
},
"b": {
"type": "array",
- "description": "An array of bid prices with a maximum depth of 100.",
+ "description": "An array of bid prices, where each entry contains two elements: the first is the bid price, and the second is the size, with a maximum depth of 100.",
"items": {
"type": "array",
"description": "An array where the first item is bid price and the second item is size.",
@@ -3289,7 +5136,7 @@
},
"a": {
"type": "array",
- "description": "An array of ask prices with a maximum depth of 100.",
+ "description": "An array of ask prices, where each entry contains two elements: the first is the ask price, and the second is the size, with a maximum depth of 100.",
"items": {
"type": "array",
"description": "An array where the first item is ask price and the second item is size.",
@@ -3305,11 +5152,11 @@
},
"x": {
"type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
},
"r": {
"type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ "description": "The timestamp that the tick was received by Massive."
}
}
},
@@ -3319,18 +5166,311 @@
},
"CryptoExchangeID": {
"type": "integer",
- "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
+ "description": "The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.\n"
},
"CryptoReceivedTimestamp": {
"type": "integer",
- "description": "The timestamp that the tick was received by Polygon."
+ "description": "The timestamp that the tick was received by Massive."
+ },
+ "IndicesBaseAggregateEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The symbol representing the given index."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening value."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The opening index value for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The closing index value for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest index value for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest index value for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "IndicesMinuteAggregateEvent": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The symbol representing the given index."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening value."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The opening index value for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The closing index value for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest index value for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest index value for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "AM"
+ ],
+ "description": "The event type."
+ }
+ }
+ }
+ ]
+ },
+ "IndicesSecondAggregateEvent": {
+ "allOf": [
+ {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The symbol representing the given index."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening value."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The opening index value for this aggregate window."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The closing index value for this aggregate window."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest index value for this aggregate window."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest index value for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ {
+ "properties": {
+ "ev": {
+ "enum": [
+ "A"
+ ],
+ "description": "The event type."
+ }
+ }
+ }
+ ]
+ },
+ "IndicesValueEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "V"
+ ],
+ "description": "The event type."
+ },
+ "val": {
+ "description": "The value of the index."
+ },
+ "T": {
+ "description": "The assigned ticker of the index."
+ },
+ "t": {
+ "description": "The Timestamp in Unix MS."
+ }
+ }
+ },
+ "LaunchpadWebsocketMinuteAggregateEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "description": "The event type."
+ },
+ "sym": {
+ "type": "string",
+ "description": "The ticker symbol for the given stock."
+ },
+ "v": {
+ "type": "integer",
+ "description": "The tick volume."
+ },
+ "av": {
+ "type": "integer",
+ "description": "Today's accumulated volume."
+ },
+ "op": {
+ "type": "number",
+ "format": "double",
+ "description": "Today's official opening price."
+ },
+ "vw": {
+ "type": "number",
+ "format": "float",
+ "description": "The volume-weighted average value for the aggregate window."
+ },
+ "o": {
+ "type": "number",
+ "format": "double",
+ "description": "The open price for the symbol in the given time period."
+ },
+ "c": {
+ "type": "number",
+ "format": "double",
+ "description": "The close price for the symbol in the given time period."
+ },
+ "h": {
+ "type": "number",
+ "format": "double",
+ "description": "The highest price for the symbol in the given time period."
+ },
+ "l": {
+ "type": "number",
+ "format": "double",
+ "description": "The lowest price for the symbol in the given time period."
+ },
+ "a": {
+ "type": "number",
+ "format": "float",
+ "description": "Today's volume weighted average price."
+ },
+ "z": {
+ "type": "integer",
+ "description": "The average trade size for this aggregate window."
+ },
+ "s": {
+ "type": "integer",
+ "description": "The start timestamp of this aggregate window in Unix Milliseconds."
+ },
+ "e": {
+ "type": "integer",
+ "description": "The end timestamp of this aggregate window in Unix Milliseconds."
+ }
+ }
+ },
+ "LaunchpadWebsocketValueEvent": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "LV"
+ ],
+ "description": "The event type."
+ },
+ "val": {
+ "description": "The current value of the security."
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
+ }
+ }
+ },
+ "BusinessWebsocketFairMarketValue": {
+ "type": "object",
+ "properties": {
+ "ev": {
+ "type": "string",
+ "enum": [
+ "FMV"
+ ],
+ "description": "The event type."
+ },
+ "fmv": {
+ "description": "Fair market value is only available on Business plans. It is our proprietary algorithm to generate a real-time, accurate, fair market value of a tradable security. For more information, contact us.\n"
+ },
+ "sym": {
+ "description": "The ticker symbol for the given security."
+ },
+ "t": {
+ "description": "The nanosecond timestamp."
+ }
+ }
}
},
"parameters": {
"StocksTickerParam": {
"name": "ticker",
"in": "query",
- "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://polygon.io/docs/stocks/get_v3_reference_tickers).\n",
+ "description": "Specify a stock ticker or use * to subscribe to all stock tickers.\nYou can also use a comma separated list to subscribe to multiple stock tickers.\nYou can retrieve available stock tickers from our [Stock Tickers API](https://massive.com/docs/stocks/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -3341,7 +5481,7 @@
"OptionsTickerParam": {
"name": "ticker",
"in": "query",
- "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n",
+ "description": "Specify an option contract or use * to subscribe to all option contracts.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
"required": true,
"schema": {
"type": "string",
@@ -3352,7 +5492,7 @@
"OptionsTickerWithoutWildcardParam": {
"name": "ticker",
"in": "query",
- "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://polygon.io/docs/options/get_v3_reference_options_contracts).\n",
+ "description": "Specify an option contract. You're only allowed to subscribe to 1,000 option contracts per connection.\nYou can also use a comma separated list to subscribe to multiple option contracts.\nYou can retrieve active options contracts from our [Options Contracts API](https://massive.com/docs/options/get_v3_reference_options_contracts).\n",
"required": true,
"schema": {
"type": "string",
@@ -3363,7 +5503,7 @@
"ForexTickerParam": {
"name": "ticker",
"in": "query",
- "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://polygon.io/docs/forex/get_v3_reference_tickers).\n",
+ "description": "Specify a forex pair in the format {from}/{to} or use * to subscribe to all forex pairs.\nYou can also use a comma separated list to subscribe to multiple forex pairs.\nYou can retrieve active forex tickers from our [Forex Tickers API](https://massive.com/docs/forex/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
@@ -3374,13 +5514,35 @@
"CryptoTickerParam": {
"name": "ticker",
"in": "query",
- "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://polygon.io/docs/crypto/get_v3_reference_tickers).\n",
+ "description": "Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs.\nYou can also use a comma separated list to subscribe to multiple crypto pairs.\nYou can retrieve active crypto tickers from our [Crypto Tickers API](https://massive.com/docs/crypto/get_v3_reference_tickers).\n",
"required": true,
"schema": {
"type": "string",
"pattern": "/^(?([A-Z]*)-(?[A-Z]{3}))$/"
},
"example": "*"
+ },
+ "IndicesIndexParam": {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(I:[a-zA-Z0-9]+)$/"
+ },
+ "example": "*"
+ },
+ "IndicesIndexParamWithoutWildcard": {
+ "name": "ticker",
+ "in": "query",
+ "description": "Specify an index ticker using \"I:\" prefix or use * to subscribe to all index tickers.\nYou can also use a comma separated list to subscribe to multiple index tickers.\nYou can retrieve available index tickers from our [Index Tickers API](https://massive.com/docs/indices/get_v3_reference_tickers).\n",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "pattern": "/^(I:[a-zA-Z0-9]+)$/"
+ },
+ "example": "I:SPX"
}
}
}
diff --git a/Makefile b/Makefile
index 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 bf0cb001..565532e6 100644
--- a/README.md
+++ b/README.md
@@ -1,29 +1,221 @@
-[](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.
-Python client for the [Polygon.io API](https://polygon.io).
+**Note:** Polygon.io has rebranded as [Massive.com](https://massive.com) on Oct 30, 2025. Existing API keys, accounts, and integrations continue to work exactly as before. The only change in this SDK is that it now defaults to the new API base at `api.massive.com`, while `api.polygon.io` remains supported for an extended period.
-## Install
+For details, see our [rebrand announcement blog post](https://massive.com/blog/polygon-is-now-massive/) or open an issue / contact [support@massive.com](mailto:support@massive.com) if you have questions.
+
+## Prerequisites
-`pip install polygon-api-client`
+Before installing the Massive Python client, ensure your environment has Python 3.9 or higher.
+
+## Install
-Requires Python >= 3.8.
+Please use pip to install or update to the latest stable version.
+```
+pip install -U massive
+```
## Getting started
-See the [Getting Started](https://polygon-api-client.readthedocs.io/en/latest/Getting-Started.html)
-section in our docs or view the [examples](./examples) directory.
+
+To get started, please see the [Getting Started](https://massive.com/docs/stocks/getting-started) section in our docs, view the [examples](./examples) directory for code snippets.
+
+The free tier of our API comes with usage limitations, potentially leading to rate limit errors if these are exceeded. For uninterrupted access and to support larger data requirements, we recommend reviewing our [subscription plans](https://massive.com/pricing), which are tailored for a wide range of needs from development to high-demand applications. Refer to our pricing page for detailed information on limits and features to ensure a seamless experience, especially for real-time data processing.
+
+## REST API Client
+Import the RESTClient.
+```python
+from massive import RESTClient
+```
+Create a new client with your [API key](https://massive.com/dashboard/api-keys)
+```python
+client = RESTClient(api_key="")
+```
+### Using the Client
+Request data using client methods.
+```python
+ticker = "AAPL"
+
+# List Aggregates (Bars)
+aggs = []
+for a in client.list_aggs(ticker=ticker, multiplier=1, timespan="minute", from_="2023-01-01", to="2023-06-13", limit=50000):
+ aggs.append(a)
+
+print(aggs)
+
+# Get Last Trade
+trade = client.get_last_trade(ticker=ticker)
+print(trade)
+
+# List Trades
+trades = client.list_trades(ticker=ticker, timestamp="2022-01-04")
+for trade in trades:
+ print(trade)
+
+# Get Last Quote
+quote = client.get_last_quote(ticker=ticker)
+print(quote)
+
+# List Quotes
+quotes = client.list_quotes(ticker=ticker, timestamp="2022-01-04")
+for quote in quotes:
+ print(quote)
+```
+
+### Pagination Behavior
+
+By default, the client paginates results for endpoints like `list_trades` and `list_quotes` behind the scenes for you. Understanding how pagination interacts with the `limit` parameter is key.
+
+#### Default (Pagination Enabled)
+
+Pagination is enabled by default (`pagination=True`):
+
+* `limit` controls the page size, not the total number of results.
+* The client automatically fetches all pages, yielding results until none remain.
+
+Here's an example:
+
+```python
+client = RESTClient(api_key="")
+trades = [t for t in client.list_trades(ticker="TSLA", limit=100)]
+```
+
+This fetches all TSLA trades, 100 per page.
+
+#### Disabling Pagination
+
+To return a fixed number of results and stop, disable pagination:
+
+```python
+client = RESTClient(api_key="", pagination=False)
+trades = [t for t in client.list_trades(ticker="TSLA", limit=100)]
+```
+
+This returns at most 100 total trades, no additional pages.
+
+### Performance Tip
+
+If you're fetching large datasets, always use the maximum supported limit for the API endpoint. This reduces the number of API calls and improves overall performance.
+
+### Additional Filter Parameters
+
+Many of the APIs in this client library support the use of additional filter parameters to refine your queries. Please refer to the specific API documentation for details on which filter parameters are supported for each endpoint. These filters can be applied using the following operators:
+
+- `.gt`: greater than
+- `.gte`: greater than or equal to
+- `.lt`: less than
+- `.lte`: less than or equal to
+
+Here's a sample code snippet that demonstrates how to use these filter parameters when requesting an Options Chain using the `list_snapshot_options_chain` method. In this example, the filter parameters ensure that the returned options chain data will only include options with an expiration date that is greater than or equal to "2024-03-16" and a strike price that falls between 29 and 30 (inclusive).
+
+```python
+options_chain = []
+for o in client.list_snapshot_options_chain(
+ "HCP",
+ params={
+ "expiration_date.gte": "2024-03-16",
+ "strike_price.gte": 29,
+ "strike_price.lte": 30,
+ },
+):
+ options_chain.append(o)
+
+print(options_chain)
+print(len(options_chain))
+```
+
+Also, please refer to the API documentation to get a full understanding of how the API works and the supported arguments. All required arguments are annotated with red asterisks " * " and argument examples are set.
+
+## Debugging with RESTClient
+
+Sometimes you may find it useful to see the actual request and response details while working with the API. The `RESTClient` allows for this through its `trace=True` option.
+
+### How to Enable Debug Mode
+
+You can activate the debug mode as follows:
+
+```python
+client = RESTClient(trace=True, verbose=True)
+```
+
+### What Does Debug Mode Do?
+
+When debug mode is enabled, the client will print out useful debugging information for each API request. You need to enable `verbose=True` too so that you log the trace or already have your own logger configured. This includes: the request URL, the headers sent in the request, and the headers received in the response.
+
+### Example Output
+
+For instance, if you made a request for `TSLA` data for the date `2023-08-01`, you would see debug output similar to the following:
+
+```
+Request URL: https://api.massive.com/v2/aggs/ticker/TSLA/range/1/minute/2023-08-01/2023-08-01?limit=50000
+Request Headers: {'Authorization': 'Bearer REDACTED', 'Accept-Encoding': 'gzip', 'User-Agent': 'Massive.com PythonClient/1.12.4'}
+Response Headers: {'Server': 'nginx/1.19.2', 'Date': 'Tue, 05 Sep 2023 23:07:02 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Content-Encoding': 'gzip', 'Vary': 'Accept-Encoding', 'X-Request-Id': '727c82feed3790b44084c3f4cae1d7d4', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains'}
+```
+
+This can be an invaluable tool for debugging issues or understanding how the client interacts with the API.
+
+## WebSocket Client
+
+Import classes
+```python
+from massive import WebSocketClient
+from massive.websocket.models import WebSocketMessage
+from typing import List
+```
+### Using the client
+Create a new client with your [API key](https://massive.com/dashboard/api-keys) and subscription options.
+```python
+# Note: Multiple subscriptions can be added to the array
+# For example, if you want to subscribe to AAPL and META,
+# you can do so by adding "T.META" to the subscriptions array. ["T.AAPL", "T.META"]
+# If you want to subscribe to all tickers, place an asterisk in place of the symbol. ["T.*"]
+ws = WebSocketClient(api_key=, subscriptions=["T.AAPL"])
+```
+Create a handler function and run the WebSocket.
+```python
+def handle_msg(msg: List[WebSocketMessage]):
+ for m in msg:
+ print(m)
+
+ws.run(handle_msg=handle_msg)
+```
+Check out more detailed examples [here](https://github.com/massive-com/client-python/tree/master/examples/websocket).
## Contributing
If you found a bug or have an idea for a new feature, please first discuss it with us by
-[submitting a new issue](https://github.com/polygon-io/client-python/issues/new/choose).
+[submitting a new issue](https://github.com/massive-com/client-python/issues/new/choose).
+We will respond to issues within at most 3 weeks.
We're also open to volunteers if you want to submit a PR for any open issues but
please discuss it with us beforehand. PRs that aren't linked to an existing issue or
-discussed with us ahead of time will generally be declined. If you have more general
-feedback or want to discuss using this client with other users, feel free to reach out
-on our [Slack channel](https://polygon-io.slack.com/archives/C03FRFN7UF3).
+discussed with us ahead of time will generally be declined.
+
+### Development
+
+If you plan to contribute by developing new features then you will need to install certain dependencies.
+
+#### Poetry
+
+Poetry is a packaging and dependency manager for Python.
+Installation instructions can be found [on their website](https://python-poetry.org/docs/#installation).
+Once installed run `poetry install` to install the required dependencies. This step should be run after incorporating new upstream changes.
+
+#### Makefile
+
+Our Makefile has the common operations needed when developing on this repo. Running tests and linting can both be
+run through our Makefile. Just run `make help` to see the list of available commands.
+
+If you're using `pyenv` to manage active Python versions then you might need to launch a Poetry shell before running
+Make commands in order to actually use your chosen Python version. This is because Poetry uses the system Python version
+by default.
+
+```shell
+poetry shell # start shell
+poetry install # install deps
+
+make test # run your make commands
+```
## Release planning
This client will attempt to follow the release cadence of our API.
diff --git a/docs/requirements.txt b/docs/requirements.txt
index b72deef5..e8c712fd 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,2 +1,2 @@
-sphinx-autodoc-typehints~=1.18.1
+sphinx-autodoc-typehints~=1.19.2
websockets~=10.3
diff --git a/docs/source/Aggs.rst b/docs/source/Aggs.rst
index 8493cdcb..b8e3fcc8 100644
--- a/docs/source/Aggs.rst
+++ b/docs/source/Aggs.rst
@@ -3,6 +3,17 @@
Aggs
==========
+===========
+List aggs
+===========
+
+- `Stocks aggs`_
+- `Options aggs`_
+- `Forex aggs`_
+- `Crypto aggs`_
+
+.. automethod:: massive.RESTClient.list_aggs
+
===========
Get aggs
===========
@@ -12,7 +23,7 @@ Get aggs
- `Forex aggs`_
- `Crypto aggs`_
-.. automethod:: polygon.RESTClient.get_aggs
+.. automethod:: massive.RESTClient.get_aggs
============================
Get grouped daily aggs
@@ -22,7 +33,7 @@ Get grouped daily aggs
- `Forex grouped daily aggs`_
- `Crypto grouped daily aggs`_
-.. automethod:: polygon.RESTClient.get_grouped_daily_aggs
+.. automethod:: massive.RESTClient.get_grouped_daily_aggs
============================
Get daily open close agg
@@ -32,7 +43,7 @@ Get daily open close agg
- `Options daily open/close agg`_
- `Crypto daily open/close agg`_
-.. automethod:: polygon.RESTClient.get_daily_open_close_agg
+.. automethod:: massive.RESTClient.get_daily_open_close_agg
============================
Get previous close agg
@@ -43,19 +54,19 @@ Get previous close agg
- `Forex previous close agg`_
- `Crypto previous close agg`_
-.. automethod:: polygon.RESTClient.get_previous_close_agg
-
-.. _Stocks aggs: https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
-.. _Options aggs: https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to
-.. _Forex aggs: https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to
-.. _Crypto aggs: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
-.. _Stocks grouped daily aggs: https://polygon.io/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date
-.. _Forex grouped daily aggs: https://polygon.io/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date
-.. _Crypto grouped daily aggs: https://polygon.io/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date
-.. _Stocks daily open/close agg: https://polygon.io/docs/stocks/get_v1_open-close__stocksticker___date
-.. _Options daily open/close agg: https://polygon.io/docs/options/get_v1_open-close__optionsticker___date
-.. _Crypto daily open/close agg: https://polygon.io/docs/crypto/get_v1_open-close_crypto__from___to___date
-.. _Stocks previous close agg: https://polygon.io/docs/stocks/get_v2_aggs_ticker__stocksticker__prev
-.. _Options previous close agg: https://polygon.io/docs/options/get_v2_aggs_ticker__optionsticker__prev
-.. _Forex previous close agg: https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__prev
-.. _Crypto previous close agg: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev
\ No newline at end of file
+.. automethod:: massive.RESTClient.get_previous_close_agg
+
+.. _Stocks aggs: https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
+.. _Options aggs: https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to
+.. _Forex aggs: https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to
+.. _Crypto aggs: https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
+.. _Stocks grouped daily aggs: https://massive.com/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date
+.. _Forex grouped daily aggs: https://massive.com/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date
+.. _Crypto grouped daily aggs: https://massive.com/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date
+.. _Stocks daily open/close agg: https://massive.com/docs/stocks/get_v1_open-close__stocksticker___date
+.. _Options daily open/close agg: https://massive.com/docs/options/get_v1_open-close__optionsticker___date
+.. _Crypto daily open/close agg: https://massive.com/docs/crypto/get_v1_open-close_crypto__from___to___date
+.. _Stocks previous close agg: https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__prev
+.. _Options previous close agg: https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__prev
+.. _Forex previous close agg: https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__prev
+.. _Crypto previous close agg: https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev
\ No newline at end of file
diff --git a/docs/source/Contracts.rst b/docs/source/Contracts.rst
index 9278168f..c58c11e5 100644
--- a/docs/source/Contracts.rst
+++ b/docs/source/Contracts.rst
@@ -9,7 +9,7 @@ Get option contract
- `Options Contract`_
-.. automethod:: polygon.RESTClient.get_options_contract
+.. automethod:: massive.RESTClient.get_options_contract
=================================
List Options Contracts
@@ -17,8 +17,8 @@ List Options Contracts
- `Options Contracts`_
-.. automethod:: polygon.RESTClient.list_options_contracts
+.. automethod:: massive.RESTClient.list_options_contracts
-.. _Options Contract: https://polygon.io/docs/options/get_v3_reference_options_contracts__options_ticker
-.. _Options Contracts: https://polygon.io/docs/options/get_v3_reference_options_contracts
\ No newline at end of file
+.. _Options Contract: https://massive.com/docs/options/get_v3_reference_options_contracts__options_ticker
+.. _Options Contracts: https://massive.com/docs/options/get_v3_reference_options_contracts
\ No newline at end of file
diff --git a/docs/source/Enums.rst b/docs/source/Enums.rst
index 8f2233a4..47ca8b47 100644
--- a/docs/source/Enums.rst
+++ b/docs/source/Enums.rst
@@ -6,97 +6,97 @@ Enums
==============================================================
Sort
==============================================================
-.. autoclass:: polygon.rest.models.Sort
+.. autoclass:: massive.rest.models.Sort
:members:
:undoc-members:
==============================================================
Order
==============================================================
-.. autoclass:: polygon.rest.models.Order
+.. autoclass:: massive.rest.models.Order
:members:
:undoc-members:
==============================================================
Locale
==============================================================
-.. autoclass:: polygon.rest.models.Locale
+.. autoclass:: massive.rest.models.Locale
:members:
:undoc-members:
==============================================================
Market
==============================================================
-.. autoclass:: polygon.rest.models.Market
+.. autoclass:: massive.rest.models.Market
:members:
:undoc-members:
==============================================================
AssetClass
==============================================================
-.. autoclass:: polygon.rest.models.AssetClass
+.. autoclass:: massive.rest.models.AssetClass
:members:
:undoc-members:
==============================================================
DividendType
==============================================================
-.. autoclass:: polygon.rest.models.DividendType
+.. autoclass:: massive.rest.models.DividendType
:members:
:undoc-members:
==============================================================
Frequency
==============================================================
-.. autoclass:: polygon.rest.models.Frequency
+.. autoclass:: massive.rest.models.Frequency
:members:
:undoc-members:
==============================================================
DataType
==============================================================
-.. autoclass:: polygon.rest.models.DataType
+.. autoclass:: massive.rest.models.DataType
:members:
:undoc-members:
==============================================================
SIP
==============================================================
-.. autoclass:: polygon.rest.models.SIP
+.. autoclass:: massive.rest.models.SIP
:members:
:undoc-members:
==============================================================
ExchangeType
==============================================================
-.. autoclass:: polygon.rest.models.ExchangeType
+.. autoclass:: massive.rest.models.ExchangeType
:members:
:undoc-members:
==============================================================
Direction
==============================================================
-.. autoclass:: polygon.rest.models.Direction
+.. autoclass:: massive.rest.models.Direction
:members:
:undoc-members:
==============================================================
SnapshotMarketType
==============================================================
-.. autoclass:: polygon.rest.models.SnapshotMarketType
+.. autoclass:: massive.rest.models.SnapshotMarketType
:members:
:undoc-members:
==============================================================
Timeframe
==============================================================
-.. autoclass:: polygon.rest.models.Timeframe
+.. autoclass:: massive.rest.models.Timeframe
:members:
:undoc-members:
==============================================================
Precision
==============================================================
-.. autoclass:: polygon.rest.models.Precision
+.. autoclass:: massive.rest.models.Precision
:members:
:undoc-members:
diff --git a/docs/source/Exceptions.rst b/docs/source/Exceptions.rst
index a57f633b..6a9cc402 100644
--- a/docs/source/Exceptions.rst
+++ b/docs/source/Exceptions.rst
@@ -6,21 +6,14 @@ Exceptions
==============================================================
AuthError
==============================================================
-.. autoclass:: polygon.exceptions.AuthError
+.. autoclass:: massive.exceptions.AuthError
:members:
:undoc-members:
==============================================================
BadResponse
==============================================================
-.. autoclass:: polygon.exceptions.BadResponse
- :members:
- :undoc-members:
-
-==============================================================
-NoResultsError
-==============================================================
-.. autoclass:: polygon.exceptions.NoResultsError
+.. autoclass:: massive.exceptions.BadResponse
:members:
:undoc-members:
diff --git a/docs/source/Getting-Started.rst b/docs/source/Getting-Started.rst
index 15b9321e..120b4b25 100644
--- a/docs/source/Getting-Started.rst
+++ b/docs/source/Getting-Started.rst
@@ -2,26 +2,26 @@ Getting Started
===============
Requirements:
- - `Polygon.io API key `_
+ - `Massive.com API key `_
- `Python >= 3.8 `_
- - `This package `_
+ - `This package `_
.. code-block:: shell
- pip install polygon-api-client
+ pip install massive-api-client
HTTP client usage
-----------------
-.. automethod:: polygon.RESTClient.__init__
+.. automethod:: massive.RESTClient.__init__
-You can pass your API key via the environment variable :code:`POLYGON_API_KEY` or as the first parameter to the :code:`RESTClient` constructor:
+You can pass your API key via the environment variable :code:`MASSIVE_API_KEY` or as the first parameter to the :code:`RESTClient` constructor:
.. code-block:: python
- from polygon import RESTClient
+ from massive import RESTClient
- client = RESTClient() # POLYGON_API_KEY is used
+ client = RESTClient() # MASSIVE_API_KEY is used
client = RESTClient("api_key") # api_key is used
For non-paginated endpoints call :code:`get_*`:
@@ -41,7 +41,7 @@ For endpoints that have a set of parameters you can use the provided :doc:`enums
.. code-block:: python
- from polygon.rest.models import Sort
+ from massive.rest.models import Sort
client.list_trades(..., sort=Sort.ASC)
@@ -53,10 +53,14 @@ If it is a paginated :code:`list_*` response it's up to you to handle the "next_
.. literalinclude:: ../../examples/rest/raw-list.py
+To provide your own JSON processing library (exposing loads/dumps functions) pass :code:`custom_json=my_module`:
+
+.. literalinclude:: ../../examples/websocket/custom-json-get.py
+
WebSocket client usage
----------------------
-.. automethod:: polygon.WebSocketClient.__init__
+.. automethod:: massive.WebSocketClient.__init__
The simplest way to use the websocket client is to just provide a callback:
@@ -80,3 +84,6 @@ To handle raw string or byte messages yourself pass :code:`raw=True`:
.. literalinclude:: ../../examples/websocket/raw.py
+To provide your own JSON processing library (exposing loads/dumps functions) pass :code:`custom_json=my_module`:
+
+.. literalinclude:: ../../examples/websocket/custom-json.py
diff --git a/docs/source/Models.rst b/docs/source/Models.rst
index 1b41c235..393c8d74 100644
--- a/docs/source/Models.rst
+++ b/docs/source/Models.rst
@@ -3,187 +3,217 @@
Models
==============================================================
+==============================================================
+Universal Snapshot
+==============================================================
+.. autoclass:: massive.rest.models.UniversalSnapshot
+
+==============================================================
+Universal Snapshot Session
+==============================================================
+.. autoclass:: massive.rest.models.UniversalSnapshotSession
+
+==============================================================
+Universal Snapshot Last Quote
+==============================================================
+.. autoclass:: massive.rest.models.UniversalSnapshotLastQuote
+
+==============================================================
+Universal Snapshot Last Trade
+==============================================================
+.. autoclass:: massive.rest.models.UniversalSnapshotLastTrade
+
+==============================================================
+Universal Snapshot Details
+==============================================================
+.. autoclass:: massive.rest.models.UniversalSnapshotDetails
+
+==============================================================
+Universal Snapshot Underlying Asset
+==============================================================
+.. autoclass:: massive.rest.models.UniversalSnapshotUnderlyingAsset
+
==============================================================
Agg
==============================================================
-.. autoclass:: polygon.rest.models.Agg
+.. autoclass:: massive.rest.models.Agg
==============================================================
Grouped Daily Agg
==============================================================
-.. autoclass:: polygon.rest.models.GroupedDailyAgg
+.. autoclass:: massive.rest.models.GroupedDailyAgg
==============================================================
Daily Open Close Agg
==============================================================
-.. autoclass:: polygon.rest.models.DailyOpenCloseAgg
+.. autoclass:: massive.rest.models.DailyOpenCloseAgg
==============================================================
Previous Close Agg
==============================================================
-.. autoclass:: polygon.rest.models.PreviousCloseAgg
+.. autoclass:: massive.rest.models.PreviousCloseAgg
==============================================================
Trade
==============================================================
-.. autoclass:: polygon.rest.models.Trade
+.. autoclass:: massive.rest.models.Trade
==============================================================
Last Trade
==============================================================
-.. autoclass:: polygon.rest.models.LastTrade
+.. autoclass:: massive.rest.models.LastTrade
==============================================================
Crypto Trade
==============================================================
-.. autoclass:: polygon.rest.models.CryptoTrade
+.. autoclass:: massive.rest.models.CryptoTrade
==============================================================
Quote
==============================================================
-.. autoclass:: polygon.rest.models.Quote
+.. autoclass:: massive.rest.models.Quote
==============================================================
Last Quote
==============================================================
-.. autoclass:: polygon.rest.models.LastQuote
+.. autoclass:: massive.rest.models.LastQuote
==============================================================
Snapshot Min
==============================================================
-.. autoclass:: polygon.rest.models.MinuteSnapshot
+.. autoclass:: massive.rest.models.MinuteSnapshot
==============================================================
Snapshot
==============================================================
-.. autoclass:: polygon.rest.models.TickerSnapshot
+.. autoclass:: massive.rest.models.TickerSnapshot
==============================================================
Day Option Contract Snapshot
==============================================================
-.. autoclass:: polygon.rest.models.DayOptionContractSnapshot
+.. autoclass:: massive.rest.models.DayOptionContractSnapshot
==============================================================
Option Details
==============================================================
-.. autoclass:: polygon.rest.models.OptionDetails
+.. autoclass:: massive.rest.models.OptionDetails
==============================================================
Option Greeks
==============================================================
-.. autoclass:: polygon.rest.models.Greeks
+.. autoclass:: massive.rest.models.Greeks
==============================================================
Underlying Asset
==============================================================
-.. autoclass:: polygon.rest.models.UnderlyingAsset
+.. autoclass:: massive.rest.models.UnderlyingAsset
==============================================================
Option Contract Snapshot
==============================================================
-.. autoclass:: polygon.rest.models.OptionContractSnapshot
+.. autoclass:: massive.rest.models.OptionContractSnapshot
==============================================================
Order Book Quote
==============================================================
-.. autoclass:: polygon.rest.models.OrderBookQuote
+.. autoclass:: massive.rest.models.OrderBookQuote
==============================================================
Snapshot Ticker Full Book
==============================================================
-.. autoclass:: polygon.rest.models.SnapshotTickerFullBook
+.. autoclass:: massive.rest.models.SnapshotTickerFullBook
==============================================================
Ticker
==============================================================
-.. autoclass:: polygon.rest.models.Ticker
+.. autoclass:: massive.rest.models.Ticker
==============================================================
Address
==============================================================
-.. autoclass:: polygon.rest.models.CompanyAddress
+.. autoclass:: massive.rest.models.CompanyAddress
==============================================================
Branding
==============================================================
-.. autoclass:: polygon.rest.models.Branding
+.. autoclass:: massive.rest.models.Branding
==============================================================
Publisher
==============================================================
-.. autoclass:: polygon.rest.models.Publisher
+.. autoclass:: massive.rest.models.Publisher
==============================================================
Ticker Details
==============================================================
-.. autoclass:: polygon.rest.models.TickerDetails
+.. autoclass:: massive.rest.models.TickerDetails
==============================================================
Ticker News
==============================================================
-.. autoclass:: polygon.rest.models.TickerNews
+.. autoclass:: massive.rest.models.TickerNews
==============================================================
Ticker Types
==============================================================
-.. autoclass:: polygon.rest.models.TickerTypes
+.. autoclass:: massive.rest.models.TickerTypes
==============================================================
Market Holiday
==============================================================
-.. autoclass:: polygon.rest.models.MarketHoliday
+.. autoclass:: massive.rest.models.MarketHoliday
==============================================================
Market Currencies
==============================================================
-.. autoclass:: polygon.rest.models.MarketCurrencies
+.. autoclass:: massive.rest.models.MarketCurrencies
==============================================================
Market Exchanges
==============================================================
-.. autoclass:: polygon.rest.models.MarketExchanges
+.. autoclass:: massive.rest.models.MarketExchanges
==============================================================
Market Status
==============================================================
-.. autoclass:: polygon.rest.models.MarketStatus
+.. autoclass:: massive.rest.models.MarketStatus
==============================================================
Split
==============================================================
-.. autoclass:: polygon.rest.models.Split
+.. autoclass:: massive.rest.models.Split
==============================================================
Dividend
==============================================================
-.. autoclass:: polygon.rest.models.Dividend
+.. autoclass:: massive.rest.models.Dividend
==============================================================
Sip Mapping
==============================================================
-.. autoclass:: polygon.rest.models.SipMapping
+.. autoclass:: massive.rest.models.SipMapping
==============================================================
Consolidated
==============================================================
-.. autoclass:: polygon.rest.models.Consolidated
+.. autoclass:: massive.rest.models.Consolidated
==============================================================
Market Center
==============================================================
-.. autoclass:: polygon.rest.models.MarketCenter
+.. autoclass:: massive.rest.models.MarketCenter
==============================================================
Update Rules
==============================================================
-.. autoclass:: polygon.rest.models.UpdateRules
+.. autoclass:: massive.rest.models.UpdateRules
==============================================================
Condition
==============================================================
-.. autoclass:: polygon.rest.models.Condition
+.. autoclass:: massive.rest.models.Condition
==============================================================
Exchange
==============================================================
-.. autoclass:: polygon.rest.models.Exchange
+.. autoclass:: massive.rest.models.Exchange
diff --git a/docs/source/Quotes.rst b/docs/source/Quotes.rst
index 2ef22574..92fbf128 100644
--- a/docs/source/Quotes.rst
+++ b/docs/source/Quotes.rst
@@ -11,7 +11,7 @@ List quotes
- `Options quotes`_
- `Forex quotes`_
-.. automethod:: polygon.RESTClient.list_quotes
+.. automethod:: massive.RESTClient.list_quotes
=================================
Get last quote
@@ -19,7 +19,7 @@ Get last quote
- `Stocks last quote`_
-.. automethod:: polygon.RESTClient.get_last_quote
+.. automethod:: massive.RESTClient.get_last_quote
=================================
Get last forex quote
@@ -27,7 +27,7 @@ Get last forex quote
- `Forex last quote for a currency pair`_
-.. automethod:: polygon.RESTClient.get_last_forex_quote
+.. automethod:: massive.RESTClient.get_last_forex_quote
=================================
Get real-time currency conversion
@@ -35,11 +35,11 @@ Get real-time currency conversion
- `Forex real-time currency conversion`_
-.. automethod:: polygon.RESTClient.get_real_time_currency_conversion
+.. automethod:: massive.RESTClient.get_real_time_currency_conversion
-.. _Stocks quotes: https://polygon.io/docs/stocks/get_v3_quotes__stockticker
-.. _Options quotes: https://polygon.io/docs/options/get_v3_quotes__optionsticker
-.. _Forex quotes: https://polygon.io/docs/forex/get_v3_quotes__fxticker
-.. _Stocks last quote: https://polygon.io/docs/stocks/get_v2_last_nbbo__stocksticker
-.. _Forex last quote for a currency pair: https://polygon.io/docs/forex/get_v1_last_quote_currencies__from___to
-.. _Forex real-time currency conversion: https://polygon.io/docs/forex/get_v1_conversion__from___to
+.. _Stocks quotes: https://massive.com/docs/stocks/get_v3_quotes__stockticker
+.. _Options quotes: https://massive.com/docs/options/get_v3_quotes__optionsticker
+.. _Forex quotes: https://massive.com/docs/forex/get_v3_quotes__fxticker
+.. _Stocks last quote: https://massive.com/docs/stocks/get_v2_last_nbbo__stocksticker
+.. _Forex last quote for a currency pair: https://massive.com/docs/forex/get_v1_last_quote_currencies__from___to
+.. _Forex real-time currency conversion: https://massive.com/docs/forex/get_v1_conversion__from___to
diff --git a/docs/source/Reference.rst b/docs/source/Reference.rst
index 3b7bd3d3..a497ece4 100644
--- a/docs/source/Reference.rst
+++ b/docs/source/Reference.rst
@@ -12,7 +12,7 @@ Get market holidays
- `Forex market holidays`_
- `Crypto market holidays`_
-.. automethod:: polygon.RESTClient.get_market_holidays
+.. automethod:: massive.RESTClient.get_market_holidays
====================
Get market status
@@ -23,7 +23,7 @@ Get market status
- `Forex market status`_
- `Crypto market status`_
-.. automethod:: polygon.RESTClient.get_market_status
+.. automethod:: massive.RESTClient.get_market_status
====================
List tickers
@@ -34,7 +34,7 @@ List tickers
- `Forex tickers`_
- `Crypto tickers`_
-.. automethod:: polygon.RESTClient.list_tickers
+.. automethod:: massive.RESTClient.list_tickers
====================
Get ticker details
@@ -43,7 +43,7 @@ Get ticker details
- `Stocks ticker details`_
- `Options ticker details`_
-.. automethod:: polygon.RESTClient.get_ticker_details
+.. automethod:: massive.RESTClient.get_ticker_details
====================
List ticker news
@@ -52,7 +52,7 @@ List ticker news
- `Stocks ticker news`_
- `Options ticker news`_
-.. automethod:: polygon.RESTClient.list_ticker_news
+.. automethod:: massive.RESTClient.list_ticker_news
====================
Get ticker types
@@ -61,7 +61,7 @@ Get ticker types
- `Stocks ticker types`_
- `Options ticker types`_
-.. automethod:: polygon.RESTClient.get_ticker_types
+.. automethod:: massive.RESTClient.get_ticker_types
====================
List splits
@@ -69,7 +69,7 @@ List splits
- `Stocks splits`_
-.. automethod:: polygon.RESTClient.list_splits
+.. automethod:: massive.RESTClient.list_splits
====================
List dividends
@@ -77,7 +77,7 @@ List dividends
- `Stocks dividends`_
-.. automethod:: polygon.RESTClient.list_dividends
+.. automethod:: massive.RESTClient.list_dividends
====================
List conditions
@@ -88,7 +88,7 @@ List conditions
- `Forex conditions`_
- `Crypto conditions`_
-.. automethod:: polygon.RESTClient.list_conditions
+.. automethod:: massive.RESTClient.list_conditions
====================
Get exchanges
@@ -99,33 +99,33 @@ Get exchanges
- `Forex exchanges`_
- `Crypto exchanges`_
-.. automethod:: polygon.RESTClient.get_exchanges
-
-.. _Stocks market holidays: https://polygon.io/docs/stocks/get_v1_marketstatus_upcoming
-.. _Options market holidays: https://polygon.io/docs/options/get_v1_marketstatus_upcoming
-.. _Forex market holidays: https://polygon.io/docs/forex/get_v1_marketstatus_upcoming
-.. _Crypto market holidays: https://polygon.io/docs/crypto/get_v1_marketstatus_upcoming
-.. _Stocks market status: https://polygon.io/docs/stocks/get_v1_marketstatus_now
-.. _Options market status: https://polygon.io/docs/options/get_v1_marketstatus_now
-.. _Forex market status: https://polygon.io/docs/forex/get_v1_marketstatus_now
-.. _Crypto market status: https://polygon.io/docs/crypto/get_v1_marketstatus_now
-.. _Stocks tickers: https://polygon.io/docs/stocks/get_v3_reference_tickers
-.. _Options tickers: https://polygon.io/docs/options/get_v3_reference_tickers
-.. _Forex tickers: https://polygon.io/docs/forex/get_v3_reference_tickers
-.. _Crypto tickers: https://polygon.io/docs/crypto/get_v3_reference_tickers
-.. _Stocks ticker details: https://polygon.io/docs/stocks/get_v3_reference_tickers__ticker
-.. _Options ticker details: https://polygon.io/docs/options/get_v3_reference_tickers__ticker
-.. _Stocks ticker news: https://polygon.io/docs/stocks/get_v2_reference_news
-.. _Options ticker news: https://polygon.io/docs/options/get_v2_reference_news
-.. _Stocks ticker types: https://polygon.io/docs/stocks/get_v3_reference_tickers_types
-.. _Options ticker types: https://polygon.io/docs/options/get_v3_reference_tickers_types
-.. _Stocks splits: https://polygon.io/docs/stocks/get_v3_reference_splits
-.. _Stocks dividends: https://polygon.io/docs/stocks/get_v3_reference_dividends
-.. _Stocks conditions: https://polygon.io/docs/stocks/get_v3_reference_conditions
-.. _Options conditions: https://polygon.io/docs/options/get_v3_reference_conditions
-.. _Forex conditions: https://polygon.io/docs/forex/get_v3_reference_conditions
-.. _Crypto conditions: https://polygon.io/docs/crypto/get_v3_reference_conditions
-.. _Stocks exchanges: https://polygon.io/docs/stocks/get_v3_reference_exchanges
-.. _Options exchanges: https://polygon.io/docs/options/get_v3_reference_exchanges
-.. _Forex exchanges: https://polygon.io/docs/forex/get_v3_reference_exchanges
-.. _Crypto exchanges: https://polygon.io/docs/crypto/get_v3_reference_exchanges
\ No newline at end of file
+.. automethod:: massive.RESTClient.get_exchanges
+
+.. _Stocks market holidays: https://massive.com/docs/stocks/get_v1_marketstatus_upcoming
+.. _Options market holidays: https://massive.com/docs/options/get_v1_marketstatus_upcoming
+.. _Forex market holidays: https://massive.com/docs/forex/get_v1_marketstatus_upcoming
+.. _Crypto market holidays: https://massive.com/docs/crypto/get_v1_marketstatus_upcoming
+.. _Stocks market status: https://massive.com/docs/stocks/get_v1_marketstatus_now
+.. _Options market status: https://massive.com/docs/options/get_v1_marketstatus_now
+.. _Forex market status: https://massive.com/docs/forex/get_v1_marketstatus_now
+.. _Crypto market status: https://massive.com/docs/crypto/get_v1_marketstatus_now
+.. _Stocks tickers: https://massive.com/docs/stocks/get_v3_reference_tickers
+.. _Options tickers: https://massive.com/docs/options/get_v3_reference_tickers
+.. _Forex tickers: https://massive.com/docs/forex/get_v3_reference_tickers
+.. _Crypto tickers: https://massive.com/docs/crypto/get_v3_reference_tickers
+.. _Stocks ticker details: https://massive.com/docs/stocks/get_v3_reference_tickers__ticker
+.. _Options ticker details: https://massive.com/docs/options/get_v3_reference_tickers__ticker
+.. _Stocks ticker news: https://massive.com/docs/stocks/get_v2_reference_news
+.. _Options ticker news: https://massive.com/docs/options/get_v2_reference_news
+.. _Stocks ticker types: https://massive.com/docs/stocks/get_v3_reference_tickers_types
+.. _Options ticker types: https://massive.com/docs/options/get_v3_reference_tickers_types
+.. _Stocks splits: https://massive.com/docs/stocks/get_v3_reference_splits
+.. _Stocks dividends: https://massive.com/docs/stocks/get_v3_reference_dividends
+.. _Stocks conditions: https://massive.com/docs/stocks/get_v3_reference_conditions
+.. _Options conditions: https://massive.com/docs/options/get_v3_reference_conditions
+.. _Forex conditions: https://massive.com/docs/forex/get_v3_reference_conditions
+.. _Crypto conditions: https://massive.com/docs/crypto/get_v3_reference_conditions
+.. _Stocks exchanges: https://massive.com/docs/stocks/get_v3_reference_exchanges
+.. _Options exchanges: https://massive.com/docs/options/get_v3_reference_exchanges
+.. _Forex exchanges: https://massive.com/docs/forex/get_v3_reference_exchanges
+.. _Crypto exchanges: https://massive.com/docs/crypto/get_v3_reference_exchanges
\ No newline at end of file
diff --git a/docs/source/Snapshot.rst b/docs/source/Snapshot.rst
index 0214cc9d..7268e209 100644
--- a/docs/source/Snapshot.rst
+++ b/docs/source/Snapshot.rst
@@ -4,14 +4,25 @@ Snapshot
=================================
=================================
-Get all snapshots
+Get snapshots for all asset types
=================================
- `Stocks snapshot all tickers`_
+- `Options snapshot all tickers`_
- `Forex snapshot all tickers`_
- `Crypto snapshot all tickers`_
-.. automethod:: polygon.RESTClient.get_snapshot_all
+.. automethod:: massive.RESTClient.list_universal_snapshots
+
+=================================
+Get all snapshots
+=================================
+
+- `Stocks snapshot all tickers (deprecated)`_
+- `Forex snapshot all tickers (deprecated)`_
+- `Crypto snapshot all tickers (deprecated)`_
+
+.. automethod:: massive.RESTClient.get_snapshot_all
=================================
Get gainers/losers snapshot
@@ -21,7 +32,7 @@ Get gainers/losers snapshot
- `Forex snapshot gainers/losers`_
- `Crypto snapshot gainers/losers`_
-.. automethod:: polygon.RESTClient.get_snapshot_direction
+.. automethod:: massive.RESTClient.get_snapshot_direction
=================================
Get ticker snapshot
@@ -31,7 +42,7 @@ Get ticker snapshot
- `Forex snapshot ticker`_
- `Crypto snapshot ticker`_
-.. automethod:: polygon.RESTClient.get_snapshot_ticker
+.. automethod:: massive.RESTClient.get_snapshot_ticker
=================================
Get options snapshot
@@ -39,7 +50,7 @@ Get options snapshot
- `Options snapshot option contract`_
-.. automethod:: polygon.RESTClient.get_snapshot_option
+.. automethod:: massive.RESTClient.get_snapshot_option
=================================
Get crypto L2 book snapshot
@@ -47,16 +58,21 @@ Get crypto L2 book snapshot
- `Crypto snapshot ticker full book (L2)`_
-.. automethod:: polygon.RESTClient.get_snapshot_crypto_book
-
-.. _Stocks snapshot all tickers: https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers
-.. _Forex snapshot all tickers: https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers
-.. _Crypto snapshot all tickers: https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers
-.. _Stocks snapshot gainers/losers: https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks__direction
-.. _Forex snapshot gainers/losers: https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex__direction
-.. _Crypto snapshot gainers/losers: https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto__direction
-.. _Stocks snapshot ticker: https://polygon.io/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers__stocksticker
-.. _Forex snapshot ticker: https://polygon.io/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers__ticker
-.. _Crypto snapshot ticker: https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker
-.. _Options snapshot option contract: https://polygon.io/docs/options/get_v3_snapshot_options__underlyingasset___optioncontract
-.. _Crypto snapshot ticker full book (L2): https://polygon.io/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker__book
\ No newline at end of file
+.. automethod:: massive.RESTClient.get_snapshot_crypto_book
+
+.. _Stocks snapshot all tickers: https://massive.com/docs/stocks/get_v3_snapshot
+.. _Options snapshot all tickers: https://massive.com/docs/options/get_v3_snapshot
+.. _Forex snapshot all tickers: https://massive.com/docs/forex/get_v3_snapshot
+.. _Crypto snapshot all tickers:: https://massive.com/docs/crypto/get_v3_snapshot
+.. _Stocks snapshot all tickers (deprecated): https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers
+.. _Options snapshot all tickers (deprecated): https://massive.com/docs/options/get_v2_snapshot_locale_us_markets_stocks_tickers
+.. _Forex snapshot all tickers (deprecated): https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers
+.. _Crypto snapshot all tickers (deprecated):: https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers
+.. _Stocks snapshot gainers/losers: https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks__direction
+.. _Forex snapshot gainers/losers: https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex__direction
+.. _Crypto snapshot gainers/losers: https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto__direction
+.. _Stocks snapshot ticker: https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers__stocksticker
+.. _Forex snapshot ticker: https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers__ticker
+.. _Crypto snapshot ticker: https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker
+.. _Options snapshot option contract: https://massive.com/docs/options/get_v3_snapshot_options__underlyingasset___optioncontract
+.. _Crypto snapshot ticker full book (L2): https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker__book
\ No newline at end of file
diff --git a/docs/source/Trades.rst b/docs/source/Trades.rst
index 5d6e6992..817b97a3 100644
--- a/docs/source/Trades.rst
+++ b/docs/source/Trades.rst
@@ -11,7 +11,7 @@ List trades
- `Options trades`_
- `Crypto trades`_
-.. automethod:: polygon.RESTClient.list_trades
+.. automethod:: massive.RESTClient.list_trades
==================================================================
Get last trade
@@ -20,7 +20,7 @@ Get last trade
- `Stocks last trade`_
- `Options last trade`_
-.. automethod:: polygon.RESTClient.get_last_trade
+.. automethod:: massive.RESTClient.get_last_trade
==================================================================
Get last crypto trade
@@ -28,11 +28,11 @@ Get last crypto trade
- `Crypto last trade for crypto pair`_
-.. automethod:: polygon.RESTClient.get_last_crypto_trade
+.. automethod:: massive.RESTClient.get_last_crypto_trade
-.. _Stocks trades: https://polygon.io/docs/stocks/get_v3_trades__stockticker
-.. _Options trades: https://polygon.io/docs/options/get_v3_trades__optionsticker
-.. _Crypto trades: https://polygon.io/docs/crypto/get_v3_trades__cryptoticker
-.. _Stocks last trade: https://polygon.io/docs/stocks/get_v2_last_trade__stocksticker
-.. _Options last trade: https://polygon.io/docs/options/get_v2_last_trade__optionsticker
-.. _Crypto last trade for crypto pair: https://polygon.io/docs/crypto/get_v1_last_crypto__from___to
\ No newline at end of file
+.. _Stocks trades: https://massive.com/docs/stocks/get_v3_trades__stockticker
+.. _Options trades: https://massive.com/docs/options/get_v3_trades__optionsticker
+.. _Crypto trades: https://massive.com/docs/crypto/get_v3_trades__cryptoticker
+.. _Stocks last trade: https://massive.com/docs/stocks/get_v2_last_trade__stocksticker
+.. _Options last trade: https://massive.com/docs/options/get_v2_last_trade__optionsticker
+.. _Crypto last trade for crypto pair: https://massive.com/docs/crypto/get_v1_last_crypto__from___to
\ No newline at end of file
diff --git a/docs/source/WebSocket-Enums.rst b/docs/source/WebSocket-Enums.rst
index dc2fd199..7e4b5f93 100644
--- a/docs/source/WebSocket-Enums.rst
+++ b/docs/source/WebSocket-Enums.rst
@@ -6,20 +6,20 @@ WebSocket Enums
==============================================================
Feed
==============================================================
-.. autoclass:: polygon.websocket.models.Feed
+.. autoclass:: massive.websocket.models.Feed
:members:
:undoc-members:
==============================================================
Market
==============================================================
-.. autoclass:: polygon.websocket.models.Market
+.. autoclass:: massive.websocket.models.Market
:members:
:undoc-members:
==============================================================
EventType
==============================================================
-.. autoclass:: polygon.websocket.models.EventType
+.. autoclass:: massive.websocket.models.EventType
:members:
:undoc-members:
\ No newline at end of file
diff --git a/docs/source/WebSocket.rst b/docs/source/WebSocket.rst
index 5f508122..c624d9d2 100644
--- a/docs/source/WebSocket.rst
+++ b/docs/source/WebSocket.rst
@@ -11,35 +11,35 @@ WebSocket
===========
Init client
===========
-.. automethod:: polygon.WebSocketClient.__init__
+.. automethod:: massive.WebSocketClient.__init__
:noindex:
============================
Connect
============================
-.. automethod:: polygon.WebSocketClient.connect
+.. automethod:: massive.WebSocketClient.connect
============================
Run
============================
-.. automethod:: polygon.WebSocketClient.run
+.. automethod:: massive.WebSocketClient.run
============================
Subscribe
============================
-.. automethod:: polygon.WebSocketClient.subscribe
+.. automethod:: massive.WebSocketClient.subscribe
============================
Unsubscribe
============================
-.. automethod:: polygon.WebSocketClient.unsubscribe
+.. automethod:: massive.WebSocketClient.unsubscribe
============================
Close
============================
-.. automethod:: polygon.WebSocketClient.close
+.. automethod:: massive.WebSocketClient.close
-.. _Stocks getting started: https://polygon.io/docs/stocks/ws_getting-started
-.. _Options getting started: https://polygon.io/docs/options/ws_getting-started
-.. _Forex getting started: https://polygon.io/docs/forex/ws_getting-started
-.. _Crypto getting started: https://polygon.io/docs/crypto/ws_getting-started
\ No newline at end of file
+.. _Stocks getting started: https://massive.com/docs/stocks/ws_getting-started
+.. _Options getting started: https://massive.com/docs/options/ws_getting-started
+.. _Forex getting started: https://massive.com/docs/forex/ws_getting-started
+.. _Crypto getting started: https://massive.com/docs/crypto/ws_getting-started
\ No newline at end of file
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 235ee004..4ebf65d2 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -14,13 +14,13 @@
import sys
sys.path.insert(0, os.path.abspath('../..'))
print('docs path', sys.path[0])
-os.environ['POLYGON_API_KEY'] = 'POLYGON_API_KEY'
+os.environ['MASSIVE_API_KEY'] = 'MASSIVE_API_KEY'
# -- Project information -----------------------------------------------------
-project = 'polygon-api-client'
-copyright = '2022, Polygon.io'
-author = 'Polygon.io'
+project = 'massive-api-client'
+copyright = '2022, Massive.com'
+author = 'Massive.com'
# The full version, including alpha/beta/rc tags
release = '0.3.0'
diff --git a/docs/source/index.rst b/docs/source/index.rst
index b445b803..7bb2b316 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -1,7 +1,7 @@
-Welcome to polygon-api-client's documentation!
+Welcome to massive-api-client's documentation!
==============================================
-This documentation is for the Python client only. For details about the responses see `the official docs `_.
+This documentation is for the Python client only. For details about the responses see `the official docs `_.
.. toctree::
:maxdepth: 1
diff --git a/docs/source/vX.rst b/docs/source/vX.rst
index 69a25311..f6a9125b 100644
--- a/docs/source/vX.rst
+++ b/docs/source/vX.rst
@@ -14,6 +14,6 @@ List stock financials
- `Stocks financials vX`_
-.. automethod:: polygon.rest.VXClient.list_stock_financials
+.. automethod:: massive.rest.VXClient.list_stock_financials
-.. _Stocks financials vX: https://polygon.io/docs/stocks/get_vx_reference_financials
+.. _Stocks financials vX: https://massive.com/docs/stocks/get_vx_reference_financials
diff --git a/examples/launchpad/README.md b/examples/launchpad/README.md
new file mode 100644
index 00000000..5a0c3bd3
--- /dev/null
+++ b/examples/launchpad/README.md
@@ -0,0 +1,49 @@
+# Launchpad
+
+Users of the Launchpad product will need to pass in certain headers in order to make API requests.
+
+ ```python
+
+# import RESTClient
+from massive import RESTClient
+from massive.rest.models.request import RequestOptionBuilder
+
+# create client
+c = RESTClient(api_key="API_KEY")
+
+# create request options
+options = RequestOptionBuilder().edge_headers(
+ edge_id="YOUR_EDGE_ID", # required
+ edge_ip_address="IP_ADDRESS", # required
+)
+# get response
+res = c.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04", options=options)
+
+# do something with response
+
+ ```
+Launchpad users can also provide the optional User Agent value describing their Edge User's origination request.
+
+ ```python
+
+# import RESTClient
+from massive import RESTClient
+from massive.rest.models.request import RequestOptionBuilder
+
+# create client
+c = RESTClient(api_key="API_KEY")
+
+# create request options
+options = RequestOptionBuilder().edge_headers(
+ edge_id="YOUR_EDGE_ID", # required
+ edge_ip_address="IP_ADDRESS" # required
+).update_edge_header(
+ edge_user="EDGE_USER" # optional
+ )
+
+# get response
+res = c.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04", options=options)
+
+# do something with response
+
+ ```
\ No newline at end of file
diff --git a/examples/launchpad/launchpad.py b/examples/launchpad/launchpad.py
new file mode 100644
index 00000000..6bd2306c
--- /dev/null
+++ b/examples/launchpad/launchpad.py
@@ -0,0 +1,31 @@
+from massive import RESTClient
+from massive.rest.models.request import RequestOptionBuilder
+
+
+def get_list_trades_launchpad():
+ client = RESTClient()
+
+ """
+ set headers example:
+ options = RequestOptionBuilder()
+ .edge_headers(edge_id="EDGE_ID", edge_ip_address="EDGE_ID_ADDRESS", edge_user="EDGE_USER")
+
+ update headers example:
+ options = options.update_edge_header(edge_ip_address="NEW_IP")
+ """
+ options = RequestOptionBuilder().edge_headers(
+ edge_id="EDGE_ID", edge_ip_address="EDGE_ID_ADDRESS", edge_user="EDGE_USER"
+ )
+
+ trades = []
+ for t in client.list_trades("AAA", "2022-04-04", limit=5, options=options):
+ trades.append(t)
+ print(trades)
+
+
+def main():
+ get_list_trades_launchpad()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/examples/rest/bulk_aggs_downloader.py b/examples/rest/bulk_aggs_downloader.py
new file mode 100644
index 00000000..89df0765
--- /dev/null
+++ b/examples/rest/bulk_aggs_downloader.py
@@ -0,0 +1,97 @@
+import datetime
+import concurrent.futures
+import logging
+from massive import RESTClient
+import signal
+import sys
+import pickle
+import lz4.frame # type: ignore
+
+"""
+This script performs the following tasks:
+
+1. Downloads aggregated market data (referred to as 'aggs') for specific stock symbols using the Massive API.
+2. Handles data for multiple dates and performs these operations in parallel to improve efficiency.
+3. Saves the downloaded data in a compressed format (LZ4) using Python's pickle serialization.
+4. Utilizes logging to track its progress and any potential errors.
+5. Designed to be interruptible: listens for a Ctrl+C keyboard interrupt and exits gracefully when detected.
+
+Usage:
+1. pip install lz4
+2. Set your Massive API key in the environment variable 'MASSIVE_API_KEY'.
+3. Specify the date range and stock symbols you are interested in within the script.
+4. Run the script.
+
+The script will create compressed '.pickle.lz4' files containing the aggs for each specified stock symbol and date.
+
+Note: This script is designed to be compatible with a data reader script, such as 'bulk_aggs_reader.py'.
+"""
+
+# Set up logging
+logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(message)s")
+
+
+def signal_handler(sig, frame):
+ print("You pressed Ctrl+C!")
+ sys.exit(0)
+
+
+signal.signal(signal.SIGINT, signal_handler)
+
+
+def get_aggs_for_symbol_and_date(symbol_date_pair):
+ """Retrieve aggs for a given symbol and date"""
+ symbol, date = symbol_date_pair
+ aggs = []
+ client = RESTClient(trace=True) # Uses MASSIVE_API_KEY environment variable
+
+ for a in client.list_aggs(
+ symbol,
+ 1,
+ "minute",
+ date,
+ date,
+ limit=50000,
+ ):
+ aggs.append(a)
+
+ print(len(aggs))
+
+ filename = f"{symbol}-aggs-{date}.pickle.lz4"
+ with open(filename, "wb") as file:
+ try:
+ compressed_data = lz4.frame.compress(pickle.dumps(aggs))
+ file.write(compressed_data)
+ except TypeError as e:
+ print(f"Serialization Error: {e}")
+
+ logging.info(f"Downloaded aggs for {date} and saved to {filename}")
+
+
+def weekdays_between(start_date, end_date):
+ """Generate all weekdays between start_date and end_date"""
+ day = start_date
+ while day <= end_date:
+ if day.weekday() < 5: # 0-4 denotes Monday to Friday
+ yield day
+ day += datetime.timedelta(days=1)
+
+
+def main():
+ start_date = datetime.date(2023, 8, 1)
+ end_date = datetime.date(2023, 8, 31)
+
+ symbols = ["TSLA", "AAPL", "HCP", "GOOG"] # The array of symbols you want
+
+ dates = list(weekdays_between(start_date, end_date))
+
+ # Generate a list of (symbol, date) pairs
+ symbol_date_pairs = [(symbol, date) for symbol in symbols for date in dates]
+
+ # Use ThreadPoolExecutor to download data in parallel
+ with concurrent.futures.ThreadPoolExecutor(max_workers=50) as executor:
+ executor.map(get_aggs_for_symbol_and_date, symbol_date_pairs)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/examples/rest/bulk_aggs_reader.py b/examples/rest/bulk_aggs_reader.py
new file mode 100644
index 00000000..fcc91915
--- /dev/null
+++ b/examples/rest/bulk_aggs_reader.py
@@ -0,0 +1,57 @@
+import lz4.frame # type: ignore
+import pickle
+import datetime
+
+"""
+This script performs the following tasks:
+
+1. Reads aggregated market data ('aggs') for a specific stock symbol for multiple dates.
+2. Data is read from compressed (LZ4) and pickled files, which should have been generated by a separate data downloading script.
+3. Displays the read data to the console.
+4. Handles exceptions gracefully: informs the user if a file for a specific date was not found or if any other error occurred.
+
+Usage:
+1. pip install lz4
+2. Ensure that the compressed '.pickle.lz4' files for the specified stock symbol and date range exist in the same directory as this script.
+3. Modify the date range and stock symbol in the script as per your requirements.
+4. Run the script.
+
+The script will read and display the market data for each specified date and stock symbol.
+
+Note: This script is designed to be compatible with files generated by a data downloading script, such as 'bulk_aggs_downloader.py'.
+"""
+
+
+def read_trades_for_date(symbol, date):
+ """Reads trades for a given symbol and date, then prints them."""
+
+ # Construct the filename, similar to your writer script
+ filename = f"{symbol}-aggs-{date}.pickle.lz4"
+
+ try:
+ with open(filename, "rb") as file:
+ compressed_data = file.read()
+ trades = pickle.loads(lz4.frame.decompress(compressed_data))
+ print(trades)
+ return trades
+ except FileNotFoundError:
+ print(f"No file found for {date}")
+ except Exception as e:
+ print(f"An error occurred: {e}")
+
+
+def main():
+ start_date = datetime.date(2023, 8, 1)
+ end_date = datetime.date(2023, 8, 31)
+ symbol = "HCP"
+
+ # Loop through each weekday between the start and end dates and read the trades
+ day = start_date
+ while day <= end_date:
+ if day.weekday() < 5: # 0-4 denotes Monday to Friday
+ read_trades_for_date(symbol, day)
+ day += datetime.timedelta(days=1)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/examples/rest/crypto-aggregates_bars.py b/examples/rest/crypto-aggregates_bars.py
new file mode 100644
index 00000000..443ce21d
--- /dev/null
+++ b/examples/rest/crypto-aggregates_bars.py
@@ -0,0 +1,30 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs
+
+# API key injected below for easy use. If not provided, the script will attempt
+# to use the environment variable "MASSIVE_API_KEY".
+#
+# setx MASSIVE_API_KEY "" <- windows
+# export MASSIVE_API_KEY="" <- mac/linux
+#
+# Note: To persist the environment variable you need to add the above command
+# to the shell startup script (e.g. .bashrc or .bash_profile.
+#
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "X:BTCUSD",
+ 1,
+ "day",
+ "2023-01-30",
+ "2023-02-03",
+ limit=50000,
+):
+ aggs.append(a)
+
+print(aggs)
diff --git a/examples/rest/crypto-conditions.py b/examples/rest/crypto-conditions.py
new file mode 100644
index 00000000..339d53f0
--- /dev/null
+++ b/examples/rest/crypto-conditions.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v3_reference_conditions
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+conditions = []
+for c in client.list_conditions("crypto", limit=1000):
+ conditions.append(c)
+print(conditions)
diff --git a/examples/rest/crypto-daily_open_close.py b/examples/rest/crypto-daily_open_close.py
new file mode 100644
index 00000000..5c29db0c
--- /dev/null
+++ b/examples/rest/crypto-daily_open_close.py
@@ -0,0 +1,16 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v1_open-close_crypto__from___to___date
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# make request
+request = client.get_daily_open_close_agg(
+ "X:BTCUSD",
+ "2023-01-09",
+)
+
+print(request)
diff --git a/examples/rest/crypto-exchanges.py b/examples/rest/crypto-exchanges.py
new file mode 100644
index 00000000..8a592d55
--- /dev/null
+++ b/examples/rest/crypto-exchanges.py
@@ -0,0 +1,25 @@
+from massive import RESTClient
+from massive.rest.models import (
+ Exchange,
+)
+
+# docs
+# https://massive.com/docs/crypto/get_v3_reference_exchanges
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+exchanges = client.get_exchanges("crypto")
+print(exchanges)
+
+# loop over exchanges
+for exchange in exchanges:
+ # verify this is an exchange
+ if isinstance(exchange, Exchange):
+ # print exchange info
+ print(
+ "{:<15}{} ({})".format(
+ exchange.asset_class, exchange.name, exchange.operating_mic
+ )
+ )
diff --git a/examples/rest/crypto-grouped_daily_bars.py b/examples/rest/crypto-grouped_daily_bars.py
new file mode 100644
index 00000000..4ebd3d36
--- /dev/null
+++ b/examples/rest/crypto-grouped_daily_bars.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+import pprint
+
+# docs
+# https://massive.com/docs/crypto/get_v2_aggs_grouped_locale_global_market_crypto__date
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+grouped = client.get_grouped_daily_aggs(
+ "2023-01-09", locale="global", market_type="crypto"
+)
+
+# print(grouped)
+
+# pprint (short for "pretty-print") is a module that provides a more human-
+# readable output format for data structures.
+pp = pprint.PrettyPrinter(indent=2)
+pp.pprint(grouped)
diff --git a/examples/rest/crypto-last_trade_for_a_crypto_pair.py b/examples/rest/crypto-last_trade_for_a_crypto_pair.py
new file mode 100644
index 00000000..ef75efaa
--- /dev/null
+++ b/examples/rest/crypto-last_trade_for_a_crypto_pair.py
@@ -0,0 +1,12 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v1_last_crypto__from___to
+# https://massive-api-client.readthedocs.io/en/latest/Trades.html#get-last-crypto-trade
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+trade = client.get_last_crypto_trade("BTC", "USD")
+
+print(trade)
diff --git a/examples/rest/crypto-market_holidays.py b/examples/rest/crypto-market_holidays.py
new file mode 100644
index 00000000..740bbc71
--- /dev/null
+++ b/examples/rest/crypto-market_holidays.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+from massive.rest.models import (
+ MarketHoliday,
+)
+
+# docs
+# https://massive.com/docs/crypto/get_v1_marketstatus_upcoming
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+holidays = client.get_market_holidays()
+# print(holidays)
+
+# print date, name, and exchange
+for holiday in holidays:
+ # verify this is an exchange
+ if isinstance(holiday, MarketHoliday):
+ print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange))
diff --git a/examples/rest/crypto-market_status.py b/examples/rest/crypto-market_status.py
new file mode 100644
index 00000000..d58d6180
--- /dev/null
+++ b/examples/rest/crypto-market_status.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v1_marketstatus_now
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+result = client.get_market_status()
+print(result)
diff --git a/examples/rest/crypto-previous_close.py b/examples/rest/crypto-previous_close.py
new file mode 100644
index 00000000..b4fd4cea
--- /dev/null
+++ b/examples/rest/crypto-previous_close.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v2_aggs_ticker__cryptoticker__prev
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = client.get_previous_close_agg(
+ "X:BTCUSD",
+)
+
+print(aggs)
diff --git a/examples/rest/crypto-snapshots_all_tickers.py b/examples/rest/crypto-snapshots_all_tickers.py
new file mode 100644
index 00000000..5c5c8e70
--- /dev/null
+++ b/examples/rest/crypto-snapshots_all_tickers.py
@@ -0,0 +1,41 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerSnapshot,
+ Agg,
+)
+
+# docs
+# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+snapshot = client.get_snapshot_all("crypto") # all tickers
+
+# print raw values
+print(snapshot)
+
+# crunch some numbers
+for item in snapshot:
+ # verify this is an TickerSnapshot
+ if isinstance(item, TickerSnapshot):
+ # verify this is an Agg
+ if isinstance(item.prev_day, Agg):
+ # verify this is a float
+ if isinstance(item.prev_day.open, float) and isinstance(
+ item.prev_day.close, float
+ ):
+ percent_change = (
+ (item.prev_day.close - item.prev_day.open)
+ / item.prev_day.open
+ * 100
+ )
+ print(
+ "{:<15}{:<15}{:<15}{:.2f} %".format(
+ item.ticker,
+ item.prev_day.open,
+ item.prev_day.close,
+ percent_change,
+ )
+ )
diff --git a/examples/rest/crypto-snapshots_gainers_losers.py b/examples/rest/crypto-snapshots_gainers_losers.py
new file mode 100644
index 00000000..5ced0e6d
--- /dev/null
+++ b/examples/rest/crypto-snapshots_gainers_losers.py
@@ -0,0 +1,37 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerSnapshot,
+)
+
+# docs
+# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto__direction
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# get gainers
+gainers = client.get_snapshot_direction("crypto", "gainers")
+# print(gainers)
+
+# print ticker with % change
+for gainer in gainers:
+ # verify this is a TickerSnapshot
+ if isinstance(gainer, TickerSnapshot):
+ # verify this is a float
+ if isinstance(gainer.todays_change_percent, float):
+ print("{:<15}{:.2f} %".format(gainer.ticker, gainer.todays_change_percent))
+
+print()
+
+# get losers
+losers = client.get_snapshot_direction("crypto", "losers")
+# print(losers)
+
+# print ticker with % change
+for loser in losers:
+ # verify this is a TickerSnapshot
+ if isinstance(loser, TickerSnapshot):
+ # verify this is a float
+ if isinstance(loser.todays_change_percent, float):
+ print("{:<15}{:.2f} %".format(loser.ticker, loser.todays_change_percent))
diff --git a/examples/rest/crypto-snapshots_ticker.py b/examples/rest/crypto-snapshots_ticker.py
new file mode 100644
index 00000000..36e639d2
--- /dev/null
+++ b/examples/rest/crypto-snapshots_ticker.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ticker = client.get_snapshot_ticker("crypto", "X:BTCUSD")
+print(ticker)
diff --git a/examples/rest/crypto-snapshots_ticker_full_book_l2.py b/examples/rest/crypto-snapshots_ticker_full_book_l2.py
new file mode 100644
index 00000000..b8b9157c
--- /dev/null
+++ b/examples/rest/crypto-snapshots_ticker_full_book_l2.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v2_snapshot_locale_global_markets_crypto_tickers__ticker__book
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-crypto-l2-book-snapshot
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+snapshot = client.get_snapshot_crypto_book("X:BTCUSD")
+
+# print raw values
+print(snapshot)
diff --git a/examples/rest/crypto-technical_indicators_ema.py b/examples/rest/crypto-technical_indicators_ema.py
new file mode 100644
index 00000000..1eb50c20
--- /dev/null
+++ b/examples/rest/crypto-technical_indicators_ema.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v1_indicators_ema__cryptoticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ema = client.get_ema(
+ ticker="X:BTCUSD",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(ema)
diff --git a/examples/rest/crypto-technical_indicators_macd.py b/examples/rest/crypto-technical_indicators_macd.py
new file mode 100644
index 00000000..17c25bb7
--- /dev/null
+++ b/examples/rest/crypto-technical_indicators_macd.py
@@ -0,0 +1,19 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v1_indicators_macd__cryptoticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+macd = client.get_macd(
+ ticker="X:BTCUSD",
+ timespan="day",
+ short_window=12,
+ long_window=26,
+ signal_window=9,
+ series_type="close",
+)
+
+print(macd)
diff --git a/examples/rest/crypto-technical_indicators_rsi.py b/examples/rest/crypto-technical_indicators_rsi.py
new file mode 100644
index 00000000..d490d879
--- /dev/null
+++ b/examples/rest/crypto-technical_indicators_rsi.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v1_indicators_rsi__cryptoticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+rsi = client.get_rsi(
+ ticker="X:BTCUSD",
+ timespan="day",
+ window=14,
+ series_type="close",
+)
+
+print(rsi)
diff --git a/examples/rest/crypto-technical_indicators_sma.py b/examples/rest/crypto-technical_indicators_sma.py
new file mode 100644
index 00000000..255291c0
--- /dev/null
+++ b/examples/rest/crypto-technical_indicators_sma.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v1_indicators_sma__cryptoticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+sma = client.get_sma(
+ ticker="X:BTCUSD",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(sma)
diff --git a/examples/rest/crypto-tickers.py b/examples/rest/crypto-tickers.py
new file mode 100644
index 00000000..9052e487
--- /dev/null
+++ b/examples/rest/crypto-tickers.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v3_reference_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+tickers = []
+for t in client.list_tickers(market="crypto", limit=1000):
+ tickers.append(t)
+print(tickers)
diff --git a/examples/rest/crypto-trades.py b/examples/rest/crypto-trades.py
new file mode 100644
index 00000000..d76182af
--- /dev/null
+++ b/examples/rest/crypto-trades.py
@@ -0,0 +1,15 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/crypto/get_v3_trades__cryptoticker
+# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+trades = []
+for t in client.list_trades("X:BTC-USD", "2023-02-01", limit=50000):
+ trades.append(t)
+
+# prints each trade that took place
+print(trades)
diff --git a/examples/rest/custom-json-get.py b/examples/rest/custom-json-get.py
new file mode 100644
index 00000000..5ea5c400
--- /dev/null
+++ b/examples/rest/custom-json-get.py
@@ -0,0 +1,9 @@
+from massive import RESTClient
+
+# type: ignore
+import orjson
+
+client = RESTClient(custom_json=orjson)
+
+aggs = client.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04")
+print(aggs)
diff --git a/examples/rest/demo_correlation_matrix.py b/examples/rest/demo_correlation_matrix.py
new file mode 100644
index 00000000..f3ae4298
--- /dev/null
+++ b/examples/rest/demo_correlation_matrix.py
@@ -0,0 +1,140 @@
+"""
+This script computes and visualizes the correlation matrix of a selected set of
+stocks using Massive's API. This script is for educational purposes only and is
+not intended to provide investment advice. The examples provided analyze the
+correlation between different stocks from diverse sectors, as well as within
+specific sectors.
+
+Blog: https://massive.com/blog/finding-correlation-between-stocks/
+Video: https://www.youtube.com/watch?v=q0TgaUGWPFc
+
+Before running this script, there are 4 prerequisites:
+
+1) Dependencies: Ensure that the following Python libraries are installed in
+ your environment:
+ - pandas
+ - numpy
+ - seaborn
+ - matplotlib.pyplot
+ - massive's python-client library
+
+ You can likely run:
+ pip install pandas numpy seaborn matplotlib massive-api-client
+
+2) API Key: You will need a Massive API key to fetch the stock data. This can
+ be set manually in the script below, or you can set an environment variable
+ 'MASSIVE_API_KEY'.
+
+ setx MASSIVE_API_KEY "" <- windows
+ export MASSIVE_API_KEY="" <- mac/linux
+
+3) Select Stocks: You need to select the stocks you're interested in analyzing.
+ Update the 'symbols' variable in this script with your chosen stock symbols.
+
+4) Select Date Range: You need to specify the date range for the historical
+ data that you want to fetch. Update the 'start_date' and 'end_date'
+ variables in this script accordingly.
+
+Understanding stock correlation is important when building a diverse portfolio,
+as it can help manage risk and inform investment strategies. It's always
+essential to do your own research or consult a financial advisor for
+personalized advice when investing.
+"""
+
+import pandas as pd # type: ignore
+import numpy as np # type: ignore
+import seaborn as sns # type: ignore
+import matplotlib.pyplot as plt # type: ignore
+from massive import RESTClient
+
+# Less likely to be correlated due to being in different sectors and are
+# exposed to different market forces, economic trends, and price risks.
+# symbols = ["TSLA", "PFE", "XOM", "HD", "JPM", "AAPL", "KO", "UNH", "LMT", "AMZN"]
+
+# Here we have two groups, one with 5 technology stocks and another with 5 oil
+# stocks. These two groups are likely to be highly correlated within their
+# respective sectors but are expected to be less correlated between sectors.
+# symbols = ["AAPL", "MSFT", "GOOG", "ADBE", "CRM", "XOM", "CVX", "COP", "PSX", "OXY"]
+
+# Likely to be highly correlated due to being in the technology sector,
+# specifically in the sub-industry of Semiconductors:
+symbols = ["INTC", "AMD", "NVDA", "TXN", "QCOM", "MU", "AVGO", "ADI", "MCHP", "NXPI"]
+
+# Date range you are interested in
+start_date = "2022-04-01"
+end_date = "2023-05-10"
+
+
+def fetch_stock_data(symbols, start_date, end_date):
+ stocks = []
+
+ # client = RESTClient("XXXXXX") # hardcoded api_key is used
+ client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ try:
+ for symbol in symbols:
+ aggs = client.get_aggs(
+ symbol,
+ 1,
+ "day",
+ start_date,
+ end_date,
+ )
+ df = pd.DataFrame(aggs, columns=["timestamp", "close"])
+
+ # Filter out rows with invalid timestamps
+ df = df[df["timestamp"] > 0]
+
+ df["timestamp"] = pd.to_datetime(df["timestamp"], unit="ms")
+ df.set_index("timestamp", inplace=True)
+
+ df.rename(columns={"close": symbol}, inplace=True)
+ stocks.append(df)
+ finally:
+ pass
+
+ merged_stocks = pd.concat(stocks, axis=1)
+ return merged_stocks
+
+
+def calculate_daily_returns(stock_data):
+ daily_returns = stock_data.pct_change().dropna()
+ return daily_returns
+
+
+def compute_correlation_matrix(daily_returns):
+ correlation_matrix = daily_returns.corr()
+ return correlation_matrix
+
+
+def plot_correlation_heatmap(correlation_matrix):
+ plt.figure(figsize=(8, 8))
+ ax = sns.heatmap(
+ correlation_matrix,
+ annot=True,
+ cmap="coolwarm",
+ vmin=-1,
+ vmax=1,
+ square=True,
+ linewidths=0.5,
+ cbar_kws={"shrink": 0.8},
+ )
+ ax.xaxis.tick_top()
+ ax.xaxis.set_label_position("top")
+ plt.title("Correlation Matrix Heatmap", y=1.08)
+ plt.show()
+
+
+def main():
+ stock_data = fetch_stock_data(symbols, start_date, end_date)
+ daily_returns = calculate_daily_returns(stock_data)
+ correlation_matrix = compute_correlation_matrix(daily_returns)
+
+ print("Correlation Matrix:")
+ print(correlation_matrix)
+
+ plot_correlation_heatmap(correlation_matrix)
+
+
+if __name__ == "__main__":
+ main()
diff --git a/examples/rest/economy-treasury_yields.py b/examples/rest/economy-treasury_yields.py
new file mode 100644
index 00000000..fe4d79f7
--- /dev/null
+++ b/examples/rest/economy-treasury_yields.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/rest/economy/treasury-yields
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+yields = []
+for date in client.list_treasury_yields():
+ yields.append(date)
+
+print(yields)
diff --git a/examples/rest/financials.py b/examples/rest/financials.py
index ecf67e56..4dc21668 100644
--- a/examples/rest/financials.py
+++ b/examples/rest/financials.py
@@ -1,11 +1,11 @@
-from polygon import RESTClient
+from massive import RESTClient
client = RESTClient()
financials = client.get_ticker_details("NFLX")
print(financials)
-for (i, n) in enumerate(client.list_ticker_news("INTC", limit=5)):
+for i, n in enumerate(client.list_ticker_news("INTC", limit=5)):
print(i, n)
if i == 5:
break
diff --git a/examples/rest/forex-aggregates_bars.py b/examples/rest/forex-aggregates_bars.py
new file mode 100644
index 00000000..7e9c770f
--- /dev/null
+++ b/examples/rest/forex-aggregates_bars.py
@@ -0,0 +1,30 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs
+
+# API key injected below for easy use. If not provided, the script will attempt
+# to use the environment variable "MASSIVE_API_KEY".
+#
+# setx MASSIVE_API_KEY "" <- windows
+# export MASSIVE_API_KEY="" <- mac/linux
+#
+# Note: To persist the environment variable you need to add the above command
+# to the shell startup script (e.g. .bashrc or .bash_profile.
+#
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "C:EURUSD",
+ 1,
+ "day",
+ "2023-01-30",
+ "2023-02-03",
+ limit=50000,
+):
+ aggs.append(a)
+
+print(aggs)
diff --git a/examples/rest/forex-conditions.py b/examples/rest/forex-conditions.py
new file mode 100644
index 00000000..9fed0838
--- /dev/null
+++ b/examples/rest/forex-conditions.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v3_reference_conditions
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+conditions = []
+for c in client.list_conditions("fx", limit=1000):
+ conditions.append(c)
+print(conditions)
diff --git a/examples/rest/forex-exchanges.py b/examples/rest/forex-exchanges.py
new file mode 100644
index 00000000..a816a053
--- /dev/null
+++ b/examples/rest/forex-exchanges.py
@@ -0,0 +1,25 @@
+from massive import RESTClient
+from massive.rest.models import (
+ Exchange,
+)
+
+# docs
+# https://massive.com/docs/options/get_v3_reference_exchanges
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+exchanges = client.get_exchanges("fx")
+print(exchanges)
+
+# loop over exchanges
+for exchange in exchanges:
+ # verify this is an exchange
+ if isinstance(exchange, Exchange):
+ # print exchange info
+ print(
+ "{:<15}{} ({})".format(
+ exchange.asset_class, exchange.name, exchange.operating_mic
+ )
+ )
diff --git a/examples/rest/forex-grouped_daily_bars.py b/examples/rest/forex-grouped_daily_bars.py
new file mode 100644
index 00000000..452faa4b
--- /dev/null
+++ b/examples/rest/forex-grouped_daily_bars.py
@@ -0,0 +1,22 @@
+from massive import RESTClient
+import pprint
+
+# docs
+# https://massive.com/docs/forex/get_v2_aggs_grouped_locale_global_market_fx__date
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+grouped = client.get_grouped_daily_aggs(
+ "2023-03-27",
+ locale="global",
+ market_type="fx",
+)
+
+# print(grouped)
+
+# pprint (short for "pretty-print") is a module that provides a more human-
+# readable output format for data structures.
+pp = pprint.PrettyPrinter(indent=2)
+pp.pprint(grouped)
diff --git a/examples/rest/forex-last_quote_for_a_currency_pair.py b/examples/rest/forex-last_quote_for_a_currency_pair.py
new file mode 100644
index 00000000..bf349732
--- /dev/null
+++ b/examples/rest/forex-last_quote_for_a_currency_pair.py
@@ -0,0 +1,15 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v1_last_quote_currencies__from___to
+# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#get-last-forex-quote
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+quote = client.get_last_forex_quote(
+ "AUD",
+ "USD",
+)
+
+print(quote)
diff --git a/examples/rest/forex-market_holidays.py b/examples/rest/forex-market_holidays.py
new file mode 100644
index 00000000..df3b8bb4
--- /dev/null
+++ b/examples/rest/forex-market_holidays.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+from massive.rest.models import (
+ MarketHoliday,
+)
+
+# docs
+# https://massive.com/docs/forex/get_v1_marketstatus_upcoming
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+holidays = client.get_market_holidays()
+# print(holidays)
+
+# print date, name, and exchange
+for holiday in holidays:
+ # verify this is an exchange
+ if isinstance(holiday, MarketHoliday):
+ print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange))
diff --git a/examples/rest/forex-market_status.py b/examples/rest/forex-market_status.py
new file mode 100644
index 00000000..f5d6a451
--- /dev/null
+++ b/examples/rest/forex-market_status.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v1_marketstatus_now
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+result = client.get_market_status()
+print(result)
diff --git a/examples/rest/forex-previous_close.py b/examples/rest/forex-previous_close.py
new file mode 100644
index 00000000..e6896afe
--- /dev/null
+++ b/examples/rest/forex-previous_close.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v2_aggs_ticker__forexticker__prev
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = client.get_previous_close_agg(
+ "C:EURUSD",
+)
+
+print(aggs)
diff --git a/examples/rest/forex-quotes.py b/examples/rest/forex-quotes.py
new file mode 100644
index 00000000..36e8a7de
--- /dev/null
+++ b/examples/rest/forex-quotes.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v3_quotes__fxticker
+# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+quotes = []
+for t in client.list_quotes("C:EUR-USD", "2023-02-01", limit=50000):
+ quotes.append(t)
+print(quotes)
diff --git a/examples/rest/forex-real-time_currency_conversion.py b/examples/rest/forex-real-time_currency_conversion.py
new file mode 100644
index 00000000..77590dac
--- /dev/null
+++ b/examples/rest/forex-real-time_currency_conversion.py
@@ -0,0 +1,15 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v1_conversion__from___to
+# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#get-real-time-currency-conversion
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+rate = client.get_real_time_currency_conversion(
+ "AUD",
+ "USD",
+)
+
+print(rate)
diff --git a/examples/rest/forex-snapshots_all_tickers.py b/examples/rest/forex-snapshots_all_tickers.py
new file mode 100644
index 00000000..b61f5eda
--- /dev/null
+++ b/examples/rest/forex-snapshots_all_tickers.py
@@ -0,0 +1,41 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerSnapshot,
+ Agg,
+)
+
+# docs
+# https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+snapshot = client.get_snapshot_all("forex") # all tickers
+
+# print raw values
+print(snapshot)
+
+# crunch some numbers
+for item in snapshot:
+ # verify this is an TickerSnapshot
+ if isinstance(item, TickerSnapshot):
+ # verify this is an Agg
+ if isinstance(item.prev_day, Agg):
+ # verify this is a float
+ if isinstance(item.prev_day.open, float) and isinstance(
+ item.prev_day.close, float
+ ):
+ percent_change = (
+ (item.prev_day.close - item.prev_day.open)
+ / item.prev_day.open
+ * 100
+ )
+ print(
+ "{:<15}{:<15}{:<15}{:.2f} %".format(
+ item.ticker,
+ item.prev_day.open,
+ item.prev_day.close,
+ percent_change,
+ )
+ )
diff --git a/examples/rest/forex-snapshots_gainers_losers.py b/examples/rest/forex-snapshots_gainers_losers.py
new file mode 100644
index 00000000..9fc7e36a
--- /dev/null
+++ b/examples/rest/forex-snapshots_gainers_losers.py
@@ -0,0 +1,37 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerSnapshot,
+)
+
+# docs
+# https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex__direction
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# get gainers
+gainers = client.get_snapshot_direction("forex", "gainers")
+# print(gainers)
+
+# print ticker with % change
+for gainer in gainers:
+ # verify this is a TickerSnapshot
+ if isinstance(gainer, TickerSnapshot):
+ # verify this is a float
+ if isinstance(gainer.todays_change_percent, float):
+ print("{:<15}{:.2f} %".format(gainer.ticker, gainer.todays_change_percent))
+
+print()
+
+# get losers
+losers = client.get_snapshot_direction("forex", "losers")
+# print(losers)
+
+# print ticker with % change
+for loser in losers:
+ # verify this is a TickerSnapshot
+ if isinstance(loser, TickerSnapshot):
+ # verify this is a float
+ if isinstance(loser.todays_change_percent, float):
+ print("{:<15}{:.2f} %".format(loser.ticker, loser.todays_change_percent))
diff --git a/examples/rest/forex-snapshots_ticker.py b/examples/rest/forex-snapshots_ticker.py
new file mode 100644
index 00000000..f8cb5562
--- /dev/null
+++ b/examples/rest/forex-snapshots_ticker.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v2_snapshot_locale_global_markets_forex_tickers__ticker
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ticker = client.get_snapshot_ticker("forex", "C:EURUSD")
+print(ticker)
diff --git a/examples/rest/forex-technical_indicators_ema.py b/examples/rest/forex-technical_indicators_ema.py
new file mode 100644
index 00000000..2521e36d
--- /dev/null
+++ b/examples/rest/forex-technical_indicators_ema.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v1_indicators_ema__fxticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ema = client.get_ema(
+ ticker="C:EURUSD",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(ema)
diff --git a/examples/rest/forex-technical_indicators_macd.py b/examples/rest/forex-technical_indicators_macd.py
new file mode 100644
index 00000000..8c07521c
--- /dev/null
+++ b/examples/rest/forex-technical_indicators_macd.py
@@ -0,0 +1,19 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v1_indicators_macd__fxticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+macd = client.get_macd(
+ ticker="C:EURUSD",
+ timespan="day",
+ short_window=12,
+ long_window=26,
+ signal_window=9,
+ series_type="close",
+)
+
+print(macd)
diff --git a/examples/rest/forex-technical_indicators_rsi.py b/examples/rest/forex-technical_indicators_rsi.py
new file mode 100644
index 00000000..5ec4d6f2
--- /dev/null
+++ b/examples/rest/forex-technical_indicators_rsi.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v1_indicators_rsi__fxticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+rsi = client.get_rsi(
+ ticker="C:EURUSD",
+ timespan="day",
+ window=14,
+ series_type="close",
+)
+
+print(rsi)
diff --git a/examples/rest/forex-technical_indicators_sma.py b/examples/rest/forex-technical_indicators_sma.py
new file mode 100644
index 00000000..51ede4d2
--- /dev/null
+++ b/examples/rest/forex-technical_indicators_sma.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v1_indicators_sma__fxticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+sma = client.get_sma(
+ ticker="C:EURUSD",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(sma)
diff --git a/examples/rest/forex-tickers.py b/examples/rest/forex-tickers.py
new file mode 100644
index 00000000..10c49b6f
--- /dev/null
+++ b/examples/rest/forex-tickers.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/forex/get_v3_reference_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+tickers = []
+for t in client.list_tickers(market="fx", limit=1000):
+ tickers.append(t)
+print(tickers)
diff --git a/examples/rest/indices-aggregates_bars.py b/examples/rest/indices-aggregates_bars.py
new file mode 100644
index 00000000..ddb9f9cd
--- /dev/null
+++ b/examples/rest/indices-aggregates_bars.py
@@ -0,0 +1,30 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v2_aggs_ticker__indicesticker__range__multiplier___timespan___from___to
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs
+
+# API key injected below for easy use. If not provided, the script will attempt
+# to use the environment variable "MASSIVE_API_KEY".
+#
+# setx MASSIVE_API_KEY "" <- windows
+# export MASSIVE_API_KEY="" <- mac/linux
+#
+# Note: To persist the environment variable you need to add the above command
+# to the shell startup script (e.g. .bashrc or .bash_profile.
+#
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "I:SPX",
+ 1,
+ "day",
+ "2023-03-10",
+ "2023-05-12",
+ limit=50000,
+):
+ aggs.append(a)
+
+print(aggs)
diff --git a/examples/rest/indices-daily_open_close.py b/examples/rest/indices-daily_open_close.py
new file mode 100644
index 00000000..85c0d405
--- /dev/null
+++ b/examples/rest/indices-daily_open_close.py
@@ -0,0 +1,16 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v1_open-close__indicesticker___date
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# make request
+request = client.get_daily_open_close_agg(
+ "I:SPX",
+ "2023-03-28",
+)
+
+print(request)
diff --git a/examples/rest/indices-market_holidays.py b/examples/rest/indices-market_holidays.py
new file mode 100644
index 00000000..49fe6fd2
--- /dev/null
+++ b/examples/rest/indices-market_holidays.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+from massive.rest.models import (
+ MarketHoliday,
+)
+
+# docs
+# https://massive.com/docs/indices/get_v1_marketstatus_upcoming
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+holidays = client.get_market_holidays()
+# print(holidays)
+
+# print date, name, and exchange
+for holiday in holidays:
+ # verify this is an exchange
+ if isinstance(holiday, MarketHoliday):
+ print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange))
diff --git a/examples/rest/indices-market_status.py b/examples/rest/indices-market_status.py
new file mode 100644
index 00000000..10296a94
--- /dev/null
+++ b/examples/rest/indices-market_status.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v1_marketstatus_now
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+result = client.get_market_status()
+print(result)
diff --git a/examples/rest/indices-previous_close.py b/examples/rest/indices-previous_close.py
new file mode 100644
index 00000000..18d7ceb5
--- /dev/null
+++ b/examples/rest/indices-previous_close.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v2_aggs_ticker__indicesticker__prev
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = client.get_previous_close_agg(
+ "I:SPX",
+)
+
+print(aggs)
diff --git a/examples/rest/indices-snapshots.py b/examples/rest/indices-snapshots.py
new file mode 100644
index 00000000..5e85343f
--- /dev/null
+++ b/examples/rest/indices-snapshots.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v3_snapshot_indices
+# https://github.com/massive-com/client-python/blob/master/massive/rest/snapshot.py#
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+tickers = ["I:SPX", "I:DJI", "I:VIX"]
+snapshot = client.get_snapshot_indices(tickers)
+
+# print raw values
+print(snapshot)
diff --git a/examples/rest/indices-technical_indicators_ema.py b/examples/rest/indices-technical_indicators_ema.py
new file mode 100644
index 00000000..35bc82ce
--- /dev/null
+++ b/examples/rest/indices-technical_indicators_ema.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v1_indicators_ema__indicesticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ema = client.get_ema(
+ ticker="I:SPX",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(ema)
diff --git a/examples/rest/indices-technical_indicators_macd.py b/examples/rest/indices-technical_indicators_macd.py
new file mode 100644
index 00000000..c64524b7
--- /dev/null
+++ b/examples/rest/indices-technical_indicators_macd.py
@@ -0,0 +1,19 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v1_indicators_macd__indicesticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+macd = client.get_macd(
+ ticker="I:SPX",
+ timespan="day",
+ short_window=12,
+ long_window=26,
+ signal_window=9,
+ series_type="close",
+)
+
+print(macd)
diff --git a/examples/rest/indices-technical_indicators_rsi.py b/examples/rest/indices-technical_indicators_rsi.py
new file mode 100644
index 00000000..c8e3bce1
--- /dev/null
+++ b/examples/rest/indices-technical_indicators_rsi.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v1_indicators_rsi__indicesticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+rsi = client.get_rsi(
+ ticker="I:SPX",
+ timespan="day",
+ window=14,
+ series_type="close",
+)
+
+print(rsi)
diff --git a/examples/rest/indices-technical_indicators_sma.py b/examples/rest/indices-technical_indicators_sma.py
new file mode 100644
index 00000000..709ec54b
--- /dev/null
+++ b/examples/rest/indices-technical_indicators_sma.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v1_indicators_sma__indicesticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+sma = client.get_sma(
+ ticker="I:SPX",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(sma)
diff --git a/examples/rest/indices-ticker_types.py b/examples/rest/indices-ticker_types.py
new file mode 100644
index 00000000..dfe62a1b
--- /dev/null
+++ b/examples/rest/indices-ticker_types.py
@@ -0,0 +1,27 @@
+from typing import Optional, Union, List
+from urllib3 import HTTPResponse
+from massive import RESTClient
+from massive.rest.models import (
+ TickerTypes,
+)
+
+# docs
+# https://massive.com/docs/indices/get_v3_reference_tickers_types
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-types
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+types: Optional[Union[List[TickerTypes], HTTPResponse]] = None
+
+try:
+ types = client.get_ticker_types("indices")
+except TypeError as e:
+ if "not NoneType" in str(e):
+ print("None found")
+ types = None
+ else:
+ raise
+
+if types is not None:
+ print(types)
diff --git a/examples/rest/indices-tickers.py b/examples/rest/indices-tickers.py
new file mode 100644
index 00000000..0270a9be
--- /dev/null
+++ b/examples/rest/indices-tickers.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/indices/get_v3_reference_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+tickers = []
+for t in client.list_tickers(market="indices", limit=1000):
+ tickers.append(t)
+print(tickers)
diff --git a/examples/rest/options-aggregates_bars.py b/examples/rest/options-aggregates_bars.py
new file mode 100644
index 00000000..71c5343f
--- /dev/null
+++ b/examples/rest/options-aggregates_bars.py
@@ -0,0 +1,30 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__range__multiplier___timespan___from___to
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs
+
+# API key injected below for easy use. If not provided, the script will attempt
+# to use the environment variable "MASSIVE_API_KEY".
+#
+# setx MASSIVE_API_KEY "" <- windows
+# export MASSIVE_API_KEY="" <- mac/linux
+#
+# Note: To persist the environment variable you need to add the above command
+# to the shell startup script (e.g. .bashrc or .bash_profile.
+#
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "O:SPY251219C00650000",
+ 1,
+ "day",
+ "2023-01-30",
+ "2023-02-03",
+ limit=50000,
+):
+ aggs.append(a)
+
+print(aggs)
diff --git a/examples/rest/options-conditions.py b/examples/rest/options-conditions.py
new file mode 100644
index 00000000..30e40905
--- /dev/null
+++ b/examples/rest/options-conditions.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_reference_conditions
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+conditions = []
+for c in client.list_conditions("options", limit=1000):
+ conditions.append(c)
+print(conditions)
diff --git a/examples/rest/options-contract.py b/examples/rest/options-contract.py
new file mode 100644
index 00000000..84093aa1
--- /dev/null
+++ b/examples/rest/options-contract.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_reference_options_contracts__options_ticker
+# https://massive-api-client.readthedocs.io/en/latest/Contracts.html
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+contract = client.get_options_contract("O:EVRI240119C00002500")
+
+# print raw values
+print(contract)
diff --git a/examples/rest/options-contracts.py b/examples/rest/options-contracts.py
new file mode 100644
index 00000000..08995c10
--- /dev/null
+++ b/examples/rest/options-contracts.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_reference_options_contracts
+# https://massive-api-client.readthedocs.io/en/latest/Contracts.html#list-options-contracts
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+contracts = []
+for c in client.list_options_contracts("HCP"):
+ contracts.append(c)
+print(contracts)
diff --git a/examples/rest/options-daily_open_close.py b/examples/rest/options-daily_open_close.py
new file mode 100644
index 00000000..7a756613
--- /dev/null
+++ b/examples/rest/options-daily_open_close.py
@@ -0,0 +1,16 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v1_open-close__optionsticker___date
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# make request
+request = client.get_daily_open_close_agg(
+ "O:SPY251219C00650000",
+ "2023-02-22",
+)
+
+print(request)
diff --git a/examples/rest/options-exchanges.py b/examples/rest/options-exchanges.py
new file mode 100644
index 00000000..9678e19a
--- /dev/null
+++ b/examples/rest/options-exchanges.py
@@ -0,0 +1,25 @@
+from massive import RESTClient
+from massive.rest.models import (
+ Exchange,
+)
+
+# docs
+# https://massive.com/docs/options/get_v3_reference_exchanges
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+exchanges = client.get_exchanges("options")
+print(exchanges)
+
+# loop over exchanges
+for exchange in exchanges:
+ # verify this is an exchange
+ if isinstance(exchange, Exchange):
+ # print exchange info
+ print(
+ "{:<15}{} ({})".format(
+ exchange.asset_class, exchange.name, exchange.operating_mic
+ )
+ )
diff --git a/examples/rest/options-last_trade.py b/examples/rest/options-last_trade.py
new file mode 100644
index 00000000..d24cc79d
--- /dev/null
+++ b/examples/rest/options-last_trade.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v2_last_trade__optionsticker
+# https://massive-api-client.readthedocs.io/en/latest/Trades.html#get-last-trade
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+trade = client.get_last_trade(
+ "O:TSLA210903C00700000",
+)
+
+print(trade)
diff --git a/examples/rest/options-market_holidays.py b/examples/rest/options-market_holidays.py
new file mode 100644
index 00000000..134aff86
--- /dev/null
+++ b/examples/rest/options-market_holidays.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+from massive.rest.models import (
+ MarketHoliday,
+)
+
+# docs
+# https://massive.com/docs/options/get_v1_marketstatus_upcoming
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+holidays = client.get_market_holidays()
+# print(holidays)
+
+# print date, name, and exchange
+for holiday in holidays:
+ # verify this is an exchange
+ if isinstance(holiday, MarketHoliday):
+ print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange))
diff --git a/examples/rest/options-market_status.py b/examples/rest/options-market_status.py
new file mode 100644
index 00000000..8a8e7bfc
--- /dev/null
+++ b/examples/rest/options-market_status.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v1_marketstatus_now
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+result = client.get_market_status()
+print(result)
diff --git a/examples/rest/options-previous_close.py b/examples/rest/options-previous_close.py
new file mode 100644
index 00000000..720dc9d0
--- /dev/null
+++ b/examples/rest/options-previous_close.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v2_aggs_ticker__optionsticker__prev
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = client.get_previous_close_agg(
+ "O:SPY251219C00650000",
+)
+
+print(aggs)
diff --git a/examples/rest/options-quotes.py b/examples/rest/options-quotes.py
new file mode 100644
index 00000000..1cdf9b8a
--- /dev/null
+++ b/examples/rest/options-quotes.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_quotes__optionsticker
+# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+quotes = []
+for t in client.list_quotes("O:SPY241220P00720000", limit=50000):
+ quotes.append(t)
+print(quotes)
diff --git a/examples/rest/options-snapshots_option_contract.py b/examples/rest/options-snapshots_option_contract.py
new file mode 100644
index 00000000..bffc9ff4
--- /dev/null
+++ b/examples/rest/options-snapshots_option_contract.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_snapshot_options__underlyingasset___optioncontract
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+snapshot = client.get_snapshot_option("AAPL", "O:AAPL230616C00150000")
+
+# print raw values
+print(snapshot)
diff --git a/examples/rest/options-snapshots_options_chain.py b/examples/rest/options-snapshots_options_chain.py
new file mode 100644
index 00000000..8b0c5f02
--- /dev/null
+++ b/examples/rest/options-snapshots_options_chain.py
@@ -0,0 +1,19 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_snapshot_options__underlyingasset
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+options_chain = []
+for o in client.list_snapshot_options_chain(
+ "HCP",
+ params={
+ "expiration_date.gte": "2024-03-16",
+ "strike_price.gte": 20,
+ },
+):
+ options_chain.append(o)
+print(options_chain)
diff --git a/examples/rest/options-technical_indicators_ema.py b/examples/rest/options-technical_indicators_ema.py
new file mode 100644
index 00000000..82dd99d7
--- /dev/null
+++ b/examples/rest/options-technical_indicators_ema.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v1_indicators_ema__optionsticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ema = client.get_ema(
+ ticker="O:SPY241220P00720000", timespan="day", window=50, series_type="close"
+)
+
+print(ema)
diff --git a/examples/rest/options-technical_indicators_macd.py b/examples/rest/options-technical_indicators_macd.py
new file mode 100644
index 00000000..a49f78a1
--- /dev/null
+++ b/examples/rest/options-technical_indicators_macd.py
@@ -0,0 +1,19 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v1_indicators_macd__optionsticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+macd = client.get_macd(
+ ticker="O:SPY241220P00720000",
+ timespan="day",
+ short_window=12,
+ long_window=26,
+ signal_window=9,
+ series_type="close",
+)
+
+print(macd)
diff --git a/examples/rest/options-technical_indicators_rsi.py b/examples/rest/options-technical_indicators_rsi.py
new file mode 100644
index 00000000..0a92caec
--- /dev/null
+++ b/examples/rest/options-technical_indicators_rsi.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v1_indicators_rsi__optionsticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+rsi = client.get_rsi(
+ ticker="O:SPY241220P00720000", timespan="day", window=14, series_type="close"
+)
+
+print(rsi)
diff --git a/examples/rest/options-technical_indicators_sma.py b/examples/rest/options-technical_indicators_sma.py
new file mode 100644
index 00000000..a6f0870e
--- /dev/null
+++ b/examples/rest/options-technical_indicators_sma.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v1_indicators_sma__optionsticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+sma = client.get_sma(
+ ticker="O:SPY241220P00720000", timespan="day", window=50, series_type="close"
+)
+
+print(sma)
diff --git a/examples/rest/options-ticker_details.py b/examples/rest/options-ticker_details.py
new file mode 100644
index 00000000..fe742286
--- /dev/null
+++ b/examples/rest/options-ticker_details.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_reference_tickers__ticker
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-details
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+details = client.get_ticker_details("TSLA")
+print(details)
diff --git a/examples/rest/options-ticker_news.py b/examples/rest/options-ticker_news.py
new file mode 100644
index 00000000..76b36c03
--- /dev/null
+++ b/examples/rest/options-ticker_news.py
@@ -0,0 +1,24 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerNews,
+)
+
+# docs
+# https://massive.com/docs/options/get_v2_reference_news
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-ticker-news
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+news = []
+for n in client.list_ticker_news("AAPL", order="desc", limit=1000):
+ news.append(n)
+
+# print date + title
+for index, item in enumerate(news):
+ # verify this is an agg
+ if isinstance(item, TickerNews):
+ print("{:<25}{:<15}".format(item.published_utc, item.title))
+
+ if index == 20:
+ break
diff --git a/examples/rest/options-tickers.py b/examples/rest/options-tickers.py
new file mode 100644
index 00000000..4a5e1104
--- /dev/null
+++ b/examples/rest/options-tickers.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_reference_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+tickers = []
+for t in client.list_tickers(limit=1000):
+ tickers.append(t)
+print(tickers)
diff --git a/examples/rest/options-trades.py b/examples/rest/options-trades.py
new file mode 100644
index 00000000..8ff559ec
--- /dev/null
+++ b/examples/rest/options-trades.py
@@ -0,0 +1,15 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/options/get_v3_trades__optionsticker
+# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+trades = []
+for t in client.list_trades("O:TSLA210903C00700000", limit=50000):
+ trades.append(t)
+
+# prints each trade that took place
+print(trades)
diff --git a/examples/rest/raw-get.py b/examples/rest/raw-get.py
index 89800015..8eab428b 100644
--- a/examples/rest/raw-get.py
+++ b/examples/rest/raw-get.py
@@ -1,4 +1,4 @@
-from polygon import RESTClient
+from massive import RESTClient
from typing import cast
from urllib3 import HTTPResponse
@@ -16,7 +16,7 @@
),
)
print(aggs.geturl())
-# https://api.polygon.io/v2/aggs/ticker/AAPL/range/1/day/2022-04-01/2022-04-04
+# https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2022-04-01/2022-04-04
print(aggs.status)
# 200
print(aggs.data)
diff --git a/examples/rest/raw-list.py b/examples/rest/raw-list.py
index 5a5a5642..05455a1f 100644
--- a/examples/rest/raw-list.py
+++ b/examples/rest/raw-list.py
@@ -1,4 +1,4 @@
-from polygon import RESTClient
+from massive import RESTClient
from typing import cast
from urllib3 import HTTPResponse
@@ -6,7 +6,7 @@
trades = cast(
HTTPResponse,
- client.list_trades("AAA", "2022-04-20", 5, raw=True),
+ client.list_trades("AAA", "2022-04-20", raw=True),
)
print(trades.data)
# b'{
@@ -79,5 +79,5 @@
# ],
# "status": "OK",
# "request_id": "618bb99e7a632ed9f55454a541404b44",
-# "next_url": "https://api.polygon.io/v3/trades/AAA?cursor=YXA9NSZhcz0mbGltaXQ9NSZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5ndGU9MjAyMi0wNC0yMFQwNCUzQTAwJTNBMDBaJnRpbWVzdGFtcC5sdGU9MjAyMi0wNC0yMFQyMCUzQTEwJTNBMDAuMDAzODY5OTUyWg"
+# "next_url": "https://api.massive.com/v3/trades/AAA?cursor=YXA9NSZhcz0mbGltaXQ9NSZvcmRlcj1kZXNjJnNvcnQ9dGltZXN0YW1wJnRpbWVzdGFtcC5ndGU9MjAyMi0wNC0yMFQwNCUzQTAwJTNBMDBaJnRpbWVzdGFtcC5sdGU9MjAyMi0wNC0yMFQyMCUzQTEwJTNBMDAuMDAzODY5OTUyWg"
# }'
diff --git a/examples/rest/simple-get.py b/examples/rest/simple-get.py
index 43ad4387..377943cc 100644
--- a/examples/rest/simple-get.py
+++ b/examples/rest/simple-get.py
@@ -1,6 +1,13 @@
-from polygon import RESTClient
+from massive import RESTClient
+from massive.rest import models
client = RESTClient()
-aggs = client.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04")
+aggs = client.get_aggs(
+ "AAPL",
+ 1,
+ "day",
+ "2022-04-04",
+ "2022-04-04",
+)
print(aggs)
diff --git a/examples/rest/simple-list.py b/examples/rest/simple-list.py
index dc93f315..c83d3a89 100644
--- a/examples/rest/simple-list.py
+++ b/examples/rest/simple-list.py
@@ -1,4 +1,4 @@
-from polygon import RESTClient
+from massive import RESTClient
client = RESTClient()
diff --git a/examples/rest/stocks-aggregates_bars.py b/examples/rest/stocks-aggregates_bars.py
new file mode 100644
index 00000000..3f2d0e59
--- /dev/null
+++ b/examples/rest/stocks-aggregates_bars.py
@@ -0,0 +1,30 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs
+
+# API key injected below for easy use. If not provided, the script will attempt
+# to use the environment variable "MASSIVE_API_KEY".
+#
+# setx MASSIVE_API_KEY "" <- windows
+# export MASSIVE_API_KEY="" <- mac/linux
+#
+# Note: To persist the environment variable you need to add the above command
+# to the shell startup script (e.g. .bashrc or .bash_profile.
+#
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "AAPL",
+ 1,
+ "minute",
+ "2022-01-01",
+ "2023-02-03",
+ limit=50000,
+):
+ aggs.append(a)
+
+print(aggs)
diff --git a/examples/rest/stocks-aggregates_bars_extra.py b/examples/rest/stocks-aggregates_bars_extra.py
new file mode 100644
index 00000000..feeb3218
--- /dev/null
+++ b/examples/rest/stocks-aggregates_bars_extra.py
@@ -0,0 +1,78 @@
+# This code retrieves stock market data for a specific stock using the
+# Massive REST API and writes it to a CSV file. It uses the "massive"
+# library to communicate with the API and the "csv" library to write
+# the data to a CSV file. The script retrieves data for the stock "AAPL"
+# for the dates "2023-01-30" to "2023-02-03" in 1 hour intervals. The
+# resulting data includes the open, high, low, close, volume, vwap,
+# timestamp, transactions, and otc values for each hour. The output is
+# then printed to the console.
+from massive import RESTClient
+from massive.rest.models import (
+ Agg,
+)
+import csv
+import datetime
+import io
+
+# docs
+# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "AAPL",
+ 1,
+ "hour",
+ "2023-01-30",
+ "2023-02-03",
+ limit=50000,
+):
+ aggs.append(a)
+
+print(aggs)
+
+# headers
+headers = [
+ "timestamp",
+ "open",
+ "high",
+ "low",
+ "close",
+ "volume",
+ "vwap",
+ "transactions",
+ "otc",
+]
+
+# creating the csv string
+csv_string = io.StringIO()
+writer = csv.DictWriter(csv_string, fieldnames=headers)
+
+# writing headers
+writer.writeheader()
+
+# writing data
+for agg in aggs:
+ # verify this is an agg
+ if isinstance(agg, Agg):
+ # verify this is an int
+ if isinstance(agg.timestamp, int):
+ writer.writerow(
+ {
+ "timestamp": datetime.datetime.fromtimestamp(agg.timestamp / 1000),
+ "open": agg.open,
+ "high": agg.high,
+ "low": agg.low,
+ "close": agg.close,
+ "volume": agg.volume,
+ "vwap": agg.vwap,
+ "transactions": agg.transactions,
+ "otc": agg.otc,
+ }
+ )
+
+# printing the csv string
+print(csv_string.getvalue())
diff --git a/examples/rest/stocks-aggregates_bars_highcharts.py b/examples/rest/stocks-aggregates_bars_highcharts.py
new file mode 100644
index 00000000..4695ed9d
--- /dev/null
+++ b/examples/rest/stocks-aggregates_bars_highcharts.py
@@ -0,0 +1,136 @@
+from massive import RESTClient
+from massive.rest.models import (
+ Agg,
+)
+import datetime
+import http.server
+import socketserver
+import traceback
+import json
+
+# This program retrieves stock price data for the AAPL stock from the Massive
+# API using a REST client, and formats the data in a format expected by the
+# Highcharts JavaScript library. The program creates a web server that serves
+# an HTML page that includes a candlestick chart of the AAPL stock prices using
+# Highcharts. The chart displays data for the time range from January 1, 2019,
+# to February 16, 2023. The chart data is updated by retrieving the latest data
+# from the Massive API every time the HTML page is loaded or refreshed. The
+# server listens on port 8888 and exits gracefully when a KeyboardInterrupt is
+# received.
+#
+# Connect to http://localhost:8888 in your browser to view candlestick chart.
+
+PORT = 8888
+
+# https://www.highcharts.com/blog/products/stock/
+# JavaScript StockChart with Date-Time Axis
+html = """
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+"""
+
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "AAPL",
+ 1,
+ "day",
+ "2019-01-01",
+ "2023-02-16",
+ limit=50000,
+):
+ aggs.append(a)
+
+# print(aggs)
+
+data = []
+
+# writing data
+for agg in aggs:
+ # verify this is an agg
+ if isinstance(agg, Agg):
+ # verify this is an int
+ if isinstance(agg.timestamp, int):
+ new_record = {
+ "date": agg.timestamp,
+ "open": agg.open,
+ "high": agg.high,
+ "low": agg.low,
+ "close": agg.close,
+ "volume": agg.volume,
+ }
+
+ data.append(new_record)
+
+values = [[v for k, v in d.items()] for d in data]
+
+# json_data = json.dumps(data)
+# print(json_data)
+
+
+class handler(http.server.SimpleHTTPRequestHandler):
+ def do_GET(self):
+ if self.path == "/data":
+ self.send_response(200)
+ self.send_header("Content-type", "application/json")
+ self.end_headers()
+ json_data = json.dumps(values)
+ self.wfile.write(json_data.encode())
+ else:
+ self.send_response(200)
+ self.send_header("Content-type", "text/html")
+ self.end_headers()
+ self.wfile.write(html.encode())
+
+
+# handle ctrl-c KeyboardInterrupt to exit the program gracefully
+try:
+ while True:
+ # run http server
+ with socketserver.TCPServer(("", PORT), handler) as httpd:
+ print("serving at port", PORT)
+ httpd.serve_forever()
+ pass
+except KeyboardInterrupt:
+ print("\nExiting gracefully...")
+ # traceback.print_exc()
diff --git a/examples/rest/stocks-conditions.py b/examples/rest/stocks-conditions.py
new file mode 100644
index 00000000..99740665
--- /dev/null
+++ b/examples/rest/stocks-conditions.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_reference_conditions
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-conditions
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+conditions = []
+for c in client.list_conditions(limit=1000):
+ conditions.append(c)
+print(conditions)
diff --git a/examples/rest/stocks-daily_open_close.py b/examples/rest/stocks-daily_open_close.py
new file mode 100644
index 00000000..0e811597
--- /dev/null
+++ b/examples/rest/stocks-daily_open_close.py
@@ -0,0 +1,16 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v1_open-close__stocksticker___date
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-daily-open-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# make request
+request = client.get_daily_open_close_agg(
+ "AAPL",
+ "2023-02-07",
+)
+
+print(request)
diff --git a/examples/rest/stocks-dividends.py b/examples/rest/stocks-dividends.py
new file mode 100644
index 00000000..0c312195
--- /dev/null
+++ b/examples/rest/stocks-dividends.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_reference_dividends
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-dividends
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+dividends = []
+for d in client.list_dividends("MSFT", limit=1000):
+ dividends.append(d)
+print(dividends)
diff --git a/examples/rest/stocks-exchanges.py b/examples/rest/stocks-exchanges.py
new file mode 100644
index 00000000..a8208163
--- /dev/null
+++ b/examples/rest/stocks-exchanges.py
@@ -0,0 +1,25 @@
+from massive import RESTClient
+from massive.rest.models import (
+ Exchange,
+)
+
+# docs
+# https://massive.com/docs/stocks/get_v3_reference_exchanges
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-exchanges
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+exchanges = client.get_exchanges()
+print(exchanges)
+
+# loop over exchanges
+for exchange in exchanges:
+ # verify this is an exchange
+ if isinstance(exchange, Exchange):
+ # print exchange info
+ print(
+ "{:<15}{} ({})".format(
+ exchange.asset_class, exchange.name, exchange.operating_mic
+ )
+ )
diff --git a/examples/rest/stocks-grouped_daily_bars.py b/examples/rest/stocks-grouped_daily_bars.py
new file mode 100644
index 00000000..e5e75722
--- /dev/null
+++ b/examples/rest/stocks-grouped_daily_bars.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+import pprint
+
+# docs
+# https://massive.com/docs/stocks/get_v2_aggs_grouped_locale_us_market_stocks__date
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-grouped-daily-aggs
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+grouped = client.get_grouped_daily_aggs(
+ "2023-02-16",
+)
+
+# print(grouped)
+
+# pprint (short for "pretty-print") is a module that provides a more human-
+# readable output format for data structures.
+pp = pprint.PrettyPrinter(indent=2)
+pp.pprint(grouped)
diff --git a/examples/rest/stocks-ipos.py b/examples/rest/stocks-ipos.py
new file mode 100644
index 00000000..abaf8b04
--- /dev/null
+++ b/examples/rest/stocks-ipos.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/rest/stocks/corporate-actions/ipos
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ipos = []
+for ipo in client.vx.list_ipos(ticker="RDDT"):
+ ipos.append(ipo)
+
+print(ipos)
diff --git a/examples/rest/stocks-last_quote.py b/examples/rest/stocks-last_quote.py
new file mode 100644
index 00000000..78da1600
--- /dev/null
+++ b/examples/rest/stocks-last_quote.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v2_last_nbbo__stocksticker
+# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#get-last-quote
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+quote = client.get_last_quote(
+ "AAPL",
+)
+
+print(quote)
diff --git a/examples/rest/stocks-last_trade.py b/examples/rest/stocks-last_trade.py
new file mode 100644
index 00000000..77f19451
--- /dev/null
+++ b/examples/rest/stocks-last_trade.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v2_last_trade__stocksticker
+# https://massive-api-client.readthedocs.io/en/latest/Trades.html#get-last-trade
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+trade = client.get_last_trade(
+ "AAPL",
+)
+
+print(trade)
diff --git a/examples/rest/stocks-market_holidays.py b/examples/rest/stocks-market_holidays.py
new file mode 100644
index 00000000..8e55248d
--- /dev/null
+++ b/examples/rest/stocks-market_holidays.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+from massive.rest.models import (
+ MarketHoliday,
+)
+
+# docs
+# https://massive.com/docs/stocks/get_v1_marketstatus_upcoming
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-holidays
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+holidays = client.get_market_holidays()
+# print(holidays)
+
+# print date, name, and exchange
+for holiday in holidays:
+ # verify this is an exchange
+ if isinstance(holiday, MarketHoliday):
+ print("{:<15}{:<15} ({})".format(holiday.date, holiday.name, holiday.exchange))
diff --git a/examples/rest/stocks-market_status.py b/examples/rest/stocks-market_status.py
new file mode 100644
index 00000000..dc143f57
--- /dev/null
+++ b/examples/rest/stocks-market_status.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v1_marketstatus_now
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-market-status
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+result = client.get_market_status()
+print(result)
diff --git a/examples/rest/stocks-previous_close.py b/examples/rest/stocks-previous_close.py
new file mode 100644
index 00000000..a1d0fab0
--- /dev/null
+++ b/examples/rest/stocks-previous_close.py
@@ -0,0 +1,14 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__prev
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#get-previous-close-agg
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = client.get_previous_close_agg(
+ "AAPL",
+)
+
+print(aggs)
diff --git a/examples/rest/stocks-quotes.py b/examples/rest/stocks-quotes.py
new file mode 100644
index 00000000..80f61c2b
--- /dev/null
+++ b/examples/rest/stocks-quotes.py
@@ -0,0 +1,21 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_quotes__stockticker
+# https://massive-api-client.readthedocs.io/en/latest/Quotes.html#list-quotes
+
+# NBBO (National Best Bid and Offer) is a term used in the financial industry
+# to describe the best bid and offer prices for a particular stock or security
+# being traded on all the available stock exchanges in the United States. It
+# provides information on the highest price a buyer is willing to pay (best
+# bid) and the lowest price a seller is willing to accept (best offer) for a
+# particular security. This information is used by traders to make informed
+# investment decisions and execute trades at the best available price.
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+quotes = []
+for t in client.list_quotes("IBIO", "2023-02-01", limit=50000):
+ quotes.append(t)
+print(quotes)
diff --git a/examples/rest/stocks-related_companies.py b/examples/rest/stocks-related_companies.py
new file mode 100644
index 00000000..f0dc6fea
--- /dev/null
+++ b/examples/rest/stocks-related_companies.py
@@ -0,0 +1,10 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v1_related-companies__ticker
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+related_companies = client.get_related_companies("AAPL")
+print(related_companies)
diff --git a/examples/rest/stocks-short_interest.py b/examples/rest/stocks-short_interest.py
new file mode 100644
index 00000000..075f079c
--- /dev/null
+++ b/examples/rest/stocks-short_interest.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/rest/stocks/fundamentals/short-interest
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+items = []
+for item in client.list_short_interest(ticker="RDDT"):
+ items.append(item)
+
+print(items)
diff --git a/examples/rest/stocks-short_volume.py b/examples/rest/stocks-short_volume.py
new file mode 100644
index 00000000..31aa03ae
--- /dev/null
+++ b/examples/rest/stocks-short_volume.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/rest/stocks/fundamentals/short-volume
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+items = []
+for item in client.list_short_volume(ticker="RDDT"):
+ items.append(item)
+
+print(items)
diff --git a/examples/rest/stocks-snapshots_all.py b/examples/rest/stocks-snapshots_all.py
new file mode 100644
index 00000000..f351f918
--- /dev/null
+++ b/examples/rest/stocks-snapshots_all.py
@@ -0,0 +1,45 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerSnapshot,
+ Agg,
+)
+
+# docs
+# https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-all-snapshots
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# tickers we are interested in
+tickers = ["TSLA", "AAPL", "MSFT", "META"]
+
+# snapshot = client.get_snapshot_all("stocks") # all tickers
+snapshot = client.get_snapshot_all("stocks", tickers)
+
+# print raw values
+print(snapshot)
+
+# crunch some numbers
+for item in snapshot:
+ # verify this is an TickerSnapshot
+ if isinstance(item, TickerSnapshot):
+ # verify this is an Agg
+ if isinstance(item.prev_day, Agg):
+ # verify this is a float
+ if isinstance(item.prev_day.open, float) and isinstance(
+ item.prev_day.close, float
+ ):
+ percent_change = (
+ (item.prev_day.close - item.prev_day.open)
+ / item.prev_day.open
+ * 100
+ )
+ print(
+ "{:<15}{:<15}{:<15}{:.2f} %".format(
+ item.ticker,
+ item.prev_day.open,
+ item.prev_day.close,
+ percent_change,
+ )
+ )
diff --git a/examples/rest/stocks-snapshots_gainers_losers.py b/examples/rest/stocks-snapshots_gainers_losers.py
new file mode 100644
index 00000000..80fadc14
--- /dev/null
+++ b/examples/rest/stocks-snapshots_gainers_losers.py
@@ -0,0 +1,37 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerSnapshot,
+)
+
+# docs
+# https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks__direction
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-gainers-losers-snapshot
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# get gainers
+gainers = client.get_snapshot_direction("stocks", "gainers")
+# print(gainers)
+
+# print ticker with % change
+for gainer in gainers:
+ # verify this is a TickerSnapshot
+ if isinstance(gainer, TickerSnapshot):
+ # verify this is a float
+ if isinstance(gainer.todays_change_percent, float):
+ print("{:<15}{:.2f} %".format(gainer.ticker, gainer.todays_change_percent))
+
+print()
+
+# get losers
+losers = client.get_snapshot_direction("stocks", "losers")
+# print(losers)
+
+# print ticker with % change
+for loser in losers:
+ # verify this is a TickerSnapshot
+ if isinstance(loser, TickerSnapshot):
+ # verify this is a float
+ if isinstance(loser.todays_change_percent, float):
+ print("{:<15}{:.2f} %".format(loser.ticker, loser.todays_change_percent))
diff --git a/examples/rest/stocks-snapshots_ticker.py b/examples/rest/stocks-snapshots_ticker.py
new file mode 100644
index 00000000..f12107ec
--- /dev/null
+++ b/examples/rest/stocks-snapshots_ticker.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v2_snapshot_locale_us_markets_stocks_tickers__stocksticker
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html#get-ticker-snapshot
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ticker = client.get_snapshot_ticker("stocks", "AAPL")
+print(ticker)
diff --git a/examples/rest/stocks-stock_financials.py b/examples/rest/stocks-stock_financials.py
new file mode 100644
index 00000000..2eb0c957
--- /dev/null
+++ b/examples/rest/stocks-stock_financials.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_vx_reference_financials
+# https://massive-api-client.readthedocs.io/en/latest/vX.html#list-stock-financials
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+financials = []
+for f in client.vx.list_stock_financials("AAPL", filing_date="2024-11-01"):
+ financials.append(f)
+
+ # get diluted_earnings_per_share
+ # print(f.financials.income_statement.diluted_earnings_per_share)
+
+ # get net_income_loss
+ # print(f.financials.income_statement.net_income_loss)
+
+print(financials)
diff --git a/examples/rest/stocks-stock_splits.py b/examples/rest/stocks-stock_splits.py
new file mode 100644
index 00000000..4a43cad2
--- /dev/null
+++ b/examples/rest/stocks-stock_splits.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_reference_splits
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-splits
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+splits = []
+for s in client.list_splits("TSLA", limit=1000):
+ splits.append(s)
+print(splits)
diff --git a/examples/rest/stocks-technical_indicators_ema.py b/examples/rest/stocks-technical_indicators_ema.py
new file mode 100644
index 00000000..b71abe46
--- /dev/null
+++ b/examples/rest/stocks-technical_indicators_ema.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v1_indicators_ema__stockticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+ema = client.get_ema(
+ ticker="AAPL",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(ema)
diff --git a/examples/rest/stocks-technical_indicators_macd.py b/examples/rest/stocks-technical_indicators_macd.py
new file mode 100644
index 00000000..4b9bd323
--- /dev/null
+++ b/examples/rest/stocks-technical_indicators_macd.py
@@ -0,0 +1,19 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v1_indicators_macd__stockticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+macd = client.get_macd(
+ ticker="AAPL",
+ timespan="day",
+ short_window=12,
+ long_window=26,
+ signal_window=9,
+ series_type="close",
+)
+
+print(macd)
diff --git a/examples/rest/stocks-technical_indicators_rsi.py b/examples/rest/stocks-technical_indicators_rsi.py
new file mode 100644
index 00000000..20ac8758
--- /dev/null
+++ b/examples/rest/stocks-technical_indicators_rsi.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v1_indicators_rsi__stockticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+rsi = client.get_rsi(
+ ticker="AAPL",
+ timespan="day",
+ window=14,
+ series_type="close",
+)
+
+print(rsi)
diff --git a/examples/rest/stocks-technical_indicators_sma.py b/examples/rest/stocks-technical_indicators_sma.py
new file mode 100644
index 00000000..a08fec13
--- /dev/null
+++ b/examples/rest/stocks-technical_indicators_sma.py
@@ -0,0 +1,17 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v1_indicators_sma__stockticker
+# https://github.com/massive-com/client-python/blob/master/massive/rest/indicators.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+sma = client.get_sma(
+ ticker="AAPL",
+ timespan="day",
+ window=50,
+ series_type="close",
+)
+
+print(sma)
diff --git a/examples/rest/stocks-ticker_details.py b/examples/rest/stocks-ticker_details.py
new file mode 100644
index 00000000..ac3b6b1e
--- /dev/null
+++ b/examples/rest/stocks-ticker_details.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_reference_tickers__ticker
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-details
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+details = client.get_ticker_details("AAPL")
+print(details)
diff --git a/examples/rest/stocks-ticker_events.py b/examples/rest/stocks-ticker_events.py
new file mode 100644
index 00000000..b8337f43
--- /dev/null
+++ b/examples/rest/stocks-ticker_events.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_vx_reference_tickers__id__events
+# https://github.com/massive-com/client-python/blob/master/massive/rest/reference.py
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+events = client.get_ticker_events("META")
+print(events)
diff --git a/examples/rest/stocks-ticker_news.py b/examples/rest/stocks-ticker_news.py
new file mode 100644
index 00000000..cea11857
--- /dev/null
+++ b/examples/rest/stocks-ticker_news.py
@@ -0,0 +1,26 @@
+from massive import RESTClient
+from massive.rest.models import (
+ TickerNews,
+)
+
+# docs
+# https://massive.com/docs/stocks/get_v2_reference_news
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-ticker-news
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+news = []
+for n in client.list_ticker_news("BBBY", order="desc", limit=1000):
+ news.append(n)
+
+# print(news)
+
+# print date + title
+for index, item in enumerate(news):
+ # verify this is an agg
+ if isinstance(item, TickerNews):
+ print("{:<25}{:<15}".format(item.published_utc, item.title))
+
+ if index == 20:
+ break
diff --git a/examples/rest/stocks-ticker_types.py b/examples/rest/stocks-ticker_types.py
new file mode 100644
index 00000000..7748868c
--- /dev/null
+++ b/examples/rest/stocks-ticker_types.py
@@ -0,0 +1,11 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_reference_tickers_types
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#get-ticker-types
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+types = client.get_ticker_types()
+print(types)
diff --git a/examples/rest/stocks-tickers.py b/examples/rest/stocks-tickers.py
new file mode 100644
index 00000000..c441fab2
--- /dev/null
+++ b/examples/rest/stocks-tickers.py
@@ -0,0 +1,13 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_reference_tickers
+# https://massive-api-client.readthedocs.io/en/latest/Reference.html#list-tickers
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+tickers = []
+for t in client.list_tickers(market="stocks", type="CS", active=True, limit=1000):
+ tickers.append(t)
+print(tickers)
diff --git a/examples/rest/stocks-trades.py b/examples/rest/stocks-trades.py
new file mode 100644
index 00000000..9d1de07c
--- /dev/null
+++ b/examples/rest/stocks-trades.py
@@ -0,0 +1,21 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v3_trades__stockticker
+# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades
+
+# Trade data refers to the tick records of individual transactions that have
+# taken place in a financial market, such as the price, size, and time of
+# each trade. It provides a high-frequency, granular view of market activity,
+# and is used by traders, investors, and researchers to gain insights into
+# market behavior and inform their investment decisions.
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+trades = []
+for t in client.list_trades("IBIO", "2023-02-01", limit=50000):
+ trades.append(t)
+
+# prints each trade that took place
+print(trades)
diff --git a/examples/rest/stocks-trades_extra.py b/examples/rest/stocks-trades_extra.py
new file mode 100644
index 00000000..0aa27142
--- /dev/null
+++ b/examples/rest/stocks-trades_extra.py
@@ -0,0 +1,27 @@
+# This code retrieves trade records and counts the amount of money that changes hands.
+from massive import RESTClient
+from massive.rest.models import (
+ Trade,
+)
+
+# docs
+# https://massive.com/docs/stocks/get_v3_trades__stockticker
+# https://massive-api-client.readthedocs.io/en/latest/Trades.html#massive.RESTClient.list_trades
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+# used to track money across trades
+money = float(0)
+
+# loop through and count price * volume
+for t in client.list_trades("DIS", "2023-02-07", limit=50000):
+ # verify this is an Trade
+ if isinstance(t, Trade):
+ # verify these are float
+ if isinstance(t.price, float) and isinstance(t.size, int):
+ money += t.price * t.size
+
+# format the number so it's human readable
+formatted_number = "{:,.2f}".format(money)
+print("Roughly " + formatted_number + " changed hands for DIS on 2023-02-07.")
diff --git a/examples/rest/universal-snapshot.py b/examples/rest/universal-snapshot.py
new file mode 100644
index 00000000..ba37c62d
--- /dev/null
+++ b/examples/rest/universal-snapshot.py
@@ -0,0 +1,47 @@
+from typing import cast, Iterator, Union
+from urllib3 import HTTPResponse
+from massive import RESTClient
+from massive.rest.models import UniversalSnapshot, SnapshotMarketType
+
+# docs
+# https://massive.com/docs/stocks/get_v3_snapshot
+# https://massive-api-client.readthedocs.io/en/latest/Snapshot.html
+
+# client = RESTClient("XXXXXX") # hardcoded api_key is used
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+
+def print_snapshots(iterator: Union[Iterator[UniversalSnapshot], HTTPResponse]):
+ snapshots = [s for s in iterator]
+
+ print(f"count: {len(snapshots)}")
+
+ for item in snapshots:
+ print(item)
+
+
+# it = client.list_universal_snapshots() # all tickers for all assets types in lexicographical order
+
+it = client.list_universal_snapshots(
+ ticker_any_of=[
+ "AAPL",
+ "O:AAPL230519C00055000",
+ "DOES_NOT_EXIST",
+ "X:1INCHUSD",
+ "C:AEDAUD",
+ ]
+)
+print_snapshots(it)
+
+it = client.list_universal_snapshots(type="stocks", ticker_gt="A", ticker_lt="AAPL")
+print_snapshots(it)
+
+it = client.list_universal_snapshots(type="stocks", ticker_gte="AAPL", ticker_lte="ABB")
+print_snapshots(it)
+
+it = client.list_universal_snapshots(
+ type="options",
+ ticker_gte="O:AAPL230804C00050000",
+ ticker_lte="O:AAPL230804C00070000",
+)
+print_snapshots(it)
diff --git a/examples/tools/async_websocket_rest_handler/async_websocket_rest_handler.py b/examples/tools/async_websocket_rest_handler/async_websocket_rest_handler.py
new file mode 100644
index 00000000..c19975f1
--- /dev/null
+++ b/examples/tools/async_websocket_rest_handler/async_websocket_rest_handler.py
@@ -0,0 +1,109 @@
+import asyncio
+import logging
+import os
+import re
+from concurrent.futures import ThreadPoolExecutor
+from typing import Optional, Union
+from massive import RESTClient, WebSocketClient
+from massive.websocket.models import Market, Feed
+
+
+class ApiCallHandler:
+ def __init__(self):
+ self.api_call_queue = asyncio.Queue()
+ self.executor = ThreadPoolExecutor() # Thread pool for running synchronous code
+ self.client = RESTClient() # Assumes MASSIVE_API_KEY is set in the environment
+
+ async def enqueue_api_call(self, options_ticker):
+ await self.api_call_queue.put(options_ticker)
+
+ async def start_processing_api_calls(self):
+ while True:
+ options_ticker = await self.api_call_queue.get()
+ try:
+ # TODO:
+ # Here, you can process the rest api requets as needed
+ # Example: Get the options contract for this
+ contract = await asyncio.get_running_loop().run_in_executor(
+ self.executor, self.get_options_contract, options_ticker
+ )
+ print(contract) # Or process the contract data as needed
+ except Exception as e:
+ logging.error(f"Error processing API call for {options_ticker}: {e}")
+ finally:
+ self.api_call_queue.task_done()
+
+ def get_options_contract(self, options_ticker):
+ return self.client.get_options_contract(options_ticker)
+
+
+class MessageHandler:
+ def __init__(self, api_call_handler):
+ self.handler_queue = asyncio.Queue()
+ self.api_call_handler = api_call_handler
+
+ async def add(self, message_response: Optional[Union[str, bytes]]) -> None:
+ await self.handler_queue.put(message_response)
+
+ async def start_handling(self) -> None:
+ while True:
+ message_response = await self.handler_queue.get()
+ logging.info(f"Received message: {message_response}")
+ try:
+ # TODO:
+ # Here, you can process the websocket messages as needed
+ # Example: Extract ticker symbol and enqueue REST API call
+ # to get the options contract for this trade (non-blocking)
+ for trade in message_response:
+ ticker = self.extract_symbol(trade.symbol)
+ if ticker == "NVDA":
+ asyncio.create_task(
+ self.api_call_handler.enqueue_api_call(trade.symbol)
+ )
+ except Exception as e:
+ logging.error(f"Error handling message: {e}")
+ finally:
+ self.handler_queue.task_done()
+
+ def extract_symbol(self, input_string):
+ match = re.search(r"O:([A-Z]+)", input_string)
+ if match:
+ return match.group(1)
+ else:
+ return None
+
+
+class MyClient:
+ def __init__(self, feed, market, subscriptions):
+ api_key = os.getenv("MASSIVE_API_KEY")
+ self.massive_websocket_client = WebSocketClient(
+ api_key=api_key,
+ feed=feed,
+ market=market,
+ verbose=True,
+ subscriptions=subscriptions,
+ )
+ self.api_call_handler = ApiCallHandler()
+ self.message_handler = MessageHandler(self.api_call_handler)
+
+ async def start_event_stream(self):
+ try:
+ await asyncio.gather(
+ self.massive_websocket_client.connect(self.message_handler.add),
+ self.message_handler.start_handling(),
+ self.api_call_handler.start_processing_api_calls(),
+ )
+ except Exception as e:
+ logging.error(f"Error in event stream: {e}")
+
+
+async def main():
+ logging.basicConfig(level=logging.INFO)
+ my_client = MyClient(
+ feed=Feed.RealTime, market=Market.Options, subscriptions=["T.*"]
+ )
+ await my_client.start_event_stream()
+
+
+# Entry point for the asyncio program
+asyncio.run(main())
diff --git a/examples/tools/async_websocket_rest_handler/readme.md b/examples/tools/async_websocket_rest_handler/readme.md
new file mode 100644
index 00000000..f68f535f
--- /dev/null
+++ b/examples/tools/async_websocket_rest_handler/readme.md
@@ -0,0 +1,16 @@
+# Pattern for Non-Blocking WebSocket and REST Calls in Python
+
+This script demonstrates a non-blocking pattern for handling WebSocket streams and REST API calls in Python using asyncio. It focuses on efficient, concurrent processing of real-time financial data and asynchronous fetching of additional information, ensuring that real-time data streams are managed without delays or blockages. The tutorial provides both theoretical insights and a practical, adaptable example, ideal for applications in financial data processing and similar real-time data handling scenarios.
+
+Please see the [tutorial](https://massive.com/blog/pattern-for-non-blocking-websocket-and-rest-calls-in-python) for more details.
+
+### Prerequisites
+
+- Python 3.x
+- Massive.com account and Options API key
+
+### Running the Example
+
+```
+python3 async_websocket_rest_handler.py
+```
\ No newline at end of file
diff --git a/examples/tools/docker/Dockerfile b/examples/tools/docker/Dockerfile
new file mode 100644
index 00000000..b79a7af1
--- /dev/null
+++ b/examples/tools/docker/Dockerfile
@@ -0,0 +1,19 @@
+# Use an official Python runtime as a parent image
+FROM python:3.8-slim
+
+# Set the working directory in the container
+WORKDIR /usr/src/app
+
+# Copy the current directory contents into the container at /usr/src/app
+COPY . .
+
+# Install any needed packages specified in requirements.txt
+RUN pip install --no-cache-dir massive
+
+# Set the environment variable for the Massive API key
+# Note: Replace "" with your actual API key or use Docker's --env flag when running the container to set it dynamically
+# Warning: Not recommended for production or shared environments
+ENV MASSIVE_API_KEY=
+
+# Run the script when the container launches
+CMD ["python", "./app.py"]
diff --git a/examples/tools/docker/app.py b/examples/tools/docker/app.py
new file mode 100644
index 00000000..321bb4b9
--- /dev/null
+++ b/examples/tools/docker/app.py
@@ -0,0 +1,20 @@
+from massive import RESTClient
+
+# docs
+# https://massive.com/docs/stocks/get_v2_aggs_ticker__stocksticker__range__multiplier___timespan___from___to
+# https://massive-api-client.readthedocs.io/en/latest/Aggs.html#massive.RESTClient.list_aggs
+
+client = RESTClient() # MASSIVE_API_KEY environment variable is used
+
+aggs = []
+for a in client.list_aggs(
+ "AAPL",
+ 1,
+ "hour",
+ "2024-01-30",
+ "2024-01-30",
+ limit=50000,
+):
+ aggs.append(a)
+
+print(aggs)
diff --git a/examples/tools/docker/readme.md b/examples/tools/docker/readme.md
new file mode 100644
index 00000000..ff3f24e4
--- /dev/null
+++ b/examples/tools/docker/readme.md
@@ -0,0 +1,41 @@
+# Dockerized Python Application with Massive API Client
+
+This Docker setup provides a ready-to-use environment for running Python scripts that utilize the `massive-api-client` for financial data processing. It encapsulates the Python environment and the `massive-api-client` library in a Docker container, making it easy to deploy and run the application consistently across any system with Docker installed. This approach is particularly useful for developers looking to integrate Massive's financial data APIs into their applications without worrying about environment inconsistencies.
+
+### Prerequisites
+
+- [Docker](https://www.docker.com/) installed on your machine
+- [Massive.com](https://massive.com/) account and API key
+
+### Setup and Configuration
+
+1. Clone the repository or download the Dockerfile and your Python script into a directory.
+2. Use Docker's `--env` flag when running the container to set the `MASSIVE_API_KEY` environment variable dynamically, or replace `` in the Dockerfile with your Massive API key (not recommended for production or shared environments).
+3. Ensure your Python script (e.g., `app.py`) is in the same directory as the Dockerfile.
+
+### Building the Docker Image
+
+Any modifications to the Python script will require rebuilding the Docker image to reflect the changes in the containerized environment. Use the docker build command each time your script is updated to ensure the latest version is used in your Docker container.
+
+Navigate to the directory containing your Dockerfile and execute the following command to build your Docker image:
+
+```
+docker build -t massive-client-app .
+```
+
+This command creates a Docker image named `massive-client-app` based on the instructions in your Dockerfile.
+
+### Running the Docker Container
+
+Run your Docker container using the following command:
+
+```
+docker run --env MASSIVE_API_KEY="" massive-client-app
+```
+
+Replace `` with your actual Massive API key. This command starts a Docker container based on the `massive-client-app` image, sets the `MASSIVE_API_KEY` environment variable to your provided API key, and runs your Python script inside the container.
+
+### Additional Notes
+
+- The Docker setup provided here is a very basic example. Depending on your specific requirements, you might need to customize the Dockerfile, such as adding volume mounts for persistent data or exposing ports for network communication.
+- For more details on using the Massive API and the `massive-api-client` library, please refer to the [Massive documentation](https://massive.com/docs), the [massive-com/client-python](https://github.com/massive-com/client-python) repo, or the [massive-api-client documentation](https://massive-api-client.readthedocs.io/en/latest/).
\ No newline at end of file
diff --git a/examples/tools/flatfiles-stock-trades/exchange-heatmap.py b/examples/tools/flatfiles-stock-trades/exchange-heatmap.py
new file mode 100644
index 00000000..0ea4ce4f
--- /dev/null
+++ b/examples/tools/flatfiles-stock-trades/exchange-heatmap.py
@@ -0,0 +1,68 @@
+# We can use a Python script that aggregates trades by exchange into 30-minute
+# chunks, setting the stage for a visual analysis. This approach will highlight
+# trade flows, including opening hours and peak activity times, across the
+# exchanges. Please see https://massive.com/blog/insights-from-trade-level-data
+#
+import pandas as pd # type: ignore
+import seaborn as sns # type: ignore
+import matplotlib.pyplot as plt # type: ignore
+import numpy as np # type: ignore
+import pytz # type: ignore
+
+# Replace '2024-04-05.csv' with the path to your actual file
+file_path = "2024-04-05.csv"
+
+# Load the CSV file into a pandas DataFrame
+df = pd.read_csv(file_path)
+
+# Convert 'participant_timestamp' to datetime (assuming nanoseconds Unix timestamp)
+df["participant_timestamp"] = pd.to_datetime(
+ df["participant_timestamp"], unit="ns", utc=True
+)
+
+# Convert to Eastern Time (ET), accounting for both EST and EDT
+df["participant_timestamp"] = df["participant_timestamp"].dt.tz_convert(
+ "America/New_York"
+)
+
+# Create a new column for 30-minute time intervals, now in ET
+df["time_interval"] = df["participant_timestamp"].dt.floor("30T").dt.time
+
+# Ensure full 24-hour coverage by generating all possible 30-minute intervals
+all_intervals = pd.date_range(start="00:00", end="23:59", freq="30T").time
+all_exchanges = df["exchange"].unique()
+full_index = pd.MultiIndex.from_product(
+ [all_exchanges, all_intervals], names=["exchange", "time_interval"]
+)
+
+# Group by 'exchange' and 'time_interval', count trades, and reset index
+grouped = (
+ df.groupby(["exchange", "time_interval"])
+ .size()
+ .reindex(full_index, fill_value=0)
+ .reset_index(name="trade_count")
+)
+
+# Pivot the DataFrame for the heatmap, ensuring all intervals and exchanges are represented
+pivot_table = grouped.pivot("exchange", "time_interval", "trade_count").fillna(0)
+
+# Apply a log scale transformation to the trade counts + 1 to handle zero trades correctly
+log_scale_data = np.log1p(pivot_table.values)
+
+# Plotting the heatmap using the log scale data
+plt.figure(figsize=(20, 10))
+sns.heatmap(
+ log_scale_data,
+ annot=False,
+ cmap="Reds",
+ linewidths=0.5,
+ cbar=False,
+ xticklabels=[t.strftime("%H:%M") for t in all_intervals],
+ yticklabels=pivot_table.index,
+)
+plt.title("Trade Count Heatmap by Exchange and Time Interval (Log Scale, ET)")
+plt.ylabel("Exchange")
+plt.xlabel("Time Interval (ET)")
+plt.xticks(rotation=45)
+plt.tight_layout() # Adjust layout to not cut off labels
+plt.show()
diff --git a/examples/tools/flatfiles-stock-trades/exchanges-seen.py b/examples/tools/flatfiles-stock-trades/exchanges-seen.py
new file mode 100644
index 00000000..fcb42572
--- /dev/null
+++ b/examples/tools/flatfiles-stock-trades/exchanges-seen.py
@@ -0,0 +1,23 @@
+# Here's a Python script for analyzing the dataset, that identifies the
+# distribution of trades across different exchanges and calculates their
+# respective percentages of the total trades. Please see
+# https://massive.com/blog/insights-from-trade-level-data
+#
+import pandas as pd # type: ignore
+
+# Replace '2024-04-05.csv' with the path to your actual file
+file_path = "2024-04-05.csv"
+
+# Load the CSV file into a pandas DataFrame
+df = pd.read_csv(file_path)
+
+# Count the number of trades for each exchange
+exchange_counts = df["exchange"].value_counts()
+
+# Calculate the total number of trades
+total_trades = exchange_counts.sum()
+
+# Print out all exchanges and their percentage of total trades
+for exchange, count in exchange_counts.items():
+ percentage = (count / total_trades) * 100
+ print(f"Exchange {exchange}: {count} trades, {percentage:.2f}% of total trades")
diff --git a/examples/tools/flatfiles-stock-trades/heatmap.png b/examples/tools/flatfiles-stock-trades/heatmap.png
new file mode 100644
index 00000000..9cf4c0ac
Binary files /dev/null and b/examples/tools/flatfiles-stock-trades/heatmap.png differ
diff --git a/examples/tools/flatfiles-stock-trades/histogram.png b/examples/tools/flatfiles-stock-trades/histogram.png
new file mode 100644
index 00000000..1ccb62dd
Binary files /dev/null and b/examples/tools/flatfiles-stock-trades/histogram.png differ
diff --git a/examples/tools/flatfiles-stock-trades/readme.md b/examples/tools/flatfiles-stock-trades/readme.md
new file mode 100644
index 00000000..5465e29f
--- /dev/null
+++ b/examples/tools/flatfiles-stock-trades/readme.md
@@ -0,0 +1,86 @@
+# Massive.com Flat Files Stock Trades Analysis Scripts
+
+This repository contains Python scripts for analyzing stock market trading data using Flat Files from Massive.com. These scripts demonstrate various ways to dissect and visualize trade data for comprehensive market analysis.
+
+Please see the tutorial: [Deep Dive into Trade-Level Data with Flat Files](https://massive.com/blog/insights-from-trade-level-data)
+
+## Scripts Overview
+
+### **exchange-heatmap.py**
+This script aggregates trades by exchange into 30-minute chunks and creates a heatmap visualization. It highlights the flow of trades and peak activity times across different exchanges, providing insights into how different exchanges operate throughout the day.
+
+
+
+### **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 += '