# x402stock Crypto Previous Day OHLCV

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

Returns the previous UTC calendar day's full OHLCV candle (open, high, low, close, volume, VWAP) for a spot crypto pair, paid per-call via x402/USDC.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/crypto/:pair/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-crypto-previous-day-ohlcv-512c88d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2zTvPgvI347bEY5pW6QvI

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-previous-day-ohlcv-512c88d0
```

Example prompt: What was yesterday's full daily candle for BTC-USD — open, high, low, close, volume, and VWAP?

## When to prefer this

Use this endpoint when you need a single, clean previous-day OHLCV daily candle for a spot crypto pair without requiring an API key — ideal for agents that need per-request, pay-as-you-go crypto market data. Prefer this over full historical endpoints when you only need yesterday's bar, and over subscription-based APIs when usage is infrequent or unpredictable.

## Known failure modes

- Invalid pair format (not BASE-QUOTE) returns an error
- Unsupported or illiquid pair returns no data or 404
- Payment failure via x402 if insufficient USDC balance
- Network timeout for slow upstream data providers
- Weekend/holiday data may still return (crypto trades 24/7)

## How this service works

Crypto trades 24/7, so there is no session close: this returns the previous UTC calendar day's full OHLCV candle (00:00–24:00 UTC) for a spot pair — open, high, low, close, volume, and VWAP. Pass the pair in the path as BASE-QUOTE, e.g. BTC-USD. One call returns yesterday's daily bar. From x402stock, a pay-per-call market & economic data API. Pay per request in USDC via x402, no API key.

## Output

A single daily OHLCV candle for the requested spot crypto pair covering the previous full UTC calendar day (00:00–24:00 UTC), including open, high, low, close prices, total traded volume, and volume-weighted average price (VWAP).

## Request schema (JSON Schema)

```json
{
 "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
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-crypto-previous-day-ohlcv-512c88d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.x402stock.xyz](https://www.zero.xyz/host/agents.x402stock.xyz/llms.txt)
