Skip to content

Commit

Permalink
Merge branch 'develop' into feature/websockets
Browse files Browse the repository at this point in the history
  • Loading branch information
deeleeramone authored Dec 5, 2024
2 parents 726b4c7 + e787e13 commit 429e036
Show file tree
Hide file tree
Showing 14 changed files with 23,543 additions and 709 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ def test_economy_indicators(params, headers):
"params",
[
({"provider": "econdb", "use_cache": False}),
({"provider": "imf", "query": "balance sheet;households;debt"}),
],
)
@pytest.mark.integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ def test_economy_country_profile(params, obb):
"params",
[
({"provider": "econdb", "use_cache": False}),
({"provider": "imf", "query": "balance sheet;households;debt"}),
],
)
@pytest.mark.integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,24 @@ async def available_indicators(
"frequency": "annual",
},
),
APIEx(
description=(
"When the provider is 'imf', additional presets return the core Financial Soundness Indicators."
"\n 'fsi_core' - Core FSIs"
"\n 'fsi_encouraged_set' - Encouraged Set of FSIs,"
"\n 'fsi_core_underlying' - Underlying data for the Core FSIs."
"\n 'fsi_other' - Additional/Other FSIs that are not in the Core or Encouraged Set."
"\n 'fsi_all' - all FSI data for a single country."
),
parameters={
"provider": "imf",
"symbol": "fsi_encouraged_set",
"country": "us,fr,gb",
"start_date": "2022-01-01",
"end_date": "2023-12-31",
"frequency": "annual",
},
),
],
)
async def indicators(
Expand Down
53 changes: 47 additions & 6 deletions openbb_platform/openbb/assets/reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -7679,7 +7679,16 @@
"choices": null
}
],
"imf": []
"imf": [
{
"name": "query",
"type": "Union[str, List[str]]",
"description": "The query string to search through the available indicators. Use semicolons to separate multiple terms. Multiple items allowed for provider(s): imf.",
"default": null,
"optional": true,
"choices": null
}
]
},
"returns": {
"OBBject": [
Expand Down Expand Up @@ -7828,6 +7837,14 @@
}
],
"imf": [
{
"name": "dataset",
"type": "str",
"description": "The IMF dataset associated with the symbol.",
"default": null,
"optional": true,
"choices": null
},
{
"name": "table",
"type": "str",
Expand All @@ -7846,11 +7863,27 @@
},
{
"name": "order",
"type": "int",
"type": "Union[int, float]",
"description": "Order of the data, relative to the table.",
"default": null,
"optional": true,
"choices": null
},
{
"name": "children",
"type": "str",
"description": "The symbol of the child data, if any.",
"default": null,
"optional": true,
"choices": null
},
{
"name": "unit",
"type": "str",
"description": "The unit of the data.",
"default": null,
"optional": true,
"choices": null
}
]
},
Expand All @@ -7862,7 +7895,7 @@
"message": null
},
"description": "Get economic indicators by country and indicator.",
"examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.economy.indicators(provider='econdb', symbol=PCOCO)\n# Enter the country as the full name, or iso code. Use `available_indicators()` to get a list of supported indicators from EconDB.\nobb.economy.indicators(symbol=CPI, country='united_states,jp', provider='econdb')\n# Use the `main` symbol to get the group of main indicators for a country.\nobb.economy.indicators(provider='econdb', symbol=main, country='eu')\n# When the provider is 'imf', the absence of a symbol will default to 'irfcl_top_lines'. Use 'IRFCL' to get all the data from the set of indicators.\nobb.economy.indicators(provider='imf')\n# When the provider is 'imf', complete tables are returned by using a 'preset'. Refer to the function's docstring for descriptions of each preset. When no country is supplied, the data is returned for all countries.\nobb.economy.indicators(provider='imf', symbol=gold_reserves)\n# When the provider is 'imf', multiple countries and symbols can be supplied. Enter countries as a two-letter ISO country code, or the country name in lower_snake_case.\nobb.economy.indicators(provider='imf', symbol=RAFA_USD,RAPFA_USD,RAFA_RAPFA_RO, country='us,china,jp,4f,gb', start_date='2010-01-01', end_date='2020-12-31', frequency=annual)\n```\n\n",
"examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.economy.indicators(provider='econdb', symbol=PCOCO)\n# Enter the country as the full name, or iso code. Use `available_indicators()` to get a list of supported indicators from EconDB.\nobb.economy.indicators(symbol=CPI, country='united_states,jp', provider='econdb')\n# Use the `main` symbol to get the group of main indicators for a country.\nobb.economy.indicators(provider='econdb', symbol=main, country='eu')\n# When the provider is 'imf', the absence of a symbol will default to 'irfcl_top_lines'. Use 'IRFCL' to get all the data from the set of indicators.\nobb.economy.indicators(provider='imf')\n# When the provider is 'imf', complete tables are returned by using a 'preset'. Refer to the function's docstring for descriptions of each preset. When no country is supplied, the data is returned for all countries.\nobb.economy.indicators(provider='imf', symbol=gold_reserves)\n# When the provider is 'imf', multiple countries and symbols can be supplied. Enter countries as a two-letter ISO country code, or the country name in lower_snake_case.\nobb.economy.indicators(provider='imf', symbol=RAFA_USD,RAPFA_USD,RAFA_RAPFA_RO, country='us,china,jp,4f,gb', start_date='2010-01-01', end_date='2020-12-31', frequency=annual)\n# When the provider is 'imf', additional presets return the core Financial Soundness Indicators.\n 'fsi_core' - Core FSIs\n 'fsi_encouraged_set' - Encouraged Set of FSIs,\n 'fsi_core_underlying' - Underlying data for the Core FSIs.\n 'fsi_other' - Additional/Other FSIs that are not in the Core or Encouraged Set.\n 'fsi_all' - all FSI data for a single country.\nobb.economy.indicators(provider='imf', symbol=fsi_encouraged_set, country='us,fr,gb', start_date='2022-01-01', end_date='2023-12-31', frequency=annual)\n```\n\n",
"parameters": {
"standard": [
{
Expand Down Expand Up @@ -8145,15 +8178,15 @@
{
"name": "symbol",
"type": "Union[str, List[str]]",
"description": "Symbol to get data for. Use `available_indicators()` to get the list of available symbols. Use 'IRFCL' to get all the data from the set of indicators. Complete tables are available only by single country, and are keyed as described below. The default is 'irfcl_top_lines'. Available presets not listed in `available_indicators()` are:\n\n 'IRFCL': All the data from the set of indicators. Not compatible with multiple countries.\n 'irfcl_top_lines': The default, top line items from the IRFCL data. Compatible with multiple countries.\n 'reserve_assets_and_other_fx_assets': Table I of the IRFCL data. Not compatible with multiple countries.\n 'predetermined_drains_on_fx_assets': Table II of the IRFCL data. Not compatible with multiple countries.\n 'contingent_drains_fx_assets': Table III of the IRFCL data. Not compatible with multiple countries.\n 'memorandum_items': The memorandum items table of the IRFCL data. Not compatible with multiple countries.\n 'gold_reserves': Gold reserves as value in USD and Fine Troy Ounces. Compatible with multiple countries.\n 'derivative_assets': Net derivative assets as value in USD. Compatible with multipile countries. Multiple items allowed for provider(s): imf.",
"description": "Symbol to get data for. Use `available_indicators()` to get the list of available symbols. Use 'IRFCL' to get all the data from International Reserves & Foreign Currency Liquidity indicators. Use 'core_fsi' to get the core Financial Soundness Indicators. Use 'core_fsi_underlying' to include underlying data for the core Financial Soundness Indicators. Complete tables are available only by single country, and are keyed as described below. The default is 'irfcl_top_lines'. Available presets not listed in `available_indicators()` are:\n\n 'IRFCL': All the data from the set of indicators. Not compatible with multiple countries.\n 'irfcl_top_lines': The default, top line items from the IRFCL data. Compatible with multiple countries.\n 'reserve_assets_and_other_fx_assets': Table I of the IRFCL data. Not compatible with multiple countries.\n 'predetermined_drains_on_fx_assets': Table II of the IRFCL data. Not compatible with multiple countries.\n 'contingent_drains_fx_assets': Table III of the IRFCL data. Not compatible with multiple countries.\n 'memorandum_items': The memorandum items table of the IRFCL data. Not compatible with multiple countries.\n 'gold_reserves': Gold reserves as value in USD and Fine Troy Ounces. Compatible with multiple countries.\n 'derivative_assets': Net derivative assets as value in USD. Compatible with multipile countries.\n 'fsi_core': The core Financial Soundness Indicators. Compatible with multiple countries.\n 'fsi_core_underlying': The core FSIs underlying series data. Not compatible with country='all'.\n 'fsi_encouraged_set': The encouraged set of Financial Soundness Indicators. Not compatible with country='all'.\n 'fsi_other': The other Financial Soundness Indicators. Not compatible with country='all'.\n 'fsi_balance_sheets': Data categorized as Balance Sheets and Income Statements. Not compatible with country='all'.\n 'fsi_all': All the Financial Soundness Indicators. Not compatible with multiple countries. Multiple items allowed for provider(s): imf.",
"default": "irfcl_top_lines",
"optional": true,
"choices": null
},
{
"name": "frequency",
"type": "Literal['annual', 'quarter', 'month']",
"description": "Frequency of the data.",
"description": "Frequency of the data, default is 'quarter'.",
"default": "quarter",
"optional": true,
"choices": [
Expand Down Expand Up @@ -8238,6 +8271,14 @@
],
"econdb": [],
"imf": [
{
"name": "unit",
"type": "str",
"description": "The unit of the value.",
"default": null,
"optional": true,
"choices": null
},
{
"name": "scale",
"type": "str",
Expand All @@ -8264,7 +8305,7 @@
},
{
"name": "order",
"type": "int",
"type": "Union[int, float]",
"description": "Order of the data, relative to the table.",
"default": null,
"optional": true,
Expand Down
Loading

0 comments on commit 429e036

Please sign in to comment.