Sidechair

request.financial()

Browse the reference

Requests a financial statement figure for a symbol, such as revenue or net income, for a chosen reporting period.

Try it in the editor

request.financial returns one line of a company's financial statements, identified by a code such as "TOTAL_REVENUE" or "NET_INCOME". The value stays constant between report dates.

The period argument chooses the reporting basis: "FQ" for the fiscal quarter, "FY" for the fiscal year, "FH" for the half year or "TTM" for the trailing twelve months.

Syntax

Pine Script
request.financial(symbol: series string, financial_id: series string, period: series string, gaps: simple barmerge_gaps (optional), ignore_invalid_symbol: input bool (optional), currency: series string (optional)) -> series float

Arguments

NameTypeDefaultDescription
symbolseries stringrequiredThe company's symbol. syminfo.tickerid is the chart's own symbol.
financial_idseries stringrequiredCode of the figure to return, such as "TOTAL_REVENUE".
periodseries stringrequiredReporting period: "FQ", "FH", "FY" or "TTM".
gapssimple barmerge_gapsbarmerge.gaps_offbarmerge.gaps_on leaves na between reports. barmerge.gaps_off carries the last value forward.
ignore_invalid_symbolinput boolfalseWhen true, an unknown symbol returns na.
currencyseries stringthe symbol's own currencyCurrency to convert the figure to.

Returns

series float: the figure for the period, or na where the company has not reported it.

Remarks

  • Funds, forex and crypto symbols have no statements and return na.
  • On Sidechair: fundamental data is not available yet. The call warns once and returns na.

Example

Pine ScriptRevenue per share, trailingOpen in editor
//@version=6
indicator("Revenue")
revenue = request.financial(syminfo.tickerid, "TOTAL_REVENUE", "TTM")
plot(revenue, "Revenue (TTM)", color = color.blue, style = plot.style_stepline)

See also

Not on Sidechair yet