Skip to content
MarketCalendars.com
Sign up

API documentation

REST API v2: trading hours, holidays and settlement days as JSON over HTTPS

Get a market

GET/api/v2/markets/{market}

One market's metadata, data coverage, location and settlement cycle

One request: one market. A successful response counts as one request

Parameters

NameInDescription
marketrequiredpathMarket id, as listed by GET /markets (for example nyse, lse, cme-equity-futures)Example: nyse

Example

curl https://marketcalendars.com/api/v2/markets/nyse \
  -H "Authorization: Bearer mc_live_..."
GET /api/v2/markets/nyse200
{
  "id": "nyse",
  "name": "New York Stock Exchange",
  "shortName": "NYSE",
  "mic": "XNYS",
  "type": "stocks",
  "country": "United States",
  "countryCode": "US",
  "city": "New York",
  "region": "americas",
  "timezone": "America/New_York",
  "parent": null,
  "coverage": {
    "from": "1995-01-01",
    "to": "2051-12-31"
  },
  "url": "https://marketcalendars.com/markets/nyse",
  "website": "https://www.nyse.com",
  "location": {
    "latitude": 40.7069,
    "longitude": -74.0113
  },
  "aliases": [
    "XNYS",
    "NYSE"
  ],
  "settlement": {
    "available": true,
    "cycle": "T+1",
    "source": {
      "name": "Federal Reserve holidays (DTC)",
      "url": "https://www.federalreserve.gov/aboutthefed/k8.htm"
    }
  },
  "dataSource": "pandas_market_calendars 5.5.0",
  "sourceCalendar": "NYSE"
}

A live response from the API. Lists longer than seven items are cut to three here

Response fields

MarketDetail object. Fields marked | null are always present and may be null

FieldTypeDescription
idstringMarket id used in every path
namestringFull name
shortNamestringShort name or abbreviation
micstring | nullISO 10383 market identifier code
typestringWhat the market tradesstocksfuturesoptionsbondsfxcrypto
countrystringCountry name
countryCodestring | nullISO 3166-1 alpha-2
citystringCity of the exchange
regionstringRegion, as on /regionsamericaseuropeasia-pacificmiddle-east-africa
timezonestringIANA time zone
parentstring | nullId of the primary market this is a sub-market of, such as cme for its product groups
coverageobjectDates we have data for
coverage.fromstring (date)First date with data
coverage.tostring (date)Last date with data
urlstring (uri)Market page on marketcalendars.com
websitestring (uri) | nullExchange website
locationobject | nullApproximate exchange location
location.latitudenumberDegrees north
location.longitudenumberDegrees east
aliasesstring[]Other library codes that identify only this market
settlementobjectSettlement days we publish for the market
settlement.availablebooleanWhether we publish settlement days for this market
settlement.cyclestring | nullSettlement cycle in force today
settlement.sourceobject | nullSettlement calendar the days come from
settlement.source.namestringSettlement calendar
settlement.source.urlstring (uri)Where the calendar is published
dataSourcestringSource library and version
sourceCalendarstringCalendar name in the source library

Errors

  • 401unauthorizedThe Authorization header is missing, malformed, or names a revoked key
  • 404unknown-marketNo market has that id. GET /markets lists every id
  • 429rate-limitedThe key sent more requests in a minute than its plan's burst limit
  • 429quota-exceededThe plan's requests for this period are used up