Last Trade DateTime (On Demand)
Returns the date and time of the most recent trade for a stock or option using QuoteMedia's on-demand data service.
Supported Symbol Formats
| Type | Format | Example |
|---|---|---|
| US Stocks | SYMBOL | AAPL, MSFT |
| ETFs | SYMBOL | SPY, QQQ |
| Options (OCC) | SYMBOL+YYMMDD+C/P+STRIKE | AAPL240315C00170000 |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Symbol | String | Yes | Stock ticker or OCC option symbol |
Notes
- Returns datetime in local market time
- Useful for checking data freshness
- Can help identify illiquid securities (stale trade times)
Syntax
=QM_LastTradeDateTime(Symbol)Parameters
symbolstringRequired
Stock ticker or option symbol
Returns
string
Date and time of the last trade
Examples
=QM_LastTradeDateTime("AAPL")=QM_LastTradeDateTime("SPY")=QM_LastTradeDateTime("AAPL240315C00170000")=QM_LastTradeDateTime(A1)When to Use
- Verify data freshness
- Check when a security last traded
- Identify illiquid securities
- Timestamp trading data
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Only need last price | QM_Last() or Last() |
| Need historical trades | QM_GetHistory() |
| Need streaming timestamps | QM_Stream_* functions |
Common Issues & FAQ
Why is the timestamp old?
This could indicate:
- Market is closed
- Illiquid security with infrequent trades
- Data is from previous trading session
What timezone is the timestamp in?
Timestamps are typically in Eastern Time (ET) for US markets.
Related Formulas
More MarketXLS Price Quotes formulas you can use in the same worksheet:
