# x402stock Forex Pair Previous Close

> x402stock Forex Pair Previous Close is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns the previous trading session's OHLCV data (open, high, low, close, volume, VWAP, trade count) for a given forex currency pair

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/forex/%7Bpair%7D/prev-close
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-forex-pair-previous-close-90ddc488
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9aZ9y1tk3bFliBtOmBjOX

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 x402stock-forex-pair-previous-close-90ddc488
```

Example prompt: What did EUR/USD close at in the previous trading session? I want the open, high, low, close, and volume too.

## When to prefer this

Use this endpoint when you need a single forex pair's previous-session OHLCV summary and want a pay-per-call model with no API key or subscription required. Ideal for AI agents that need occasional forex reference data without committing to a recurring data feed subscription.

## Known failure modes

- Invalid or unsupported currency pair symbol returns an error
- Payment not completed via x402/USDC results in 402 Payment Required
- Network or upstream data provider outage causes 5xx error
- Requesting data during a weekend or market holiday may return no data or stale data

## How this service works

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.

## Output

A JSON object containing the previous session's OHLCV data for the requested forex pair: open, high, low, close prices, VWAP, volume, trade count, session timestamp, and as_of datetime, plus the ticker and data source label.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "low": 309.53,
   "high": 315,
   "open": 311.775,
   "vwap": 311.9766,
   "close": 312.06,
   "volume": 70030122,
   "timestamp": "2026-05-28T04:00:00.000Z",
   "trade_count": 764554
  },
  "as_of": "2026-05-28T04:00:00.000Z",
  "source": "x402stock",
  "ticker": "AAPL"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-forex-pair-previous-close-90ddc488/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
