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)
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
Q: Why is the timestamp old? A: This could indicate:
- Market is closed
- Illiquid security with infrequent trades
- Data is from previous trading session
Q: What timezone is the timestamp in? A: Timestamps are typically in Eastern Time (ET) for US markets.
