Log daily ticker quotes into a Notion database
A Alpha Vantage + Notion agent flow
By the time you open a brokerage app at 4:05pm, the close is already a number you have to write down somewhere or forget. This recipe keeps a dated price journal for a small watchlist without you copying anything. The agent calls GLOBAL_QUOTE once per ticker, reads the latest price, change, and volume, and writes one Notion page per symbol per day with notion-create-pages. Alpha Vantage answers when the agent asks; it never pushes. So the agent runs after the bell, or on whatever cadence you pick, and a quote it has already logged for that date is skipped. Over weeks the database becomes a queryable record of where each name has been.
The flow
GLOBAL_QUOTEReturns the latest price and volume quote for a ticker.
notion-create-pagesCreates one or more Notion pages with specified properties and content.
Step by step
- Loop the watchlist
The agent holds your list of tickers and calls GLOBAL_QUOTE once per symbol. Each call returns the latest price, the day's change and percent change, and volume for that one ticker.
- Diff against today's rows
Query the Notion database for pages already dated today. Symbols with a row are skipped, so a re-run after a network blip doesn't double-log the same close.
- Write one page per symbol
For each new quote, notion-create-pages adds a page carrying the ticker, the close price, the change, the volume, and the quote date as typed properties.
Tell your agent
Every weekday at 4:10pm Eastern, pull the latest GLOBAL_QUOTE for each ticker on my watchlist and add a row to my Notion prices database with the price, change, volume, and date. Skip any symbol already logged for today.
Setup
This flow needs both servers connected to your agent. Follow each install guide:
Worth knowing
- GLOBAL_QUOTE is one ticker per call, so the agent loops the watchlist and makes one request each. Alpha Vantage's free tier caps requests per minute, so a long list needs the agent to space the calls rather than fire them in parallel.
- notion-create-pages writes into a database whose schema you define first. Map price and change to number properties and the quote date to a date property, or the page lands without those fields populated.
- The quote reflects the most recent trading session, not a live tick. Run after the close so the number you log is the settled price, and dedupe on the trading date rather than the wall-clock time you happened to run.
Questions
- Can it store intraday prices instead of just the close?
- GLOBAL_QUOTE returns a single latest snapshot, so to capture intraday points the agent would run several times a day and timestamp each row. For a true bar series, TIME_SERIES_INTRADAY is the better source, but that is a different shape of data and a heavier write.
- What happens on a market holiday?
- GLOBAL_QUOTE returns the prior session's quote when markets are closed. Have the agent compare the returned trading date to the calendar date, and skip the write if the quote hasn't advanced, so holidays don't create duplicate rows.