{"uid":"cap_zHx_0o8CqWQ9GppLvbUgk","slug":"x402stock-open-close-ohlcv-endpoint-4cf57015","name":"x402stock Open/Close OHLCV Endpoint","description":"Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.","url":"https://x402stock.xyz/api/v1/open-close/%7Bticker%7D","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","$schema":"https://json-schema.org/draft/2020-12/schema","required":["date","adjusted"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"adjusted":{"type":"boolean","default":true}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ticker","data","source","as_of"],"properties":{"data":{"type":"object","required":["date","open","high","low","close","volume","pre_market","after_hours"],"properties":{"low":{"type":"number"},"date":{"type":"string"},"high":{"type":"number"},"open":{"type":"number"},"close":{"type":"number"},"volume":{"type":"number"},"pre_market":{"anyOf":[{"type":"number"},{"type":"null"}]},"after_hours":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"as_of":{"type":"string"},"source":{"type":"string","const":"x402stock"},"ticker":{"type":"string"},"feedback":{"type":"object","required":["endpoint","method","free","note"],"properties":{"free":{"type":"boolean"},"note":{"type":"string"},"method":{"type":"string","const":"POST"},"endpoint":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}}}}},"responseSchema":{"type":"json","example":{"data":{"low":200.12,"date":"2025-06-02","high":202.13,"open":200.28,"close":201.7,"volume":35423294,"pre_market":198.52,"after_hours":201.68},"as_of":"2025-06-02T00:00:00.000Z","source":"x402stock","ticker":"AAPL"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_ngRRceXE1qdFL4MG6OFNC","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 daily open, high, low, close, volume, pre-market, and after-hours price data for a given US stock ticker on a specified date","exampleAgentPrompt":"What were the open, high, low, close prices and trading volume for AAPL on 2025-06-02, using adjusted prices?","exampleUseCases":null,"resultDescription":"A JSON object containing the ticker symbol, date, open, high, low, close, volume, pre-market price, and after-hours price for the requested trading day, along with an as_of timestamp and data source label.","failureModes":["Invalid ticker symbol returns error or empty data","Non-trading day (weekend or holiday) returns no data or error","Date in wrong format (not YYYY-MM-DD) returns 400-level error","Future date returns no data","Payment failure via x402/USDC returns 402 Payment Required","Rate limiting or network timeout"],"whenToPreferThis":"Use this endpoint when you need end-of-day OHLCV data (open, high, low, close, volume) plus pre-market and after-hours prices for a specific US stock or ETF ticker on a particular historical date. It is ideal for agents doing financial analysis, backtesting, or reporting that require no API key and can pay per call in USDC via x402 on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:06:34.181Z","isFirstParty":false}