# Crypto Spot Pair Previous Day OHLCV (x402stock)

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

Returns the previous UTC calendar day's full OHLCV candle (open, high, low, close, volume, VWAP) for a crypto spot pair, covering 00:00–24:00 UTC.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/crypto/{pair}/prev-close
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-10
- Activations on Zero: 0
- Provider: agents.x402stock.xyz
- Website: https://agents.x402stock.xyz
- Canonical page: https://www.zero.xyz/c/agents-x402stock-xyz-crypto-spot-pair-previous-day-ohlcv-x402stock-7af8eef2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PbKeTH1FCPmZNT7oUujNN

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 agents-x402stock-xyz-crypto-spot-pair-previous-day-ohlcv-x402stock-7af8eef2
```

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

## When to prefer this

Use this endpoint when you need exactly yesterday's UTC daily bar (00:00–24:00 UTC) for a crypto spot pair in a single low-cost call ($0.01 USDC). Prefer this over historical bar endpoints when you only need the most recent completed day and don't want to specify date parameters. Ideal for daily portfolio tracking, end-of-day reporting, or feeding yesterday's price into a downstream calculation.

## Known failure modes

- Unsupported or misspelled pair returns null data field
- Invalid pair format (not BASE-QUOTE) may cause error or null response
- Data unavailable for thinly traded or unsupported pairs
- Payment failure via x402 if insufficient USDC balance

## 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 JSON object containing the ticker symbol, yesterday's OHLCV data (open, high, low, close, volume, VWAP, trade count, timestamp), the as_of date string, and a source field identifying x402stock. The data field may be null if no data is available for the pair.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "pair"
 ],
 "properties": {
  "pair": {
   "type": "string",
   "description": "Currency or crypto spot pair as BASE-QUOTE, e.g. EUR-USD or BTC-USD."
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-x402stock-xyz-crypto-spot-pair-previous-day-ohlcv-x402stock-7af8eef2/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)
