# Check if a stock market is open, and its holidays, with TickerLayer

TickerLayer's market calendar reports a market's current state (open, closed, pre-market or post-market), gives its next regular open and close, and lists a year's full-day closures and early closes. A status check costs $0.01 and a year's holiday list costs $0.02. Send `GET https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/status?market=US` with your agent credential, then pay the 402 over x402 or MPP and retry.

## At a glance

- **Endpoints:** `GET /markets/status`, `GET /markets/holidays`, `GET /markets/sessions` and `GET /markets/status/bulk`, all on `https://agents.tickerlayer.com/zcj/ixufy0unsw9t`
- **Query:** `market` (such as `US`, `GB`, `DE`, `JP`, `CRYPTO`, `FOREX`), or `asset` with `symbol`; `at` for another instant; `year` on holidays
- **Price:** status and sessions $0.01, holidays $0.02, bulk status $0.01 plus $0.01 per 5 items
- **Payment:** a 402 is the price quote, which you pay and retry. x402 (Base USDC) and MPP (Tempo USDC) are the wallet rails.
- **Credential:** an agent credential on every call, sent as `Authorization: Bearer <token>`. [auth.md](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/auth.md) registers one in a free call.
- **Response:** JSON with ISO-8601 UTC timestamps
- **Limits:** up to 25 instruments per bulk call. Calendars are indicative.
- **Full purchase flow:** [the buyer skill](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/SKILL.md)

## Check the calendar before you act on a price

Check a market's status before you act on a price from it. One status call tells you whether the market is in a trading window, and when it next opens and closes, before you alert on a move or compare two prices. Use the calendar codes below for crypto, forex, commodities and 20 regional equity markets.

## Check whether the US stock market is open

1. Send the request with your agent credential:

   ```bash
   curl -i "https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/status?market=US" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
   ```

   The storefront answers `402` with the price, $0.01.

2. Pay the quote with an x402 or MPP client and retry the same request, keeping the credential on the retry. With the Zero CLI, which registers and sends the credential for you:

   ```bash
   zero fetch "https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/status?market=US"
   ```

   This call paid $0.01 and returned a JSON object with `asset`, `market`, `status`, `is_open`, `phase`, `reason`, `timestamp`, `timezone`, `local_time`, `next_open`, `next_close` and a `meta` block holding `calendar_version` and `data_notice`. It has this shape:

   ```json
   {"asset": "<asset class>", "market": "<code>", "status": "<status>", "is_open": <true|false>, "phase": "<phase>", "reason": "<short explanation>", "timestamp": "<ISO-8601 UTC>", "timezone": "<IANA zone>", "local_time": "<local instant>", "next_open": "<ISO-8601 UTC>", "next_close": "<ISO-8601 UTC>", "meta": {"calendar_version": "<version>", "data_notice": "<notice>"}}
   ```

3. Read the fields. `status` is one of `open`, `closed`, `pre_market`, `post_market`, `maintenance` or `unknown`. `is_open` reports whether an active trading session window applies, and `phase` names the window, such as `primary`, `pre_market` or `post_market`. `next_open` is left out during the regular session and for markets that trade around the clock.

## List a year's holidays and early closes

Send `GET https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/holidays?market=US&year=2026` the same way. This call paid $0.02 and returned `market`, `year`, `timezone`, a `holidays` array and a `meta` block with `calendar_version`, `start`, `end`, `data_notice` and `completeness`. Each holiday carries `date` (`YYYY-MM-DD`), `name`, `schedule`, `is_open`, `observed` and `memo`. A `schedule` of `closed` marks a full-day closure, and `early_close` marks a shortened day. `completeness` is `full` or `partial`. Without `year`, the current UTC year is returned. `start` and `end` narrow the list to dates within that year.

## Choose the calendar and the moment

