# Market Status

# Real-Time Market Status

The Real-Time Status API tells you:

  • If a market is open or closed right now
  • When the market opens or closes next
  • The current trading phase (pre-, post-trading session, etc)
  • If there is currently a holiday or irregular schedule

This is the same API we use to power Tradinghours.com!

# What is this API

The Market Status API can be used to many purposes, including:

  • Building Dashboards,
  • Adding countdowns or market status indicators to your website or application,
  • Activating trading algorithms when markets open,
  • Detecting market holidays and early closures,
  • and much more.

This API takes holidays and half-days into account but does not factor in circuit breakers or halts.

# Examples

http://api.tradinghours.com/v3/markets/status?fin_id=us.nyse

Bulk API requests are also supported

http://api.tradinghours.com/v3/markets/status?fin_id=us.nyse,jp.jpx

CSV format is also supported

http://api.tradinghours.com/v3/markets/status?fin_id=us.nyse,jp.jpx&format=csv

# Response

{
   "data":{
      "US.NYSE":{
         "fin_id":"US.NYSE",
         "exchange":"New York Stock Exchange",
         "market":"Canonical",
         "products":null,
         "local_time":"2020-11-27T11:55:00-05:00",
         "status":"Open",
         "reason":"Market Holiday - Primary Trading Session (Partial)",
         "until":"2020-11-27T12:45:00-05:00",
         "next_bell":"2020-11-27T13:00:00-05:00"
      }
   },
   "meta":{
      "utc_time":"2020-11-27T16:55:00+00:00",
      "time":"2020-11-27T12:55:00-04:00"
   }
}
{
    "data": {
        "JP.JPX": {
            "fin_id": "JP.JPX",
            "exchange": "Japan Exchange Group",
            "market": "Tokyo Stock Exchange",
            "products": null,
            "local_time": "2020-09-12T04:03:19+09:00",
            "status": "Closed",
            "reason": null,
            "until": "2020-09-14T08:00:00+09:00",
            "next_bell": "2020-09-14T12:30:00+09:00"
        },
        "US.NYSE": {
            "fin_id": "US.NYSE",
            "exchange": "New York Stock Exchange",
            "market": "Canonical",
            "products": null,
            "local_time": "2020-09-11T15:03:19-04:00",
            "status": "Open",
            "reason": "Primary Trading Session",
            "until": "2020-09-11T15:45:00-04:00",
            "next_bell": "2020-09-11T16:00:00-04:00"
        }
    },
    "meta": {
        "utc_time": "2020-09-11T19:03:19+00:00",
        "time": "2020-09-11T19:03:19+00:00"
    }
}

# Fields Explained

  • local_time - The local time at the market
  • status - Open or Closed. Open if it is currently a primary trading session. Closed otherwise (including pre- and post-trading sessions)
  • reason - Explanation of the current response including current phase(s), holidays, and irregular schedules
  • until - End of the current phase.
  • next_bell - The time when the market opens or closes next
  • utc_time - The time in UTC
  • time - Same as UTC Time.

Note

until is not always the same as next_bell. For example, if it is currently a post-trading session, until will indicate the end of the post-trading session and next_bell will be the following morning when markets officially open.

# Request Caching

The results of the status API will not change until until. So it is safe to cache results until this time. Caching requests and using bulk API calls will help you avoid exceeding the rate limits.