{"uid":"cap_J6VBXTeXxdkOFPu0xBufR","slug":"agents-x402stock-xyz-forex-pair-previous-close-ohlcv-x402stock-ab854c45","name":"Forex Pair Previous Close OHLCV (x402stock)","description":"Open, high, low, close, volume, and VWAP for a foreign-exchange pair's most recent completed trading day. Pass the pair in the path as BASE-QUOTE, e.g. EUR-USD. One call returns one bar for a quick prior-close reference. From x402stock, a pay-per-call market & economic data API for AI agents. No API key or account; pay in USDC via x402.","url":"https://agents.x402stock.xyz/api/v1/forex/{pair}/prev-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"},"pathParams":{"pair":{"type":"string"},"type":"object"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false}}},"responseSchema":{"type":"object","required":["ticker","data","source","as_of"],"properties":{"data":{"anyOf":[{"type":"object","required":["open","high","low","close","volume","vwap","trade_count","timestamp"],"properties":{"low":{"type":"number"},"high":{"type":"number"},"open":{"type":"number"},"vwap":{"anyOf":[{"type":"number"},{"type":"null"}]},"close":{"type":"number"},"volume":{"type":"number"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}]},"trade_count":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"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},"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":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_x70v33ftkI8BlvDI-s_WJ","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":null},{"uid":"pm_i04Vqjqf2CycVnEEGGPr5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agents.x402stock.xyz","brandSlug":"agents-x402stock-xyz-mpp","brandBaseUrl":"https://agents.x402stock.xyz","brandDocsUrl":null,"whatItDoes":"Returns open, high, low, close, volume, and VWAP for a foreign-exchange pair's most recently completed trading day as a single bar.","exampleAgentPrompt":"What were the open, high, low, and close prices for EUR-USD on the last completed trading day? I also want the VWAP and volume.","exampleUseCases":[{"title":"Morning FX briefing for trading bot","prompt":"What did EUR-USD close at yesterday, and what was the daily range and VWAP? I need this before the market opens."},{"title":"Overnight currency move check","prompt":"Can you tell me how GBP-USD performed last trading session — open, high, low, close, and volume?"},{"title":"Prior close reference for algo signal","prompt":"Fetch me the previous completed day bar for USD-JPY including VWAP and trade count so I can calibrate my entry levels."}],"resultDescription":"A single JSON object containing the ticker symbol, data source ('x402stock'), the as_of timestamp, and a data object with open, high, low, close, volume, VWAP, trade_count, and a session timestamp for the most recently completed trading day of the specified forex pair. Data may be null if the pair is not found or data is unavailable.","failureModes":["Unsupported or malformed pair symbol (e.g. missing hyphen) may return null data","Pair not covered by the provider returns null data block","Market not yet closed for current day — only the prior completed day is available","Payment failure via x402 if USDC balance is insufficient","Network timeout if the upstream data provider is slow"],"whenToPreferThis":"Use this endpoint when you need a quick single-bar daily OHLCV reference for a forex or crypto spot pair and do not require intraday or multi-day history. It is ideal for prior-close anchoring, overnight move detection, or seeding a daily signal without needing a full historical query. Prefer this over historical bar endpoints when only the most recent completed session is needed and you want minimal latency and cost ($0.01 per call).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-11T12:38:25.102Z","isFirstParty":false}