| You need | Send |
| --- | --- |
| A regional equity market | `market=US`, `GB`, `DE`, `FR`, `ES`, `IT`, `TR`, `IN`, `JP`, `CN`, `HK`, `KR`, `SA`, `AE`, `SE`, `TW` or `TH` |
| Crypto, forex, commodities or another calendar code | `market=CRYPTO`, `FOREX`, `COMMODITIES` or `GLOBAL` |
| The calendar for one instrument | `asset=indices&symbol=DE40` (`asset` is `crypto`, `forex`, `stocks`, `indices`, `etfs`, `commodities` or `cfds`) |
| Status at another instant | `at=2026-12-24T18:00:00Z`, any ISO-8601 instant |
| The session template | `includeSessions=true` |
| No holiday metadata | `includeHoliday=false` |

A status call with no `market`, `asset` or `symbol` returns an overview with rolled-up lines for every calendar.

## Get the sessions for a day or check several instruments

`GET https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/sessions?market=US&date=2026-12-24` returns that local date's windows at $0.01. Each entry in `sessions` has a `phase` (`pre_market`, `primary` or `post_market`), `start` and `end` in UTC, and a `status`. Early closes are reflected in the windows.

`GET https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/status/bulk?items=crypto:BTCUSD,forex:EURUSD,stocks:US:KO` returns one status row per item in `data`. Each call costs $0.01 plus $0.01 per 5 items, and the 402 states the exact amount for the items you send. An item that does not resolve gets a row with `item` and an `error` holding a `code` and `message`, and the rest of the response is still returned.

## Limits

- The data is derived, indicative market data, aggregated from non-exchange sources. It may be delayed or differ from official prices. Calendars can change with local rules, special closures and operational events, and they do not substitute for checking that a price feed is healthy.
- One market per status, sessions or holidays call. For several instruments, use the bulk route, up to 25 items. More than 25 returns `400`.
- Stock symbols are market-qualified, such as `US:KO`.
- Each call is paid on its own. A card pays a single call only at $0.50 or more. [How to pay](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/payment.md) and the buyer skill cover card payment and Credits.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `402` | The price quote. Nothing is charged yet. | Pay it and retry the same request, or stop |
| `401 bearer_required` | No agent credential on the call | Register at [auth.md](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/auth.md) and retry with the bearer |
| `400` | Invalid query, such as a bad `at` value or more than 25 bulk items | Fix the parameter. The `message` lists valid values. |
| `429` `REST_RATE_LIMIT_EXCEEDED` | Per-second limit reached | Wait `retryAfterMs` milliseconds, then retry |
| `settlement_failed` | The payment did not settle | Fix the wallet and send a fresh request |

## Frequently asked questions

### Is there an API to check if the stock market is open today?

Yes. `GET https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/status?market=US` returns `status`, `phase`, `is_open` and the next regular open and close, for $0.01 per call. Swap the code for another market, such as `GB` or `JP`.

### What do is_open and phase report?

`is_open` reports whether an active trading session window applies. `phase` names the current window: `primary`, `pre_market` or `post_market`, or another value such as `closed`, `weekend` or `holiday`.

### How do I get stock market holidays for a year?

Call `GET https://agents.tickerlayer.com/zcj/ixufy0unsw9t/markets/holidays?market=US&year=2026` for $0.02. Each entry has a `date`, a `name` and a `schedule` of `closed` or `early_close`.

### Is the market calendar data official exchange data?

No. It is indicative data aggregated from non-exchange sources. It may be delayed or differ from official schedules and prices.

### Can I check market hours for many symbols at once?

Yes. The bulk route takes up to 25 `asset:symbol` pairs in one call, priced at $0.01 plus $0.01 per 5 items. The 402 states the exact amount before you pay.

## Keep reading

- [The buyer skill](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/SKILL.md): the full purchase flow
- [How to pay](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/payment.md): rails, cards and Credits
- [Market calendar API reference](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/services/markets/openapi.json): every parameter and field
- [Error reference](https://agents.tickerlayer.com/zcj/ixufy0unsw9t/errors.md): every code and how to react

---

Updated 2026-11-17. All TickerLayer guides: https://agents.tickerlayer.com/guides.md. Storefront: https://agents.tickerlayer.com/zcj/ixufy0unsw9t/llms.txt.
