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
- Create a free account, or sign in.
- On your widget keys, create a key and list the domains your site uses.
- 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
| Widget | data-mc-widget | Shows |
|---|---|---|
| Market status | status | One market: open or closed, today's hours and a countdown |
| Countdown | countdown | Time until a market opens, closes or its next holiday |
| Market board | board | Several markets with status, today's hours and countdowns |
| 24-hour timeline | timeline | Today's sessions on a 24-hour bar with a line for now |
| Upcoming holidays | holidays | Next holidays and early closes for one market or several |
| World map | map | Live status of every market or your own selection |
Options
| Attribute | Values | Widgets | Default |
|---|---|---|---|
data-market | A market slug, such as nyse or lse | Status, countdown | nyse |
data-markets | Market slugs separated by commas | Board, timeline, holidays, map | A set of major markets; every market on the map |
data-target | next, open, close or holiday | Countdown | next |
data-count | 3 to 12 | Holidays | 5 |
data-night | 1 to shade the night side of the world | Map | Off |
data-zone | market, local (the visitor's zone) or a zone such as Europe/London | All | market |
data-clock | 24 or 12 | All | 24 |
data-theme | auto, light or dark | All | auto |
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.
example.comcovers that exact host only. Addwww.example.comseparately if you use it.*.example.comcovers every subdomain, but notexample.comitself.localhostallows testing on your own machine on any port.
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
- Each key has a fair-use limit of 100,000 views a calendar month (UTC). Over the limit, widgets show a short notice until the next month.
- Very fast reloads from one visitor or one key are limited in the same way.
- Widgets refresh themselves just after the next change they show. Views per key, domain and widget are on your widget keys page.
- Widgets are HTML only. For data in your own code, use the JSON API.
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.