TradeTi.me / Developers / REST API MCP → OpenAPI ↗

REST API · v1

Market hours, as data your code can read.

TradeTi.me tracks when the world's stock exchanges are open. This API hands you that knowledge as plain JSON — is a market open right now, when does it next open, what are its holidays and hours — for 30 exchanges. It's free, needs no signup, and works straight from a browser.

/30 open now30 exchangesfree · no keyapi.tradeti.me

What can you build with it?

If you'd rather your AI assistant answer these questions directly, there's an MCP server — same data, built for agents. This page is the API for your own code.

Your first request

Every request is an ordinary web address (a URL) that returns JSON. There's nothing to install and no key to get — you can literally click one:

https://api.tradeti.me/v1/exchanges/nyse/status — opens the live answer for the New York Stock Exchange in your browser.

From the command line with curl:

Terminal
curl "https://api.tradeti.me/v1/exchanges/nyse/status"

You get back something like this — open tells you the answer, the rest gives you context:

Response
{
  "id": "nyse",
  "name": "NYSE",
  "open": true,             // ← the answer
  "status": "main_open",     // what kind of open (see Field glossary)
  "timeToCloseHours": 5.5    // closes in 5½ hours
}

Base URL: every path below hangs off https://api.tradeti.me. That's it — you're ready.

Core concepts

Five things worth knowing before you dive into the endpoints. Skim these and everything else clicks.

Exchanges have an id

Each of the 30 markets has a short id — nyse, nasdaq, lse, nikkei. You can also pass a name or city ("Tokyo"); it's case-insensitive. Call List exchanges to see them all.

Times are the market's own

An exchange opens at its local time, not yours. All hours and holidays are in the exchange's timezone (given as an IANA name like America/New_York). Convert to your zone at display time if you need to.

Sessions & decimal hours

A trading day has parts — pre, main, post. Hours are decimal: 9.5 means 9:30. A four-number main like [9, 11.5, 12.5, 15] means a lunch break (open 9:00–11:30, then 12:30–15:00).

Weekends & holidays are handled

"When does it next open?" always skips weekends and public holidays for you — you never have to compute a trading calendar yourself. Early-close (half) days are included too.

Time-travel with ?at=

Any "is it open?" question takes an optional ?at=<ISO time> to ask about a past or future moment — "will NYSE be open at 3pm ET next Monday?" Leave it off for "right now."

Free & browser-friendly

Keyless = no signup or API key. Open CORS = you can call it directly from front-end JavaScript in a browser, not just a server. Read-only: it never changes anything.

Authentication

There is none — and that's intentional. No key, no account, no cookies. Just request the URL. Because it's read-only public data, there's nothing to secure on your side. It also sends Access-Control-Allow-Origin: *, so browser front-ends can call it without a proxy.

List exchanges

GET/v1/exchanges

Every exchange as a lightweight summary. Start here to discover the ids you'll use everywhere else. Add ?region= to filter.

ParameterDescription
region optionalCase-insensitive region name: Asia, Americas, Europe, Oceania, Africa.
Response · 200
{ "count": 30, "exchanges": [
  { "id": "nikkei", "name": "Nikkei 225", "city": "Tokyo",
    "timezone": "Asia/Tokyo", "region": "Asia", "importance": "major" },
  … ] }
GET /v1/exchanges?region=Asia
Live response

One exchange (full record)

GET/v1/exchanges/{id}

Everything about one exchange in a single call: its sessions, its full holiday list, early-close days, and links to the official sources the data came from. Unknown id404.

ParameterDescription
id path · requiredAn exchange id, name, or city (case-insensitive): nyse, "New York".
GET /v1/exchanges/nyse
Live response

Is it open? — one exchange

GET/v1/exchanges/{id}/status

The flagship call: the live answer for one market. If it's closed, you also get how long until it next opens (weekends and holidays already skipped). If it's open, how long until it closes.

