mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 04:52:07 +00:00
* feat: balancesheet
* feat: income statement
* fix: cash flow statement
* feat: financial ratios
* feat: reported financials
* feat: revenue business line
* feat: revenue per geography
* fix: warnings
* Update balance_sheet.py
* fix: remove warning imports
* feat: balance sheet growth
* feat: calendar ipo
* feat: cashflow growth
* feat: __validators__
* fix: typing
* fix: validator msg
* feat: trailing dividend_yield
* feat: short volume
* feat: share statistics
* feat: price target + consensus
* fix: update validator
* feat: historical dividends
* feat: key executives
* fix: getattr directly
* fix: type hint validator
* fix: add default to getattr
* typo
* feat: otc
* feat: options chains
* fix: remove list validators
* feat: add validator dict to fetchers
* lint
* update standard models
* lint
* feat: rename validator
* fix: ownership
* feat: query params description
* fix: balance yfinance
* key execs, income statement
* remove change
* fix: revenue geographic
* fix: disable pylint
* fix: unusual + balance
* unit test validator
* minor fix
* explicit validators
* update test
* feat: multiple items allowed
* rebuild
* move check_single_value
* crypto historical
* order providers
* fix typing
* rename extra dict
* marking multiple items allowed
* Revert "marking multiple items allowed"
This reverts commit 7da04817e1.
* error msg
* fix: default provider runtime vs configuration
* minor fix
* docstring
* revert default changes
* get provider before executing cmd
* fix container bug
* clean filter
* add comment
* prevent bad defaults
* update docstring
* typing
* fix
* black
* fix docstring generation
* [Feature] - Mark multiple item fetchers (#6074)
* feat: price target
* bezinga company news
* equity quote
* marking multiple items allowed
* more multiple items
* black
* rebuild
* another batch
* rebuild
* another
* cpi
* move prop
* rebuild
---------
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
* rename var
* update msg
* rename func
* fix test
* mypy
* ruff
---------
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
100 lines
3.0 KiB
Python
100 lines
3.0 KiB
Python
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
|
|
|
|
from typing import Literal, Optional
|
|
|
|
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
|
from openbb_core.app.model.obbject import OBBject
|
|
from openbb_core.app.static.container import Container
|
|
from openbb_core.app.static.utils.decorators import validate
|
|
from openbb_core.app.static.utils.filters import filter_inputs
|
|
from typing_extensions import Annotated
|
|
|
|
|
|
class ROUTER_crypto(Container):
|
|
"""/crypto
|
|
/price
|
|
search
|
|
"""
|
|
|
|
def __repr__(self) -> str:
|
|
return self.__doc__ or ""
|
|
|
|
@property
|
|
def price(self):
|
|
# pylint: disable=import-outside-toplevel
|
|
from . import crypto_price
|
|
|
|
return crypto_price.ROUTER_crypto_price(command_runner=self._command_runner)
|
|
|
|
@validate
|
|
def search(
|
|
self,
|
|
query: Annotated[
|
|
Optional[str], OpenBBCustomParameter(description="Search query.")
|
|
] = None,
|
|
provider: Optional[Literal["fmp"]] = None,
|
|
**kwargs
|
|
) -> OBBject:
|
|
"""Search available cryptocurrency pairs within a provider.
|
|
|
|
Parameters
|
|
----------
|
|
query : Optional[str]
|
|
Search query.
|
|
provider : Optional[Literal['fmp']]
|
|
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.
|
|
|
|
Returns
|
|
-------
|
|
OBBject
|
|
results : List[CryptoSearch]
|
|
Serializable results.
|
|
provider : Optional[Literal['fmp']]
|
|
Provider name.
|
|
warnings : Optional[List[Warning_]]
|
|
List of warnings.
|
|
chart : Optional[Chart]
|
|
Chart object.
|
|
extra: Dict[str, Any]
|
|
Extra info.
|
|
|
|
CryptoSearch
|
|
------------
|
|
symbol : str
|
|
Symbol representing the entity requested in the data. (Crypto)
|
|
name : Optional[str]
|
|
Name of the crypto.
|
|
currency : Optional[str]
|
|
The currency the crypto trades for. (provider: fmp)
|
|
exchange : Optional[str]
|
|
The exchange code the crypto trades on. (provider: fmp)
|
|
exchange_name : Optional[str]
|
|
The short name of the exchange the crypto trades on. (provider: fmp)
|
|
|
|
Example
|
|
-------
|
|
>>> from openbb import obb
|
|
>>> obb.crypto.search()
|
|
>>> obb.crypto.search("BTCUSD")
|
|
>>> obb.crypto.search("ETH-USD")
|
|
""" # noqa: E501
|
|
|
|
return self._run(
|
|
"/crypto/search",
|
|
**filter_inputs(
|
|
provider_choices={
|
|
"provider": self._get_provider(
|
|
provider,
|
|
"/crypto/search",
|
|
("fmp",),
|
|
)
|
|
},
|
|
standard_params={
|
|
"query": query,
|
|
},
|
|
extra_params=kwargs,
|
|
)
|
|
)
|