Skip to content

Commit

Permalink
Make Intrinio options chains great again (#5540)
Browse files Browse the repository at this point in the history
* add multithreading

* cleanup

* linting

* use dateutil.parser

* removed `TICKER_EXCEPTIONS`

* modified `date` and `type` fields in standard model

* set alias for `date` and `type` to match standards

* static

* static
  • Loading branch information
the-praxs authored Oct 12, 2023
1 parent 2d8c35d commit 64bdd02
Show file tree
Hide file tree
Showing 17 changed files with 3,747 additions and 113 deletions.
39 changes: 38 additions & 1 deletion openbb_platform/openbb/package/__extensions__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,38 @@ class Extensions(Container):
"""
Routers:
/crypto
/econometrics
/economy
/fixedincome
/forex
/futures
/news
/qa
/stocks
/ta
Extensions:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected] """
- [email protected]
- [email protected]
- [email protected] """
# fmt: on
def __repr__(self) -> str:
return self.__doc__ or ""
Expand All @@ -38,6 +51,12 @@ def crypto(self): # route = "/crypto"

return crypto.ROUTER_crypto(command_runner=self._command_runner)

@property
def econometrics(self): # route = "/econometrics"
from . import econometrics

return econometrics.ROUTER_econometrics(command_runner=self._command_runner)

@property
def economy(self): # route = "/economy"
from . import economy
Expand All @@ -56,14 +75,32 @@ def forex(self): # route = "/forex"

return forex.ROUTER_forex(command_runner=self._command_runner)

@property
def futures(self): # route = "/futures"
from . import futures

return futures.ROUTER_futures(command_runner=self._command_runner)

@property
def news(self): # route = "/news"
from . import news

return news.ROUTER_news(command_runner=self._command_runner)

@property
def qa(self): # route = "/qa"
from . import qa

return qa.ROUTER_qa(command_runner=self._command_runner)

@property
def stocks(self): # route = "/stocks"
from . import stocks

return stocks.ROUTER_stocks(command_runner=self._command_runner)

@property
def ta(self): # route = "/ta"
from . import ta

return ta.ROUTER_ta(command_runner=self._command_runner)
12 changes: 7 additions & 5 deletions openbb_platform/openbb/package/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def load(
description="End date of the data, in YYYY-MM-DD format."
),
] = None,
provider: Union[Literal["fmp", "polygon"], None] = None,
provider: Union[Literal["fmp", "polygon", "yfinance"], None] = None,
**kwargs
) -> OBBject[List[Data]]:
"""Crypto Historical Price.
Expand All @@ -54,14 +54,14 @@ def load(
Start date of the data, in YYYY-MM-DD format.
end_date : Union[datetime.date, None]
End date of the data, in YYYY-MM-DD format.
provider : Union[Literal['fmp', 'polygon'], None]
provider : Union[Literal['fmp', 'polygon', 'yfinance'], None]
The provider to use for the query, by default None.
If None, the provider specified in defaults is selected or 'fmp' if there is
no default.
timeseries : Optional[Union[typing_extensions.Annotated[int, Ge(ge=0)]]]
Number of days to look back. (provider: fmp)
interval : Literal['1min', '5min', '15min', '30min', '1hour', '4hour', '1day']
Data granularity. (provider: fmp)
interval : Optional[Union[Literal['1min', '5min', '15min', '30min', '1hour', '4hour', '1day'], Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']]]
Data granularity. (provider: fmp, yfinance)
multiplier : int
Multiplier of the timespan. (provider: polygon)
timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year']
Expand All @@ -72,13 +72,15 @@ def load(
The number of data entries to return. (provider: polygon)
adjusted : bool
Whether the data is adjusted. (provider: polygon)
period : Optional[Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']]]
Period of the data to return. (provider: yfinance)
Returns
-------
OBBject
results : Union[List[CryptoHistorical]]
Serializable results.
provider : Union[Literal['fmp', 'polygon'], None]
provider : Union[Literal['fmp', 'polygon', 'yfinance'], None]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
Expand Down
Loading

0 comments on commit 64bdd02

Please sign in to comment.