# 2s.io Market Status

> 2s.io Market Status is a paid API for AI agents from 2s.io, paid per call via x402, $0.0025/call, status unknown (last checked 2026-10-27).

Returns whether a stock exchange is currently open, the active trading session, holiday status, timezone, and server timestamp for a given exchange.

## Facts

- Endpoint: GET https://2s.io/api/markets/status?utm_source=zero.xyz
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-market-status-e411860a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XzLGGun1BGy5EuoShZgQp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-io-market-status-e411860a
```

Example prompt: Is the US stock exchange open right now, and if not, what session or holiday is it currently in?

## When to prefer this

Use this endpoint when you need a real-time, authoritative check of whether a specific stock exchange is currently in a tradeable session before executing time-sensitive logic. Prefer it over hardcoded schedule checks because it accounts for market holidays and session nuances like pre/post-market hours. Powered by Finnhub data, it's appropriate for lightweight polling in agentic trading workflows.

## Known failure modes

- Invalid exchange code returns an error or empty result
- Finnhub upstream outage causes delayed or missing data
- Ambiguous exchange codes may default to US market behavior
- Rate limiting or payment failure (402) if usage quota is exceeded

## How this service works

Is a stock exchange open right now? Pass exchange (default US); returns whether trading is open, the current session (pre-market, regular, post-market, or closed), whether today is a market holiday, the exchange timezone, and the server timestamp. Use it to gate time-sensitive logic to market hours. Data by Finnhub.

## Output

Returns a JSON object with: whether trading is currently open (boolean), the current session label (pre-market, regular, post-market, or closed), a flag indicating if today is a market holiday, the exchange's timezone, and the server timestamp at time of the call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [],
     "properties": {
      "exchange": {
       "type": "string",
       "description": "Exchange code, e.g. US."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-market-status-e411860a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
