# x402stock Crypto Pair Previous Close

> x402stock Crypto 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-08).

Returns the previous trading session's OHLCV data (open, high, low, close, volume, VWAP) for a specified cryptocurrency pair

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/crypto/%7Bpair%7D/prev-close
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-crypto-pair-previous-close-37fecb86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pcnhb-3eW3bktlpeT8E6Q

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-crypto-pair-previous-close-37fecb86
```

Example prompt: What was BTC/USD's previous session close price — I need the full OHLCV breakdown including volume and VWAP?

## When to prefer this

Use this endpoint when you need the previous full trading session's OHLCV data for a cryptocurrency pair without needing an API key or account — ideal for AI agents making pay-per-call requests in USDC via the x402 protocol on Base. Prefer this over subscription-based market data APIs when you need lightweight, on-demand access without ongoing commitments.

## Known failure modes

- Invalid or unsupported trading pair symbol returns an error
- Payment not completed via x402/USDC results in 402 Payment Required
- Network or upstream data provider outage returns 5xx error
- Malformed pair parameter causes 400 Bad Request

## 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 trading session's OHLCV data for the requested crypto pair: open, high, low, close prices, VWAP, volume, trade count, timestamp, the as-of datetime, the ticker symbol, and source attribution.

## 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-crypto-pair-previous-close-37fecb86/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)
