Skip to content
MarketCalendars.com
Sign up

Embeddable widget documentation

Embeddable widgets are the easiest way to add market countdowns and open/close status indicators to your website or application. They show live trading hours, countdowns and holidays for 92 markets, and are free with a MarketCalendars.com account. Build the embed code on thewidgets page, or write it by hand from this page.

Quick start

  1. Create a free account, or sign in.
  2. On your widget keys, create a key and list the domains your site uses.
  3. Paste the embed code where the widget should appear, with your key in data-key.
<div data-mc-widget="status" data-key="wk_your_key" data-market="nyse"></div>
<script async src="https://marketcalendars.com/embed.js"></script>

The script finds every element with data-mc-widget, embeds the widget in an iframe and sizes it to fit. One copy of the script serves any number of widgets on the page.

Widgets you can embed

Widgetdata-mc-widgetShows
Market statusstatusOne market: open or closed, today's hours and a countdown
CountdowncountdownTime until a market opens, closes or its next holiday
Market boardboardSeveral markets with status, today's hours and countdowns
24-hour timelinetimelineToday's sessions on a 24-hour bar with a line for now
Upcoming holidaysholidaysNext holidays and early closes for one market or several
World mapmapLive status of every market or your own selection

Options

AttributeValuesWidgetsDefault
data-marketA market slug, such as nyse or lseStatus, countdownnyse
data-marketsMarket slugs separated by commasBoard, timeline, holidays, mapA set of major markets; every market on the map
data-targetnext, open, close or holidayCountdownnext
data-count3 to 12Holidays5
data-night1 to shade the night side of the worldMapOff
data-zonemarket, local (the visitor's zone) or a zone such as Europe/LondonAllmarket
data-clock24 or 12All24
data-themeauto, light or darkAllauto

Market slugs are the last part of a market page address: /markets/nyse is nyse. Boards take up to 20 markets, timelines 12 and holiday lists 10.

Allowed domains

Each key lists the domains it may be embedded on, up to 20 per key and 10 keys per account. Browsers refuse to show the widget on any other site, and the widget shows a short notice instead.

Attribution

Every widget has a footer with a "Data by MarketCalendars.com" link. That link is the attribution: it may not be removed, hidden or modified. Nothing else is needed on your page.

Plain iframe

Where scripts are not allowed, embed the widget page directly. A plain iframe does not resize itself, so set a height that fits. The same options apply, as query parameters without the data- prefix.

<iframe src="https://marketcalendars.com/embed/status?key=wk_your_key&market=nyse"
  title="NYSE market status" width="100%" height="150" style="border:0"></iframe>

Limits

Privacy

Widgets set no cookies and load no analytics, so they add nothing to your cookie notice. We record the domain each view comes from, for the counts above.

White-label

Widgets without our branding, in your own colours, or with a higher view limit are available on request. Contact us about white-label use.

Terms

Embedding widgets means you accept the API and widget terms.