ParameterDescription
id path · requiredExchange id / name / city.
at query · optionalAn ISO 8601 timestamp to ask about a specific moment, e.g. 2026-07-06T14:30:00Z. Defaults to now.
Response · 200 (open)
{
  "id": "nyse", "name": "NYSE", "timezone": "America/New_York",
  "open": true,
  "status": "main_open",
  "sessionType": "main",
  "timeToNextHours": 0,
  "timeToCloseHours": 5.5,
  "closedReason": null
}
Response · 200 (closed for the weekend)
{
  "id": "nyse", "open": false, "status": "closed",
  "timeToNextHours": 38.5,          // opens Monday morning
  "closedReason": "weekend"
}

Every field is explained in the Field glossary below. Try changing the ?at= value and running it again.

GET /v1/exchanges/nyse/status
Live response

Everything open right now

GET/v1/status

The same live answer for every exchange in one call — perfect for a "which markets are trading?" dashboard. Takes the same optional ?at=.

Response · 200
{ "count": 30, "openCount": 8,
  "exchanges": [ { "id": "nikkei", "open": true, "status": "main_open" }, … ] }
GET /v1/status
Live response

Holidays & early closes

GET/v1/exchanges/{id}/holidays

Just the closure calendar: full-day holidays (dates), plus early-close days with the hour they close (exchange-local, decimal).

Response · 200
{
  "id": "nyse", "timezone": "America/New_York",
  "holidays": ["2026-01-01", "2026-07-03", "2026-12-25", …],
  "earlyCloses": [ { "date": "2026-11-27", "closeTime": 13 } ]  // closes 1:00pm
}
GET /v1/exchanges/nyse/holidays
Live response

Trading sessions

GET/v1/exchanges/{id}/sessions

The daily session structure, in exchange-local decimal hours. Remember: 9.5 = 09:30, and a four-number main means a lunch break.

Response · 200
{ "id": "nikkei", "timezone": "Asia/Tokyo",
  "sessions": { "pre": [8, 9], "main": [9, 11.5, 12.5, 15], "post": [15, 16.5] } }
  // main: open 9:00–11:30, lunch, then 12:30–15:00
GET /v1/exchanges/nikkei/sessions
Live response

Machine spec & health

GET /v1/openapi.json — the full OpenAPI 3.1 description of this API. OpenAPI is a standard format that tools understand: drop this URL into Postman, a code generator, or an AI, and it can call every endpoint for you.

GET /v1/health — a tiny liveness check: { "status": "ok", "exchanges": 30 }.

Field glossary

Every field you'll see in a status response, in plain terms:

FieldWhat it means
opentrue/false — the plain answer. Is the market accepting trades right now (or at ?at=)?
statusA more precise label: "closed", "opening_soon" (within ~30 min of opening), "main_open" (regular session), or "session_open" (a pre/post session). Use open for yes/no; use status when you care which session.
sessionTypeWhich session is live: "pre", "main", or "post". null when closed.
timeToNextHoursHours until it next opens (decimal, e.g. 38.5). Weekends + holidays already skipped. 0 when it's already open.
timeToCloseHoursHours until it closes — present only when it's open.
closedReasonWhy it's closed today: "weekend", "holiday", or null (e.g. simply after-hours on a normal trading day).
timezoneThe exchange's IANA timezone ("America/New_York") — the zone all its hours are in.

Errors & status codes

Standard HTTP codes. Errors return a small JSON body { "error": "…" }.

CodeMeaning
200Success — JSON body as documented.
400Bad request — usually a malformed ?at= timestamp. Use full ISO 8601.
404Unknown exchange id, or a path that doesn't exist.
429Too many requests — you've hit fair-use limits. Wait a moment and retry (cache helps; see below).

Rate limits & caching

This is a free, keyless API on a shared budget — every request costs the same pool, and a single runaway client could take it down for everyone. So there's one simple rule: cache, and don't poll faster than the data changes. Follow it and you'll never see a limit.

Be a good citizen

