mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-30 05:03:54 +00:00
crypto historical
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ###
|
||||
|
||||
import datetime
|
||||
from typing import Literal, Optional, Union
|
||||
from typing import List, Literal, Optional, Union
|
||||
|
||||
from openbb_core.app.model.custom_parameter import OpenBBCustomParameter
|
||||
from openbb_core.app.model.obbject import OBBject
|
||||
@@ -23,7 +23,7 @@ class ROUTER_crypto_price(Container):
|
||||
def historical(
|
||||
self,
|
||||
symbol: Annotated[
|
||||
str,
|
||||
Union[str, List[str]],
|
||||
OpenBBCustomParameter(
|
||||
description="Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format."
|
||||
),
|
||||
@@ -139,5 +139,8 @@ class ROUTER_crypto_price(Container):
|
||||
"end_date": end_date,
|
||||
},
|
||||
extra_params=kwargs,
|
||||
extra_info={
|
||||
"symbol": {"multiple_items_allowed": {"yfinance", "fmp", "polygon"}}
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
@@ -24,6 +24,7 @@ class FMPCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
|
||||
"""
|
||||
|
||||
__alias_dict__ = {"start_date": "from", "end_date": "to"}
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
timeseries: Optional[NonNegativeInt] = Field(
|
||||
default=None, description="Number of days to look back."
|
||||
|
||||
@@ -36,6 +36,8 @@ class PolygonCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
|
||||
Source: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: str = Field(
|
||||
default="1d", description=QUERY_DESCRIPTIONS.get("interval", "")
|
||||
)
|
||||
|
||||
@@ -26,6 +26,8 @@ class YFinanceCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
|
||||
Source: https://finance.yahoo.com/crypto/
|
||||
"""
|
||||
|
||||
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
|
||||
|
||||
interval: Optional[INTERVALS] = Field(default="1d", description="Data granularity.")
|
||||
period: Optional[PERIODS] = Field(
|
||||
default="max", description=QUERY_DESCRIPTIONS.get("period", "")
|
||||
|
||||
Reference in New Issue
Block a user