# x402stock Crypto Pair Daily Open/Close Price

> x402stock Crypto Pair Daily Open/Close Price 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 daily open and close price for a given cryptocurrency trading pair on a specified date

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/crypto/%7Bpair%7D/open-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-pair-daily-open-close-price-71671e89
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6pC5PmGuoverBi6HHQehK

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-daily-open-close-price-71671e89
```

Example prompt: What were the open and close prices for BTC/USD on May 15, 2025?

## When to prefer this

Use this endpoint when you need the exact daily open and close price for a specific crypto trading pair on a specific historical date, especially when integrating with AI agent workflows that pay per call in USDC via x402 on Base and require no API keys or account setup.

## Known failure modes

- Date not yet available (market still open or data not ingested) — may return null date or empty data
- Invalid pair symbol — returns error or empty response
- Date in wrong format (not YYYY-MM-DD) — schema validation error
- Weekend/holiday with no trading data — may return null or empty
- Payment failure via x402 — 402 Payment Required response

## 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 ticker symbol (e.g. X:BTCUSD), the date, the open price, the close price, a source label of 'x402stock', and an as_of timestamp indicating data freshness.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "date": "2024-01-15",
   "pair": "BTC-USD"
  }
 }
}
```

## 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"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "date"
     ],
     "properties": {
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "ticker",
      "data",
      "source",
      "as_of"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "date",
        "open",
        "close"
       ],
       "properties": {
        "date": {
         "anyOf": [
          {
           "type": "string"
          },
          {
           "type": "null"
          }
         ]
        },
        "open": {
         "type": "number"
        },
        "close": {
         "type": "number"
        }
       },
       "additionalProperties": false
      },
      "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
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "date": "2025-05-15",
   "open": 103540.91,
   "close": 103786.43
  },
  "as_of": "2025-05-15T00:00:00.000Z",
  "source": "x402stock",
  "ticker": "X:BTCUSD"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-crypto-pair-daily-open-close-price-71671e89/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)
