{"uid":"cap_LTdyPR_rBKJDB6Y-EH4-_","slug":"market-hours-api-next-open-close-time-cc3a10ca","name":"Market Hours API – Next Open/Close Time","description":"Returns the next open and next close time of a stock exchange or futures market after a given time.","url":"https://market-hours-api.onrender.com/v1/next?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["market"],"properties":{"at":{"type":"string","description":"Optional ISO 8601 time with offset, e.g. 2026-11-27T15:00:00Z. Default: now."},"market":{"type":"string","description":"Market code: XNYS, XNAS, XLON, XETR, XSWX, XTKS, XHKG, XSHG, XASX, CME_EQUITY, EUREX_INDEX"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XmPxv5by87Za1AbgCZK1w","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the next open time and next close time of a specific stock exchange or futures market after a given timestamp.","exampleAgentPrompt":"When does the NYSE (XNYS) next open and close after 2025-03-15T18:00:00Z?","exampleUseCases":[{"title":"Pre-trade session timing for algorithmic trader","prompt":"I'm about to submit orders — when does XNAS next open and close? Use current time as the reference."},{"title":"Cross-timezone market open alert","prompt":"My team is in Tokyo and wants to know when the London Stock Exchange (XLON) will next open and close — can you look that up from right now?"},{"title":"Holiday gap detection for CME equity futures","prompt":"It's 2025-11-27T15:00:00Z — when will the CME equity futures market (CME_EQUITY) next open and what time will it close after that?"}],"resultDescription":"Returns the next open datetime and next close datetime for the requested market after the specified (or current) time, expressed as ISO 8601 timestamps with timezone offsets.","failureModes":["Invalid or unsupported market code returns an error — only XNYS, XNAS, XLON, XETR, XSWX, XTKS, XHKG, XSHG, XASX, CME_EQUITY, EUREX_INDEX are accepted","Malformed 'at' timestamp (not ISO 8601 with offset) may produce a parsing error","If the market is on an extended holiday closure, the next open may be far in the future","Payment failure (x402) if USDC balance is insufficient"],"whenToPreferThis":"Use this endpoint when you need to know precisely when a specific exchange or futures market will next open or close — ideal for scheduling automated trades, alerts, or workflows around market sessions. Prefer this over a general 'is the market open now?' check when forward-looking timing is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T12:34:11.142Z","isFirstParty":false,"canonicalSlug":"market-hours-api-next-open-close-time-cc3a10ca"}