# claw402 US Stock Simple Moving Average (SMA)

> claw402 US Stock Simple Moving Average (SMA) is a paid API for AI agents from claw402.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Returns the Simple Moving Average (SMA) technical indicator for a given US stock symbol, interval, and time period, paid per-call in USDC via x402.

## Facts

- Endpoint: GET https://claw402.ai/api/v1/stocks/us/sma
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/claw402-us-stock-simple-moving-average-sma-0888d18f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HtwzA1O1BqhVCwnmaPOcL

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-us-stock-simple-moving-average-sma-0888d18f
```

Example prompt: What's the 20-period simple moving average for AAPL using daily closing prices? Pay per call with USDC.

## When to prefer this

Choose this endpoint when you need SMA technical indicator data for US stocks and want to pay per-call in USDC without API key registration. Ideal for agents that need on-demand, low-cost technical analysis without subscription overhead.

## Known failure modes

- Invalid or unsupported stock symbol returns empty data array
- Unsupported interval or series_type value causes malformed request
- Insufficient USDC balance causes payment failure and 402 response
- Missing required query parameters (symbol, interval) returns error
- Rate limits or upstream data unavailability may return empty or error response

## How this service works

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

## Output

A JSON object containing a code field (0 for success) and a data array with SMA values indexed by time, representing the computed simple moving average for the requested stock symbol, interval, series type, and time period.

## 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": {
      "symbol": {
       "type": "string"
      },
      "interval": {
       "type": "string"
      },
      "series_type": {
       "type": "string"
      },
      "time_period": {
       "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-us-stock-simple-moving-average-sma-0888d18f/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)
