Data requests / Reference
alerta.request.economic
TradingView-compatible spelling: request.economic, runs without warnings
Pine v6: an economic series of a country — the ECONOMICS:<country><field> symbol — read at the chart's timeframe. AlertaChart carries the US headline series: GDP (USGDP), IRYY inflation rate (USIRYY), INTR interest rate (USINTR), UR unemployment rate (USUR), BOT balance of trade (USBOT) and DEBT government debt (USDEBT), monthly. Any other country or field returns na with a warning.
alerta.request.economic(country_code, field, gaps?, ignore_invalid_symbol?) → series floatParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
country_code | simple string | Yes | — | Two-letter country code, e.g. "US". |
field | simple string | Yes | — | Series code, e.g. "GDP", "IRYY", "INTR", "UR". |
gaps | bool | Not specified | — | barmerge.gaps_on shows the value only on the bar it arrives. |
ignore_invalid_symbol | bool | Not specified | — | Return na instead of raising for an unavailable series. |
Returns
series floatExample
alerta.request.economic
indicator("US inflation", overlay=false)plot(request.economic("US", "IRYY"), "Inflation YoY %")Notes
- Requires the requested economic series; unavailable series return na.
Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.