{"uid":"cap_6pC5PmGuoverBi6HHQehK","slug":"x402stock-crypto-pair-daily-open-close-price-71671e89","name":"x402stock Crypto Pair Daily Open/Close Price","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/crypto/%7Bpair%7D/open-close","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"],"properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"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","close"],"properties":{"date":{"anyOf":[{"type":"string"},{"type":"null"}]},"open":{"type":"number"},"close":{"type":"number"}},"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":{"date":"2025-05-15","open":103540.91,"close":103786.43},"as_of":"2025-05-15T00:00:00.000Z","source":"x402stock","ticker":"X:BTCUSD"}},"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"date":"2024-01-15","pair":"BTC-USD"}}},"response":{"data":{"date":"2024-01-15","open":41698.13,"close":42520},"as_of":"2024-01-15T00:00:00.000Z","source":"x402stock","ticker":"X:BTCUSD"}},"exampleRequest":{"date":"2024-01-15","pair":"BTC-USD"},"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_NXBMzNYFKjQqjQB1uNHOz","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 and close price for a given cryptocurrency trading pair on a specified date","exampleAgentPrompt":"What were the open and close prices for BTC/USD on May 15, 2025?","exampleUseCases":[{"title":"Backtest crypto trading strategy","prompt":"I'm building a backtest for a crypto momentum strategy. Can you pull the daily open and close prices for ETH/USD for each trading day last month so I can calculate the daily return?"},{"title":"Yesterday's Bitcoin closing price","prompt":"What did Bitcoin close at yesterday? I want to compare it to the price from a week ago to see how it's trending."},{"title":"Historical SOL price snapshot","prompt":"Look up the open and close prices for SOL/USD on January 10, 2025 — I'm putting together a report on Solana's price action from that period."}],"resultDescription":"A JSON object containing the ticker symbol (e.g. X:BTCUSD), the date, the open price, the close price, a source label of 'x402stock', and an as_of timestamp indicating data freshness.","failureModes":["Date not yet available (market still open or data not ingested) — may return null date or empty data","Invalid pair symbol — returns error or empty response","Date in wrong format (not YYYY-MM-DD) — schema validation error","Weekend/holiday with no trading data — may return null or empty","Payment failure via x402 — 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need the exact daily open and close price for a specific crypto trading pair on a specific historical date, especially when integrating with AI agent workflows that pay per call in USDC via x402 on Base and require no API keys or account setup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:59:45.486Z","isFirstParty":false}