Utils
yafin.utils
get_types_with_frequency(typ, frequency=None)
Enrich types with frequency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frequency
|
str | None
|
frequency used for timeseries endpoint, e.g.: annual, quarterly or trailing. |
None
|
typ
|
str
|
type of types, e.g.: income_statement, balance_sheet or cash_flow, which is used for fetching all types for given financial. e.g. for income_statement: NetIncome,EBIT,EBITDA,GrossProfit, ... |
required |
Returns:
| Type | Description |
|---|---|
str
|
types enriched with frequency e.g. for income_statement: trailingNetIncome,trailingEBIT,trailingEBITDA,trailingGrossProfit, ... |
Raises:
| Type | Description |
|---|---|
ValueError
|
If frequency or typ are not in list of valid values. |
TrailingBalanceSheetError
|
If attempting to request balance sheet with trailing frequency. |