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 feedParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | Yes | — | Symbol to query, e.g. syminfo.tickerid. |
financial_id | string | Yes | — | Metric id, e.g. "TOTAL_REVENUE", "CAPITAL_EXPENDITURES". |
period | string | Yes | — | Reporting period: "FQ", "FH", "FY", "TTM". |
gaps | const | Not specified | — | barmerge.gaps_on / barmerge.gaps_off. |
ignore_invalid_symbol | bool | Not specified | — | Return na instead of raising for an unavailable symbol. |
currency | string | Not specified | — | Convert the result into this currency. |
Returns
series float — na without a fundamentals feedExample
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.