Skip to content
Algo Trade Analytics Docs

request.economic() - Pine Script Function

Requests economic data for a symbol. Economic data includes information such as the state of a country’s economy (GDP, inflation rate, etc.) or of a particular industry (steel production, ICU beds, etc.).

request.economic(country_code, field, gaps, ignore_invalid_symbol) → series float
NameTypeDescription
country_codeseries stringThe code of the country (e.g. “US”) or the region (e.g. “EU”) for which the economic data is requested. The Help Center article lists the countries and their codes. The countries for which information is available vary with metrics. The Help Center article for each metric lists the countries for which the metric is available.

Requested series.

  • Economic data can also be accessed from charts, just like a regular symbol. Use “ECONOMIC” as the exchange name and {country_code}{field} as the ticker. The name of US GDP data is thus “ECONOMIC:USGDP”.
//@version=6
indicator("US GDP")
e = request.economic("US", "GDP")
plot(e)