Why we limit by IP at the edge — and why that's fair to you. Because the API is keyless we can't give you a personal quota, so a burst of requests is throttled by IP at Cloudflare's edge, before it can drain the shared pool. The threshold is generous — normal use never trips it; a runaway loop trips it instantly. And it's a short one-minute timeout with a clear message, not a ban. (Caching your own calls is what keeps you comfortably under it — a Worker like this runs on every request, so client-side caching, not "the edge will cache it," is what saves the budget.)

Hit a 429? Here's the fix

A 429 Too Many Requests means one IP sent a burst far beyond normal use in a short window. It's served at Cloudflare's edge with a Retry-After header, and it's a short timeout, not a ban — the moment you slow down, you're through again:

429 response
HTTP/2 429 Too Many Requests
retry-after: 10
server: cloudflare

error code: 1015    // blocked at the edge — costs you nothing but a short pause

The fix is almost always the same — cache, slow the loop, and honor Retry-After:

✗ before — hammers on every tick
setInterval(async () => {
  const s = await (await fetch(url)).json();  // every 100ms → 429
  render(s);
}, 100);
✓ after — cache + a sane interval + honor Retry-After
async function tick() {
  const r = await fetch(url);
  if (r.status === 429) {                       // backed off politely
    return setTimeout(tick, (+r.headers.get("retry-after") || 60) * 1000);
  }
  render(await r.json());
  setTimeout(tick, 60000);                       // once a minute is plenty
}
tick();

Recipes

Is NYSE open right now?

JavaScript
const { open } = await (await fetch("https://api.tradeti.me/v1/exchanges/nyse/status")).json();
if (open) console.log("NYSE is open");

Which markets are trading?

JavaScript
const { exchanges } = await (await fetch("https://api.tradeti.me/v1/status")).json();
const openNow = exchanges.filter(e => e.open).map(e => e.name);

Only run my bot while Tokyo is open

Python
import requests
s = requests.get("https://api.tradeti.me/v1/exchanges/nikkei/status").json()
if s["open"]:
    run_strategy()

Will the LSE be open at a specific time?

Terminal
curl "https://api.tradeti.me/v1/exchanges/lse/status?at=2026-12-25T12:00:00Z"

FAQ

Is the data real-time?

It's based on published, scheduled trading calendars — accurate to the minute for regular hours, holidays, and half-days. It is not a live market feed and doesn't know about unscheduled halts. Treat it as a high-quality convenience, and verify with the exchange before any time-sensitive or financial decision.

Why are the times in the exchange's timezone, not mine?

Because an exchange's opening hour is a fact about that market — it doesn't move when you travel. We give you the exchange's timezone (an IANA name) so you can convert to your own zone reliably, including across daylight-saving changes.

Can I use it commercially / in my own product?

Yes, during the current free period — build away. Please cache politely (see Rate limits) and don't present it as a guaranteed real-time feed. See Fair use & terms.

What if a holiday or hour is wrong?

Tell us — accuracy is the whole point. Use the feedback box below; a correction is the most valuable thing you can send.

How many exchanges, and can you add mine?

30 today, across every region. Missing one you need? Request it in the feedback box.

Do you have SDKs / an npm package?

Not yet for the REST API — it's plain enough that a fetch is all you need. If you drive an AI agent, the MCP server is on npm (tradetime-mcp).

Fair use & terms

Free during the current period, with no hard caps — just be a good citizen: cache responses, don't scrape in tight loops, and don't present the data as a guaranteed real-time or authoritative feed. It's provided as-is, for convenience; verify with the official exchange before any decision that depends on it. Full terms of use apply.

Feedback

This is only as good as it is correct, and only as complete as you tell us. Two things we always want: what's wrong, and what's missing. No account, 20 seconds.

Was this page helpful?
🛠 Report a data error
✨ Request a feature or an exchange

Free today — not a promise forever. The API and MCP server are free and keyless in this early phase. As the service grows, its limits, terms, and pricing may change, and it's offered as-is with no guaranteed uptime. Build on it — just don't assume it stays free indefinitely.