# AgentOracle Token Price History

> AgentOracle Token Price History is a paid API for AI agents from aiagentoracle.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns a time-series array of historical price points (hourly or daily) for a single cryptocurrency token by ticker symbol

## Facts

- Endpoint: GET https://aiagentoracle.ai/api/v1/token/BTC/history
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aiagentoracle-ai-7b387928
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kieN7AXmJsWldYcUt5T9X

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 aiagentoracle-ai-7b387928
```

Example prompt: Can you pull the hourly price history for BTC over the last 14 days — I need 200 data points to backtest a trading strategy?

## When to prefer this

Use this endpoint when you need historical price time-series data for a specific cryptocurrency token for charting, backtesting, or trend analysis. Choose `interval=hour` for intraday granularity (up to 14 days back) and `interval=day` for longer-term daily trends (up to 365 days). Prefer this over spot-price endpoints when you need multiple price points over time rather than a single current price.

## Known failure modes

- Unknown or unsupported ticker symbol returns 404 or empty result
- limit exceeding 200 returns validation error
- Invalid interval value (not 'hour' or 'day') returns 400 bad request
- Payment failure (x402) if USDC not provided or insufficient balance
- Rate limiting if too many requests in short period

## How this service works

AgentOracle: price history time-series for a single token — array of `{ t, price }` points at hourly or daily intervals. Pass `interval=hour` (returns hourly points over last 1-14 days) or `interval=day` (daily points over last 30-365 days). `limit` defaults to 24, max 200. Ideal for trading bots, charting agents, and backtesting.

## Output

A JSON object containing the token symbol, interval type, asOf timestamp, and an array of up to 200 `{ t, price }` points where `t` is an ISO 8601 datetime and `price` is the USD spot price at that time, ordered oldest-to-newest.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "pathParams": {
   "symbol": "BTC"
  },
  "queryParams": {
   "limit": 24,
   "interval": "hour"
  }
 }
}
```

## 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"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "symbol"
     ],
     "properties": {
      "symbol": {
       "type": "string",
       "description": "Uppercase ticker symbol."
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "default": 24,
       "maximum": 200,
       "minimum": 1,
       "description": "Number of points to return (newest last)."
      },
      "interval": {
       "enum": [
        "hour",
        "day"
       ],
       "type": "string",
       "default": "hour",
       "description": "Time bucket. `hour` returns hourly points; `day` returns daily points."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "symbol",
      "interval",
      "points",
      "asOf"
     ],
     "properties": {
      "asOf": {
       "type": "string",
       "format": "date-time"
      },
      "points": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "t",
         "price"
        ],
        "properties": {
         "t": {
          "type": "string",
          "format": "date-time"
         },
         "price": {
          "type": "number",
          "description": "Spot price in USD at timestamp `t`."
         }
        }
       }
      },
      "symbol": {
       "type": "string"
      },
      "interval": {
       "enum": [
        "hour",
        "day"
       ],
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aiagentoracle-ai-7b387928/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aiagentoracle.ai](https://www.zero.xyz/host/aiagentoracle.ai/llms.txt)
