The Scenario
You manage a retirement portfolio of 20 dividend-paying stocks and every January you pull the prior year's dividend history to calculate actual income received per position. It's the same task every year: find the ex-dates, the payment amounts, the pay dates, and total them up. You've been doing it by hand — logging into each brokerage statement, cross-referencing with Polygon's data, typing the numbers into a sheet row by row.
The bad version:
- Open Polygon's dividend endpoint for the first ticker.
- Find the last 8 to 10 dividend records, extract ex-date, cash amount, and pay date, paste into adjacent columns.
- Realize two tickers made special dividends last year that need to be labeled differently in the sheet.
- Decide whether to include or exclude them from the income total, then repeat the pull for the remaining 19 tickers.
It's not complicated. It's just long and manual in a way that has no business taking two hours of anyone's January.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent inside your Excel workbook that reads Polygon's dividend history endpoints and writes the records directly into your layout.
For each ticker in column A, fetch the last 8 dividend payments from Polygon and write the ex-date, cash amount per share, and pay date into adjacent columns B, C, and D.
What You Get
- For each ticker: up to 8 rows of dividend records with columns Ex-Date, Cash Amount Per Share, Pay Date.
- Records sorted by ex-date descending (most recent first) within each ticker block.
- Special or extraordinary dividends flagged with a note in a fifth column if Polygon identifies them as such.
- Tickers with fewer than 8 dividend records listed with however many are available, with a note on the last row.
What If the Data Is Not Quite Ready
I need the last 12 months instead of the last 8 records
Pull all dividend payments from Polygon for the tickers in column A for the last 12 months and import them into a Dividend History sheet sorted by ex-date descending.
I want to calculate total income per position, not just list the payments
For each ticker in column A, fetch all dividend payments from Polygon for the last 12 months, multiply each payment by the share count in column B, and write total annual dividend income per position into column C.
Some tickers changed their dividend mid-year — I need to see each payment separately, not just the most recent rate
For each ticker in column A, pull every dividend payment from Polygon for the calendar year 2025 and write each payment as a separate row with ex-date, amount, and pay date — do not summarize or average.
Fetch all dividends, flag any payment lower than the prior one as a cut, and highlight those rows
For each ticker in column A, pull the last 8 dividend payments from Polygon sorted by ex-date ascending, flag any payment where the per-share amount is lower than the previous payment as a "dividend cut" in column E, and highlight those rows in yellow.
The single-prompt approach handles the historical pull, the comparison logic, and the formatting together.
Try It
Get the 7-day free trial of SheetXAI and open any Excel workbook where you track your dividend portfolio, then ask it to pull payment history from Polygon for your full position list. You might also want to look at pulling stock split history to make sure your per-share income calculations are using correctly adjusted share counts.
