Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.request.financial
On this pageSignatureParametersReturnsExampleNotes

Data requests / Reference

alerta.request.financial

TradingView-compatible spelling: request.financial, runs without warnings

Requests a fundamental metric (revenue, EPS, capex, …) for a symbol, period by period. There is no historical fundamentals feed behind this: the call is accepted and returns `na`, with a warning, exactly as TradingView does for a symbol it has no data on. Guard the result with `na(...)`. On a stock chart the company's current profile is available as `syminfo.*` — `syminfo.sector`, `syminfo.industry`, `syminfo.country`, `syminfo.shares_outstanding_total`.

alerta.request.financial(symbol, financial_id, period, gaps?, ignore_invalid_symbol?, currency?) → series float — na without a fundamentals feed

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes—Symbol to query, e.g. syminfo.tickerid.
financial_idstringYes—Metric id, e.g. "TOTAL_REVENUE", "CAPITAL_EXPENDITURES".
periodstringYes—Reporting period: "FQ", "FH", "FY", "TTM".
gapsconstNot specified—barmerge.gaps_on / barmerge.gaps_off.
ignore_invalid_symbolboolNot specified—Return na instead of raising for an unavailable symbol.
currencystringNot specified—Convert the result into this currency.

Returns

series float — na without a fundamentals feed

Example

alerta.request.financial
rev = request.financial(syminfo.tickerid, "TOTAL_REVENUE", "FQ", ignore_invalid_symbol = true)plot(na(rev) ? 0 : rev, { title: "Revenue", pane: "oscillator" })

Notes

  • No fundamentals feed: always na plus a warning. The call no longer stops the script.

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.