# TwelveX SMA (Simple Moving Average) Endpoint

> TwelveX SMA (Simple Moving Average) Endpoint is a paid API for AI agents from twelvix402.vercel.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-16).

Returns the Simple Moving Average (SMA) technical indicator for a given financial symbol, interval, and time period, powered by Twelve Data.

## Facts

- Endpoint: GET https://twelvix402.vercel.app/api/sma/%7Bsymbol%7D
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/twelvex-sma-simple-moving-average-endpoint-4d7b1981
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hkeKxY5W_GqN1qVKc2mBl

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 twelvex-sma-simple-moving-average-endpoint-4d7b1981
```

Example prompt: Can you get me the 50-period Simple Moving Average for AAPL on a daily interval using TwelveX?

## When to prefer this

Use this endpoint when you need programmatic access to Simple Moving Average technical indicator data for stocks, forex pairs, or crypto assets — especially when integrating into automated trading workflows or financial analysis pipelines that can handle micropayment-gated APIs via x402 protocol.

## Known failure modes

- Invalid or unsupported symbol returns an error or empty result
- Unsupported interval string causes a bad request error
- Payment not completed results in 402 Payment Required response
- Rate limiting or quota exceeded returns an error
- Symbol not available on Twelve Data returns a not found error

## How this service works

Premium financial data API — 25 endpoints for stocks, forex, crypto, and technical analysis. Powered by Twelve Data.

## Output

A JSON object containing SMA values for the requested symbol, computed over the specified time period and interval — suitable for charting, trend analysis, and trading signal generation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "interval": {
   "type": "string"
  },
  "time_period": {
   "type": "string",
   "description": "Default: 20"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/twelvex-sma-simple-moving-average-endpoint-4d7b1981/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twelvix402.vercel.app](https://www.zero.xyz/host/twelvix402.vercel.app/llms.txt)
