# Crypto Price History (OHLC)

> Crypto Price History (OHLC) is a paid API for AI agents from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-15).

Returns historical OHLC candlestick data for a cryptocurrency over a specified window of days (1–365), with ISO timestamps, for charting and technical analysis.

## Facts

- Endpoint: POST https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/crypto/history
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-price-history-ohlc-aaf30e24
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RN0fuHQ4mYOpUSQSjlv3B

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 crypto-price-history-ohlc-aaf30e24 -d '<json body>'
```

Example prompt: Can you pull the 30-day OHLC candlestick history for Ethereum in USD so I can chart its price trend?

## When to prefer this

Choose this endpoint when you need structured OHLC candlestick data (open/high/low/close with timestamps) for a specific cryptocurrency over a fixed window for charting, technical analysis, or backtesting — as opposed to live spot prices, market cap time series, or volume data which are served by sibling endpoints.

## Known failure modes

- Invalid coin id or ticker returns an error or empty result
- Days value not in allowed enum (1,7,14,30,90,180,365) causes a validation error
- Unsupported vsCurrency may return an error or empty data
- Rate limiting or payment failure returns a 402 or 429 response
- Network timeout from upstream CoinGecko data source

## Output

Returns a list of OHLC candlestick objects, each containing an ISO timestamp and open, high, low, and close prices for the specified cryptocurrency and time window, denominated in the requested vs-currency (default 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [],
     "properties": {
      "coin": {
       "type": "string",
       "default": "bitcoin",
       "description": "CoinGecko id or common ticker (e.g. bitcoin, eth, sol)."
      },
      "days": {
       "enum": [
        1,
        7,
        14,
        30,
        90,
        180,
        365
       ],
       "type": "integer",
       "default": 7,
       "description": "History window in days."
      },
      "vsCurrency": {
       "type": "string",
       "default": "usd"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "machine",
      "route",
      "candles"
     ],
     "properties": {
      "coin": {
       "type": "string"
      },
      "days": {
       "type": "integer"
      },
      "count": {
       "type": "integer"
      },
      "route": {
       "type": "string"
      },
      "candles": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "low": {
          "type": [
           "number",
           "null"
          ]
         },
         "high": {
          "type": [
           "number",
           "null"
          ]
         },
         "open": {
          "type": [
           "number",
           "null"
          ]
         },
         "time": {
          "type": [
           "string",
           "null"
          ]
         },
         "close": {
          "type": [
           "number",
           "null"
          ]
         }
        }
       }
      },
      "machine": {
       "type": "string"
      },
      "economics": {
       "type": "object",
       "properties": {
        "sellPriceUsd": {
         "type": "number"
        },
        "upstreamCostUsdActual": {
         "type": [
          "number",
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-price-history-ohlc-aaf30e24/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com](https://www.zero.xyz/host/agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/llms.txt)
