# claw402 Alpaca Historical Quotes via x402

> claw402 Alpaca Historical Quotes 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 quote (bid/ask) data for one or more stock symbols from Alpaca Markets, accessed via USDC micropayment with no API key required.

## Facts

- Endpoint: GET https://claw402.ai/api/v1/alpaca/quotes/history
- 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-historical-quotes-via-x402-b60b256d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WvMl-JMgG-Nrmk7z8LjTG

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-historical-quotes-via-x402-b60b256d
```

Example prompt: Can you pull the historical bid/ask quotes for AAPL and TSLA from Alpaca for the past week — limit to 100 records, sorted ascending?

## When to prefer this

Choose this endpoint when you need historical quote (bid/ask) data from Alpaca Markets and want to avoid API key registration — ideal for agents that can pay per-call in USDC via x402 protocol. Prefer over direct Alpaca API when operating in a keyless, wallet-based environment.

## Known failure modes

- Missing or invalid symbols parameter returns empty data array
- Invalid date format for start/end causes malformed request
- Payment failure via x402 results in 402 response and no data returned
- Unsupported feed value may return empty or error response
- Limit value out of acceptable range may cause unexpected results

## 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 historical quote records (bid/ask prices, timestamps, etc.) for the requested symbols within the specified time range.

## 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"
      }
     }
    }
   },
   "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-historical-quotes-via-x402-b60b256d/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)
