Sidechair

request.dividends()

Browse the reference

Requests dividend data for a symbol, such as the gross or net amount of the latest payment.

Try it in the editor

request.dividends returns a figure from the most recent dividend as of each bar. The value holds until the next dividend is declared or paid.

Set field to dividends.gross for the amount before tax, dividends.net for the amount after tax, or dividends.future_amount for the announced next payment.

Syntax

Pine Script
request.dividends(ticker: series string, field: series string (optional), gaps: simple barmerge_gaps (optional), lookahead: simple barmerge_lookahead (optional), ignore_invalid_symbol: input bool (optional), currency: series string (optional)) -> series float

Arguments

NameTypeDefaultDescription
tickerseries stringrequiredThe symbol to read. syminfo.tickerid is the chart's own symbol.
fieldseries stringdividends.grossWhich figure to return: dividends.gross, dividends.net or dividends.future_amount.
gapssimple barmerge_gapsbarmerge.gaps_offbarmerge.gaps_on leaves na between payments. barmerge.gaps_off carries the last value forward.
lookaheadsimple barmerge_lookaheadbarmerge.lookahead_offbarmerge.lookahead_off waits for a payment to be on record. barmerge.lookahead_on stamps each payment onto the earlier bars of its period, which uses data from the future.
ignore_invalid_symbolinput boolfalseWhen true, an unknown symbol returns na.
currencyseries stringthe symbol's own currencyCurrency to convert the amount to.

Returns

series float: the dividend figure, or na where the symbol pays none.

Remarks

  • Divide by close to express the payment as a yield.
  • On Sidechair: dividend data is not available yet. The call warns once and returns na.

Example

Pine ScriptLatest dividend yieldOpen in editor
//@version=6
indicator("Dividend yield")
div = request.dividends(syminfo.tickerid, dividends.gross)
plot(100 * div / close, "Yield %", color = color.teal)

See also

Not on Sidechair yet