MarketStatus
This interface can tell if equity markets are currently open, partially open, or closed.
#
MarketStatus.getReturns the current open status of the market (U.S. only)
status | description |
---|---|
UNKNOWN | Failed to determine status for some reason. |
FULL_DAY | Normal trading day (9:30 AM - 4:00 PM EST) |
PARTIAL_1PM | Early closing trading day (9:30 AM - 1:00 PM EST) |
AFTER_HOURS | After market trading (4:00 PM - 7:00 PM EST) |
BEFORE_HOURS | Pre-market hour (6:00 AM? - 9:30 AM) |
CLOSED | Markets are currently closed. |
CLOSED_WEEKEND | Markets are closed for the weekend. |
- JavaScript
- Python
#
MarketStatus.isMarketOpenConvenience function to test if the market is open for trading or closed (for whatever reason).
result | description |
---|---|
true | Market is currently open and we can trade. |
false | Market is currently closed. It could be for any reason, we cannot trade. |
- JavaScript
- Python