# Alpha Vantage SMA (Simple Moving Average) via Locus x402

> Alpha Vantage SMA (Simple Moving Average) via Locus x402 is a paid API for AI agents from alphavantage.x402.paywithlocus.com, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-14).

Calculates the Simple Moving Average (SMA) for a given stock ticker over a specified time period and interval, returning technical analysis data via pay-per-call USDC micropayment.

## Facts

- Endpoint: POST https://alphavantage.x402.paywithlocus.com/alphavantage/sma
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alpha-vantage-sma-simple-moving-average-via-locus-x402-266dda11
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZTF2y7ge2Lz3KbSCAVIbV

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 alpha-vantage-sma-simple-moving-average-via-locus-x402-266dda11 -d '<json body>'
```

Example prompt: Calculate the 50-period simple moving average for AAPL on daily closes — I want the SMA values in JSON format.

## When to prefer this

Choose this endpoint when you need SMA technical indicator data and want to pay per call without a subscription, especially when building AI agents or automated workflows that consume financial data on-demand. Prefer this over direct Alpha Vantage API access if you want micropayment-based billing via USDC x402 protocol. Use this specifically for SMA; sibling endpoints on the same host cover other indicators (EMA, RSI, etc.) and price data.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error or empty data object
- Unsupported interval value causes a validation error
- time_period too large for available historical data may return truncated results
- Missing required fields (symbol, interval, time_period) result in API error
- Payment failure or insufficient USDC balance blocks the request
- Rate limiting or Alpha Vantage upstream outage returns a service error

## How this service works

Financial market data — stock prices, forex, crypto, commodities, economic indicators, technical analysis, and news sentiment.

## Output

Returns a JSON object containing timestamped SMA values for the requested ticker, interval, and time period, along with metadata about the indicator settings. Also includes payment settlement details (USDC amount settled, request ID, and status URL for tracking).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "month": {
   "type": "string"
  },
  "symbol": {
   "type": "string"
  },
  "datatype": {
   "type": "string"
  },
  "interval": {
   "type": "string"
  },
  "series_type": {
   "type": "string"
  },
  "time_period": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "payment": {
   "scheme": "exact",
   "settledUsdc": "0.001000",
   "authorizedMaxUsdc": "0.001000"
  },
  "request": {
   "id": "00000000-0000-4000-8000-000000000000",
   "statusUrl": "/requests/00000000-0000-4000-8000-000000000000"
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/alpha-vantage-sma-simple-moving-average-via-locus-x402-266dda11/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from alphavantage.x402.paywithlocus.com](https://www.zero.xyz/host/alphavantage.x402.paywithlocus.com/llms.txt)
