# Alpha Vantage SMA (Simple Moving Average)

> Alpha Vantage SMA (Simple Moving Average) is a paid API for AI agents from Alpha Vantage at alphavantage.mpp.paywithlocus.com, paid per call via MPP, $0.008/call, status unknown (last checked 2026-10-11).

Calculates the Simple Moving Average (SMA) technical indicator for a given stock, forex, or crypto symbol over a specified time period and interval.

## Facts

- Endpoint: POST https://alphavantage.mpp.paywithlocus.com/alphavantage/sma?utm_source=zero.xyz
- Price: $0.008/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Provider: Alpha Vantage
- Docs: https://www.alphavantage.co/documentation/
- Website: https://www.alphavantage.co
- Tags: finance, stocks, forex, crypto, market-data, technical-analysis, data
- Canonical page: https://www.zero.xyz/c/alpha-vantage-sma-932c6817
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uptty-GHsKHwZ5P2mlhwv

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-932c6817 -d '<json body>'
```

Example prompt: Can you get me the 50-period simple moving average for AAPL using daily closing prices so I can check the trend?

## When to prefer this

Use this endpoint when you need a classic Simple Moving Average indicator for technical analysis of stocks, forex pairs, or crypto assets. Prefer SMA over EMA when you want equal weighting across all data points in the window. Best for trend identification, support/resistance level analysis, and crossover strategies (e.g. golden cross with 50/200-day SMA).

## Known failure modes

- Invalid or unknown ticker symbol returns an error message or empty data
- Unsupported interval value causes a validation error
- time_period of 0 or negative value is rejected
- Requesting intraday data without specifying a valid month may return limited results
- Rate limit exceeded returns HTTP 429 or API-level rate limit message
- Symbol not available for the requested asset class (e.g. crypto vs equities mismatch)

## How this service works

Simple Moving Average technical indicator for a given equity.

## Output

Returns a time-series of SMA values keyed by timestamp, with each data point representing the simple moving average calculated over the specified number of periods (e.g. 50-day SMA) for the given symbol and price type (e.g. close).

## Example request

```json
{
 "symbol": "AAPL",
 "interval": "daily",
 "series_type": "close",
 "time_period": 50
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "symbol",
  "interval",
  "time_period",
  "series_type"
 ],
 "properties": {
  "month": {
   "type": "string",
   "description": "Specific month (YYYY-MM) for intraday intervals"
  },
  "symbol": {
   "type": "string",
   "description": "Stock ticker symbol"
  },
  "datatype": {
   "type": "string",
   "description": "\"json\" (default) or \"csv\""
  },
  "interval": {
   "type": "string",
   "description": "Time interval: 1min, 5min, 15min, 30min, 60min, daily, weekly, monthly"
  },
  "series_type": {
   "type": "string",
   "description": "Price type: close, open, high, low"
  },
  "time_period": {
   "type": "number",
   "description": "Number of data points for calculation (e.g., 20, 50, 200)"
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/alpha-vantage-sma-932c6817/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from alphavantage.mpp.paywithlocus.com](https://www.zero.xyz/host/alphavantage.mpp.paywithlocus.com/llms.txt)
