# claw402 Alpaca Bars — OHLCV Market Data via x402

> claw402 Alpaca Bars — OHLCV Market Data via x402 is a paid API for AI agents from claw402.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Fetches historical OHLCV bar data for one or more stock symbols from Alpaca Markets, payable per-call with USDC via the x402 protocol

## Facts

- Endpoint: GET https://claw402.ai/api/v1/alpaca/bars
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/claw402-alpaca-bars-ohlcv-market-data-via-x402-9b129613
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_L9w3sdfcl_mzw5EYyqIGW

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 claw402-alpaca-bars-ohlcv-market-data-via-x402-9b129613
```

Example prompt: Pull the daily OHLCV bars for AAPL and TSLA from January 1 2024 to March 31 2024, adjusted for splits, sorted ascending, up to 1000 bars each — pay the $0.002 USDC fee from my wallet.

## When to prefer this

Choose this endpoint when you need Alpaca-sourced OHLCV bar data for US equities and want to avoid API key registration by paying micro-fees in USDC via the x402 protocol. Ideal for autonomous AI agents with a crypto wallet that need on-demand market data without long-term subscriptions.

## Known failure modes

- Payment not received or insufficient USDC balance — 402 Payment Required response
- Invalid or unrecognized symbol — empty data array or error code
- Invalid timeframe or date range parameters — malformed request error
- Date range too large exceeding limit — truncated or error response
- No data available for given date range (e.g. market holiday) — empty data array

## How this service works

Backed by vergex.trade. Pay for any API with USDC. No API keys. No registration. Just a wallet.

## Output

Returns a JSON object with a code field (0 for success) and a data array containing OHLCV bar records for the requested symbols, each bar including open, high, low, close, volume, and timestamp fields.

## 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"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "end": {
       "type": "string"
      },
      "feed": {
       "type": "string"
      },
      "sort": {
       "type": "string"
      },
      "limit": {
       "type": "string"
      },
      "start": {
       "type": "string"
      },
      "symbols": {
       "type": "string"
      },
      "timeframe": {
       "type": "string"
      },
      "adjustment": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "code": 0,
  "data": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/claw402-alpaca-bars-ohlcv-market-data-via-x402-9b129613/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from claw402.ai](https://www.zero.xyz/host/claw402.ai/llms.txt)
