Last Price (On Demand)
Gets the last traded price on-demand (snapshot) from QuoteMedia. Unlike streaming functions, this retrieves a single value when the formula calculates.
Supported Symbol Formats
| Type | Format | Example |
|---|---|---|
| US Stocks | SYMBOL | AAPL, MSFT |
| ETFs | SYMBOL | SPY, QQQ |
| Indices | ^SYMBOL | ^SPX, ^VIX |
| Options | OCC Symbol | AAPL240315C00170000 |
Notes
- Returns a snapshot (does not auto-update)
- Recalculates when workbook refreshes
- Useful when streaming is not needed
Examples
When to Use
- One-time price lookups
- Static reports and snapshots
- When streaming is not needed
- Reducing data subscription load
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Need streaming updates | QM_Stream_Last() |
| Need historical price | Close_Historical() |
| Need non-QuoteMedia data | Last() |
| Need pre/post market | QM_Stream_PreMarketLast() |
Common Issues & FAQ
Q: Why doesn't the price update automatically?
A: This is an on-demand function. It only updates when the cell recalculates. Use QM_Stream_Last() for auto-updating.
Q: What's the difference between QM_Last and Last?
A: QM_Last() uses QuoteMedia data; Last() may use a different data source. Both are on-demand.
Q: Why am I getting #N/A? A: Check that symbol format is correct.
