Skip to main content

Status

Get the past, present, or future status for a stock market. The endpoint will respond with "open" for trading days or "closed" for weekends or market holidays.

Endpoint

https://api.marketdata.app/v1/markets/status/

Method

GET

Request Example

Response Example

{
"s": "ok",
"date": [1680580800],
"status": ["open"]
}

Request Parameters

  • country string

    Use to specify the country. Use the two digit ISO 3166 country code. If no country is specified, US will be assumed. Only countries that Market Data supports for stock price data are available (currently only the United States).

  • date date

    Consult whether the market was open or closed on the specified date. Accepted timestamp inputs: ISO 8601, unix, spreadsheet, relative date strings.

  • from date

    The earliest date (inclusive). If you use countback, from is not required. Accepted timestamp inputs: ISO 8601, unix, spreadsheet, relative date strings.

  • to date

    The last date (inclusive). Accepted timestamp inputs: ISO 8601, unix, spreadsheet, relative date strings.

  • countback number

    Countback will fetch a number of dates before to If you use from, countback is not required.

Response Attributes

  • s string

    ll always be ok when there is data for the dates requested.

  • date array[dates]

    The date.

  • status array[string]

    The market status. This will always be open or closed or null. Half days or partial trading days are reported as open. Requests for days further in the past or further in the future than our data will be returned as null.