summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanglewood <85772166+deeleeramone@users.noreply.github.com>2024-03-11 00:58:05 -0700
committerGitHub <noreply@github.com>2024-03-11 07:58:05 +0000
commit3ea6bcf1a634710a159e52d0dde7828751ce450f (patch)
tree4381264c7b225124affcab8f858085fa3ad1ac62
parentf328a45b9586243ddb4bff518e8f07b9d264a124 (diff)
[Enhancement] Improve Intrinio Unusual Options (#6177)
* improve intrinio unusual options * static files * fix test * really fix the test
-rw-r--r--openbb_platform/extensions/derivatives/integration/test_derivatives_api.py17
-rw-r--r--openbb_platform/extensions/derivatives/integration/test_derivatives_python.py17
-rw-r--r--openbb_platform/openbb/package/derivatives_options.py38
-rw-r--r--openbb_platform/openbb/package/economy.py2
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py10
-rw-r--r--openbb_platform/providers/intrinio/openbb_intrinio/models/options_unusual.py257
-rw-r--r--openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_balance_sheet_fetcher.yaml804
-rw-r--r--openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_options_unusual_fetcher.yaml603
-rw-r--r--openbb_platform/providers/intrinio/tests/test_intrinio_fetchers.py8
9 files changed, 458 insertions, 1298 deletions
diff --git a/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py b/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py
index 79f90c32554..0ac622a8f4d 100644
--- a/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py
+++ b/openbb_platform/extensions/derivatives/integration/test_derivatives_api.py
@@ -49,9 +49,20 @@ def test_derivatives_options_chains(params, headers):
@parametrize(
"params",
[
- ({"symbol": "AAPL"}),
- ({"provider": "intrinio", "source": "delayed", "symbol": "AAPL"}),
- ({"provider": "intrinio", "symbol": "PLTR", "source": "delayed"}),
+ (
+ {
+ "symbol": "AAPL",
+ "provider": "intrinio",
+ "start_date": "2023-11-20",
+ "end_date": None,
+ "min_value": None,
+ "max_value": None,
+ "trade_type": None,
+ "sentiment": "neutral",
+ "limit": 1000,
+ "source": "delayed",
+ }
+ )
],
)
@pytest.mark.integration
diff --git a/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py b/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py
index f307d344cb4..fd4a5587f23 100644
--- a/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py
+++ b/openbb_platform/extensions/derivatives/integration/test_derivatives_python.py
@@ -43,9 +43,20 @@ def test_derivatives_options_chains(params, obb):
@parametrize(
"params",
[
- ({"symbol": "AAPL"}),
- ({"provider": "intrinio", "source": "delayed", "symbol": "AAPL"}),
- ({"provider": "intrinio", "symbol": "PLTR", "source": "delayed"}),
+ (
+ {
+ "symbol": "AAPL",
+ "provider": "intrinio",
+ "start_date": "2023-11-20",
+ "end_date": None,
+ "min_value": None,
+ "max_value": None,
+ "trade_type": None,
+ "sentiment": "neutral",
+ "limit": 1000,
+ "source": "delayed",
+ }
+ )
],
)
@pytest.mark.integration
diff --git a/openbb_platform/openbb/package/derivatives_options.py b/openbb_platform/openbb/package/derivatives_options.py
index c1e156d9a3d..99a5e45a156 100644
--- a/openbb_platform/openbb/package/derivatives_options.py
+++ b/openbb_platform/openbb/package/derivatives_options.py
@@ -205,6 +205,20 @@ class ROUTER_derivatives_options(Container):
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'intrinio' if there is
no default.
+ start_date : Optional[datetime.date]
+ Start date of the data, in YYYY-MM-DD format. If no symbol is supplied, requests are only allowed for a single date. Use the start_date for the target date. Intrinio appears to have data beginning Feb/2022, but is unclear when it actually began. (provider: intrinio)
+ end_date : Optional[datetime.date]
+ End date of the data, in YYYY-MM-DD format. If a symbol is not supplied, do not include an end date. (provider: intrinio)
+ trade_type : Optional[Literal['block', 'sweep', 'large']]
+ The type of unusual activity to query for. (provider: intrinio)
+ sentiment : Optional[Literal['bullish', 'bearish', 'neutral']]
+ The sentiment type to query for. (provider: intrinio)
+ min_value : Optional[Union[float, int]]
+ The inclusive minimum total value for the unusual activity. (provider: intrinio)
+ max_value : Optional[Union[float, int]]
+ The inclusive maximum total value for the unusual activity. (provider: intrinio)
+ limit : int
+ The number of data entries to return. A typical day for all symbols will yield 50-80K records. The API will paginate at 1000 records. The high default limit (100K) is to be able to reliably capture the most days. The high absolute limit (1.25M) is to allow for outlier days. Queries at the absolute limit will take a long time, and might be unreliable. Apply filters to improve performance. (provider: intrinio)
source : Literal['delayed', 'realtime']
The source of the data. Either realtime or delayed. (provider: intrinio)
@@ -228,24 +242,24 @@ class ROUTER_derivatives_options(Container):
Symbol representing the entity requested in the data. (the underlying symbol)
contract_symbol : str
Contract symbol for the option.
- trade_type : Optional[str]
+ trade_timestamp : Optional[datetime]
+ The datetime of order placement. (provider: intrinio)
+ trade_type : Optional[Literal['block', 'sweep', 'large']]
The type of unusual trade. (provider: intrinio)
- sentiment : Optional[str]
+ sentiment : Optional[Literal['bullish', 'bearish', 'neutral']]
Bullish, Bearish, or Neutral Sentiment is estimated based on whether the trade was executed at the bid, ask, or mark price. (provider: intrinio)
- total_value : Optional[Union[int, float]]
- The aggregated value of all option contract premiums included in the trade. (provider: intrinio)
- total_size : Optional[int]
- The total number of contracts involved in a single transaction. (provider: intrinio)
- average_price : Optional[float]
- The average premium paid per option contract. (provider: intrinio)
- ask_at_execution : Optional[float]
- Ask price at execution. (provider: intrinio)
bid_at_execution : Optional[float]
Bid price at execution. (provider: intrinio)
+ ask_at_execution : Optional[float]
+ Ask price at execution. (provider: intrinio)
+ average_price : Optional[float]
+ The average premium paid per option contract. (provider: intrinio)
underlying_price_at_execution : Optional[float]
Price of the underlying security at execution of trade. (provider: intrinio)
- timestamp : Optional[datetime]
- The UTC timestamp of order placement. (provider: intrinio)
+ total_size : Optional[int]
+ The total number of contracts involved in a single transaction. (provider: intrinio)
+ total_value : Optional[Union[int, float]]
+ The aggregated value of all option contract premiums included in the trade. (provider: intrinio)
Examples
--------
diff --git a/openbb_platform/openbb/package/economy.py b/openbb_platform/openbb/package/economy.py
index 3aa90603745..d5c9b9e9122 100644
--- a/openbb_platform/openbb/package/economy.py
+++ b/openbb_platform/openbb/package/economy.py
@@ -1301,7 +1301,7 @@ class ROUTER_economy(Container):
>>> from openbb import obb
>>> obb.economy.unemployment(provider='oecd')
>>> obb.economy.unemployment(country='all', frequency='quarterly', provider='oecd')
- >>> # Demographics for the statistics are selected with the `age` and `sex` parameters.
+ >>> # Demographics for the statistics are selected with the `age` parameter.
>>> obb.economy.unemployment(country='all', frequency='quarterly', age='25-54', provider='oecd')
""" # noqa: E501
diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py
index 0476ab44ead..7c06ee37e51 100644
--- a/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py
+++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py
@@ -2,8 +2,8 @@
# pylint: disable=unused-argument
-import warnings
from typing import Any, Dict, List, Literal, Optional
+from warnings import warn
from openbb_core.provider.abstract.fetcher import Fetcher
from openbb_core.provider.standard_models.balance_sheet import (
@@ -14,8 +14,6 @@ from openbb_core.provider.utils.helpers import ClientResponse, amake_requests
from openbb_intrinio.utils.helpers import get_data_one
from pydantic import Field, field_validator, model_validator
-_warn = warnings.warn
-
class IntrinioBalanceSheetQueryParams(BalanceSheetQueryParams):
"""Intrinio Balance Sheet Query.
@@ -430,16 +428,16 @@ class IntrinioBalanceSheetFetcher(
"""Return the raw data from the Intrinio endpoint."""
api_key = credentials.get("intrinio_api_key") if credentials else ""
statement_code = "balance_sheet_statement"
-
+ period = "FY" if query.period == "annual" else "QTR"
fundamentals_data: Dict = {}
base_url = "https://api-v2.intrinio.com"
fundamentals_url = (
f"{base_url}/companies/{query.symbol}/fundamentals?"
- f"statement_code={statement_code}&type={query.period}"
+ f"statement_code={statement_code}&type={period}"
)
if query.fiscal_year is not None:
if query.fiscal_year < 2008:
- _warn("Financials data is only available from 2008 and later.")
+ warn("Financials data is only available from 2008 and later.")
query.fiscal_year = 2008
fundamentals_url = fundamentals_url + f"&fiscal_year={query.fiscal_year}"
fundamentals_url = fundamentals_url + f"&api_key={api_key}"
diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/options_unusual.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/options_unusual.py
index be9f538c35f..1719d65f85e 100644
--- a/openbb_platform/providers/intrinio/openbb_intrinio/models/options_unusual.py
+++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/options_unusual.py
@@ -1,15 +1,30 @@
"""Intrinio Unusual Options Model."""
-from datetime import datetime
+# pylint: disable = unused-argument
+
+from datetime import (
+ date as dateType,
+ datetime,
+ timedelta,
+)
from typing import Any, Dict, List, Literal, Optional, Union
+from dateutil.parser import parse
from openbb_core.provider.abstract.fetcher import Fetcher
from openbb_core.provider.standard_models.options_unusual import (
OptionsUnusualData,
OptionsUnusualQueryParams,
)
-from openbb_intrinio.utils.helpers import get_data_one
-from pydantic import Field, field_validator
+from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS
+from openbb_core.provider.utils.errors import EmptyDataError
+from openbb_core.provider.utils.helpers import (
+ ClientResponse,
+ ClientSession,
+ amake_request,
+ get_querystring,
+)
+from pydantic import Field, field_validator, model_validator
+from pytz import timezone
class IntrinioOptionsUnusualQueryParams(OptionsUnusualQueryParams):
@@ -18,11 +33,114 @@ class IntrinioOptionsUnusualQueryParams(OptionsUnusualQueryParams):
source: https://docs.intrinio.com/documentation/web_api/get_unusual_activity_v2
"""
+ __alias_dict__ = {
+ "min_value": "minimum_total_value",
+ "max_value": "maximum_total_value",
+ "trade_type": "activity_type",
+ }
+
+ start_date: Optional[dateType] = Field(
+ description=QUERY_DESCRIPTIONS.get("start_date", "")
+ + " If no symbol is supplied, requests are only allowed for a single date."
+ + " Use the start_date for the target date."
+ + " Intrinio appears to have data beginning Feb/2022,"
+ + " but is unclear when it actually began.",
+ default=None,
+ )
+ end_date: Optional[dateType] = Field(
+ description=QUERY_DESCRIPTIONS.get("end_date", "")
+ + " If a symbol is not supplied, do not include an end date.",
+ default=None,
+ )
+ trade_type: Optional[Literal["block", "sweep", "large"]] = Field(
+ description="The type of unusual activity to query for.",
+ default=None,
+ )
+ sentiment: Optional[Literal["bullish", "bearish", "neutral"]] = Field(
+ description="The sentiment type to query for.",
+ default=None,
+ )
+ min_value: Optional[Union[int, float]] = Field(
+ description="The inclusive minimum total value for the unusual activity.",
+ default=None,
+ )
+ max_value: Optional[Union[int, float]] = Field(
+ description="The inclusive maximum total value for the unusual activity.",
+ default=None,
+ )
+ limit: int = Field(
+ description=QUERY_DESCRIPTIONS.get("limit", "")
+ + " A typical day for all symbols will yield 50-80K records."
+ + " The API will paginate at 1000 records."
+ + " The high default limit (100K) is to be able to reliably capture the most days."
+ + " The high absolute limit (1.25M) is to allow for outlier days."
+ + " Queries at the absolute limit will take a long time, and might be unreliable."
+ + " Apply filters to improve performance.",
+ default=100000,
+ lt=1250000,
+ )
source: Literal["delayed", "realtime"] = Field(
default="delayed",
- description="The source of the data. Either realtime or delayed.",
+ description="The source of the data." + " Either realtime or delayed.",
)
+ @model_validator(mode="before")
+ @classmethod
+ def validate_params(cls, params):
+ """Validate the query parameters."""
+
+ if params.get("start_date") is None:
+ # If the symbol is provided, there will be considerably less results.
+ # Broad market data needs to be confined to a single date.
+ params["start_date"] = (
+ dateType.today() - timedelta(days=10)
+ if params.get("symbol") is not None
+ else dateType.today()
+ )
+
+ # Ensure the start date is not on a weekend.
+ if params.get("start_date").weekday() > 4: # type: ignore
+ params["start_date"] = params.get("start_date") + timedelta(
+ days=4 - params.get("start_date").weekday()
+ ) # type: ignore
+
+ # If the end date is not provided, set it to the start date.
+ if params.get("end_date") is None:
+ params["end_date"] = params.get("start_date")
+
+ # Ensure the start date is before the end date.
+ if params.get("start_date") > params.get("end_date"): # type: ignore
+ params["start_date"], params["end_date"] = (
+ params["end_date"],
+ params["start_date"],
+ )
+
+ # Ensure we are not overloading API.
+ if (
+ params.get("symbol") is None
+ and (params.get("end_date") - params.get("start_date")).days >= 1
+ ):
+ raise RuntimeError(
+ "When no symbol is supplied, queries are not allowed if"
+ + " the date range covers more than one trading day."
+ + " Supply only the start_date for queries with no symbol."
+ )
+
+ # Ensure the end date is not on a weekend.
+ if params.get("end_date").weekday() > 4: # type: ignore
+ params["end_date"] = params.get("end_date") + timedelta(
+ days=7 - params.get("end_date").weekday()
+ ) # type: ignore
+
+ # Intrinio appears to make the end date not inclusive.
+ # It doesn't want the start/end dates to be the same, set the end date to the next day.
+ if params.get("end_date") is not None or params.get("start_date") == params.get(
+ "end_date"
+ ):
+ params["end_date"] = params.get("end_date") + timedelta(days=1) # type: ignore
+
+ return params
+
class IntrinioOptionsUnusualData(OptionsUnusualData):
"""Intrinio Unusual Options Data."""
@@ -30,42 +148,74 @@ class IntrinioOptionsUnusualData(OptionsUnusualData):
__alias_dict__ = {
"contract_symbol": "contract",
"underlying_symbol": "symbol",
+ "trade_type": "type",
+ "trade_timestamp": "timestamp",
}
- @field_validator("contract_symbol", mode="before", check_fields=False)
- @classmethod
- def validate_contract_symbol(cls, v: str): # pylint: disable=E0213
- """Return the symbol as the OCC standard format."""
- return v.replace("_", "") if v else None
-
- trade_type: str = Field(description="The type of unusual trade.", alias="type")
- sentiment: str = Field(
+ trade_timestamp: datetime = Field(description="The datetime of order placement.")
+ trade_type: Literal["block", "sweep", "large", "sweep"] = Field(
+ description="The type of unusual trade."
+ )
+ sentiment: Literal["bullish", "bearish", "neutral"] = Field(
description=(
"Bullish, Bearish, or Neutral Sentiment is estimated based on whether"
+ " the trade was executed at the bid, ask, or mark price."
)
)
- total_value: Union[int, float] = Field(
- description="The aggregated value of all option contract premiums included in the trade."
+ bid_at_execution: float = Field(description="Bid price at execution.")
+ ask_at_execution: float = Field(description="Ask price at execution.")
+ average_price: float = Field(
+ description="The average premium paid per option contract."
+ )
+ underlying_price_at_execution: Optional[float] = Field(
+ default=None,
+ description="Price of the underlying security at execution of trade.",
)
total_size: int = Field(
description="The total number of contracts involved in a single transaction."
)
- average_price: float = Field(
- description="The average premium paid per option contract."
- )
- ask_at_execution: float = Field(description="Ask price at execution.")
- bid_at_execution: float = Field(description="Bid price at execution.")
- underlying_price_at_execution: float = Field(
- description="Price of the underlying security at execution of trade."
+ total_value: Union[int, float] = Field(
+ description="The aggregated value of all option contract premiums included in the trade."
)
- timestamp: datetime = Field(description="The UTC timestamp of order placement.")
+
+ @field_validator("trade_timestamp", mode="before", check_fields=False)
+ @classmethod
+ def validate_timestamp(cls, v):
+ """Convert the timestamp string to a datetime object."""
+ if v:
+ v = parse(v)
+ v = v.replace(microsecond=0)
+ v = v.astimezone(timezone("America/New_York"))
+ return v
+ return None
+
+ @field_validator("contract_symbol", mode="before", check_fields=False)
+ @classmethod
+ def validate_contract_symbol(cls, v):
+ """Return the symbol as the OCC standard format."""
+ return v.replace("_", "") if v else None
+
+ @field_validator("trade_type", mode="before", check_fields=False)
+ @classmethod
+ def validate_trade_type(cls, v):
+ """Validate the trade type."""
+ if v and "_" in v:
+ v = v.split("_")[-1]
+ return v.lower()
+
+ @field_validator("underlying_price_at_execution", mode="before", check_fields=False)
+ @classmethod
+ def replace_zero(cls, v):
+ """Replace a 0 with None."""
+ if v:
+ return None if v == 0 else v
+ return None
class IntrinioOptionsUnusualFetcher(
Fetcher[IntrinioOptionsUnusualQueryParams, List[IntrinioOptionsUnusualData]]
):
- """Transform the query, extract and transform the data from the Intrinio endpoints."""
+ """Intrinio Unusual Options Fetcher."""
@staticmethod
def transform_query(params: Dict[str, Any]) -> IntrinioOptionsUnusualQueryParams:
@@ -84,23 +234,64 @@ class IntrinioOptionsUnusualFetcher(
data: List = []
base_url = "https://api-v2.intrinio.com/options/unusual_activity"
+
+ query_str = get_querystring(query.model_dump(), ["symbol", "limit"])
+
+ # Page size is capped at 1000 for this endpoint. They don't tell you though.
url = (
- base_url + f"/{query.symbol}?source={query.source}&api_key={api_key}"
+ base_url
+ + f"/{query.symbol}/intraday?{query_str}&page_size=1000&api_key={api_key}"
if query.symbol
- else base_url + f"?source={query.source}&api_key={api_key}"
+ else base_url + f"/intraday?{query_str}&page_size=1000&api_key={api_key}"
)
- response = await get_data_one(url, **kwargs)
- if "trades" in response:
- data = sorted(
- response["trades"], key=lambda x: x["timestamp"], reverse=True
- )
+ data = []
- return data
+ async def response_callback(response: ClientResponse, session: ClientSession):
+ """Async response callback."""
+ results = await response.json()
+ if "trades" in results and len(results.get("trades")) > 0: # type: ignore
+ data.extend(
+ sorted(
+ results["trades"], # type: ignore
+ key=lambda x: x["timestamp"],
+ reverse=True,
+ )
+ )
+ records = len(data)
+ while (
+ "next_page" in results
+ and results.get("next_page") is not None # type: ignore
+ and records < query.limit
+ ):
+ next_page = results["next_page"] # type: ignore
+ next_url = f"{url}&next_page={next_page}"
+ results = await amake_request(next_url, session=session, **kwargs)
+ if (
+ "trades" in results
+ and len(results.get("trades")) > 0 # type: ignore
+ ):
+ data.extend(
+ sorted(
+ results["trades"], # type: ignore
+ key=lambda x: x["timestamp"],
+ reverse=True,
+ )
+ )
+ records = len(data)
+ return data
+
+ return await amake_request(url, response_callback=response_callback, **kwargs) # type: ignore
@staticmethod
def transform_data(
- query: IntrinioOptionsUnusualQueryParams, data: List[Dict], **kwargs: Any
+ query: IntrinioOptionsUnusualQueryParams,
+ data: List[Dict],
+ **kwargs: Any,
) -> List[IntrinioOptionsUnusualData]:
"""Return the transformed data."""
- return [IntrinioOptionsUnusualData.model_validate(d) for d in data]
+ if not data:
+ raise EmptyDataError()
+ return [
+ IntrinioOptionsUnusualData.model_validate(d) for d in data[: query.limit]
+ ]
diff --git a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_balance_sheet_fetcher.yaml b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_balance_sheet_fetcher.yaml
index fd85df10916..28a095a4e3b 100644
--- a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_balance_sheet_fetcher.yaml
+++ b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_balance_sheet_fetcher.yaml
@@ -3,85 +3,30 @@ interactions:
body: null
headers:
Accept:
- - '*/*'
- Accept-Encoding:
- - gzip, deflate, br
- Connection:
- - keep-alive
- method: GET
- uri: https://api-v2.intrinio.com/companies/AAPL/fundamentals?api_key=MOCK_API_KEY&statement_code=balance_sheet_statement&type=annual
- response:
- body:
- string: !!binary |
- H4sIAIoCVGUAA7TX0W7aMBQG4FeZfA2Rj504ju9ajbLR0gKionSaohTcLWsIAUInVvXdd5zRbk2J
- WsWZxE0Sxwmf7HP+PJDbbTqPFjrNo2RD1JcHEs+JMmfD3s3d8TQhLbLJo1ybIeFsOdd49SZKonSm
- w813rfPw+TIOvY03sygJdzpaE8Uo48+nMr2Ol2bqkymOy3eZmWits+U61/M/D1nn4RynIirdJkmL
- 6HS+PyZmpjYN2pwWz0ji9NuLSwBtysaMKSoV8x1K6TUOjDdhgoM2OVH5eqtbZJuZm+blWwHG1FP4
- 49wB6V+Tx9Y/DKvRJIIbOwb2FkNx83sYmGFg7v9moKLM4AWdwYraMUBjDFAweIcYWBtom/kFAyhw
- azMw7jBgJYazHvSPP9ox0MYYaMEgDjFAwSALBlcxWZsBwJGSlxgWq+lw0rNigKApBggKBnmIgRYM
- QcEgFPNqM1DmCIASww6i4enAjkE2xiALhuAAAwohA6eGAZjiwmY1+IH3qjZM0865HYPfGINf2SlQ
- yJRIbwzc1AaX1mfwHU+IEgN0RH9guRpEYwyislOgkGHgYyhKJK/fKZhwGCuXyL6esHvfjsFrjMGr
- LJEoZGqDGDOqXNwX9TcF1gbvFYPoDs56P+0Y3MYY3ILBP8TgPXUKqjgoGthsCjdwSwzu0A2ykR3D
- myny3Qy8slOg0D43YGgA5dXvFFgiXb9cGwbDFe+mdgyNpUhg1Z2C7zsFxdUgbXIDxifgssRwLpdp
- L7BjaCxFAlSXyCJFcjCrgfoK6m8KjBzS3PqCIUo6nUjYMTSWIoFWhmmAvyWSezbxCZgjg3J8ktK9
- Z3ZfmLSxFEmD6k5Bn2oDMmCKBJvVIGiZYTWCHxO7L0zaWIqksrpT4EIBXChmUzBPeRbfFNgpmKkN
- X1tktlxkUbojai+Cx+H5lej+ujCvH8/uNP5DcnQ0OMPjNFqYCY+yLNEfPqczPJXoGM98mlwOTke0
- P7i4lCfdq+MxD8y+nsV3eBFfk3KTgjl5fPwNAAD//wMAk7jnGPMQAAA=
- headers:
- Connection:
- - keep-alive
- Content-Encoding:
- - gzip
- Content-Type:
- application/json
- Date:
- - Tue, 14 Nov 2023 23:28:10 GMT
- Transfer-Encoding:
- - chunked
- Vary:
- - Origin,Accept-Encoding
- status:
- code: 200
- message: OK
-- request:
- body: null
- headers:
- Accept:
- - '*/*'
Accept-Encoding:
- - gzip, deflate, br
+ - gzip, deflate
Connection:
- keep-alive
method: GET
- uri: https://api-v2.intrinio.com/fundamentals/AAPL-balance_sheet_statement-2023-FY/standardized_financials?api_key=MOCK_API_KEY
+ uri: https://api-v2.intrinio.com/companies/AAPL/fundamentals?api_key=MOCK_API_KEY&statement_code=balance_sheet_statement&type=FY
response:
body:
string: !!binary |
- H4sIAIoCVGUAA6yZW3PiNhTHvwrjl7ZTSH3HzkwfyGXTJiwQkk3Ith1G2IpRMbJjy2xMJt+9R9xs
- YxuDpzv7ADqy/P9J5ybyIYQMURsFNllie/xKKKIWQW4onP/1IdiIoTFDjnD+IRBbOBfg87g30m9u
- lkJToGiOYewShdPG35Eoynrj+i0iC+RiykKYsHpSsMAOr8AZk48C+MRX9BhyrSjgX1EY4pU1hMmY
- WrC61BRekcW8AKb+CpYJctHKINh4QhiMRJTwdaLQFj6bArwhAqtsmromrv6diZ/NEhJx1L29ihOS
- h6kXsNYjDuaNP+kCh2yeAQm5mYGVZIzHoij1UBRJM8VKlKfRc/92lKD0PIa3h9LFKMSNIbYwHMDE
- xTsgCpOC9PCxKGpdFLXdrkTpOS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