# CoinCap Simple Moving Average (SMA)

> CoinCap Simple Moving Average (SMA) is a paid API for AI agents from rest.coincap.io, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-13).

Returns the Simple Moving Average (SMA) technical indicator for a cryptocurrency asset by slug

## Facts

- Endpoint: GET https://rest.coincap.io/v3/agentFriendly/ta/%7Bslug%7D/sma
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coincap-simple-moving-average-sma-dda027c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tFfuyd-84MNgAQZ9iWELG

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 coincap-simple-moving-average-sma-dda027c3
```

Example prompt: What's the current simple moving average for bitcoin on CoinCap? I want to see if it's trending up or down.

## When to prefer this

Choose this endpoint when you need a Simple Moving Average (SMA) technical indicator specifically for a cryptocurrency asset and want either keyless per-call USDC payment via x402 or API key access. Prefer this over MACD or other siblings when you need a straightforward smoothed price trend rather than momentum divergence. Ideal for agents that need lightweight, real-time technical analysis without a subscription signup.

## Known failure modes

- Invalid or unknown asset slug returns an error or empty result
- Network timeout if the real-time data feed is slow
- x402 payment failure if USDC balance is insufficient or Base transaction fails
- Missing Authorization header and no x402 payment results in 402 Payment Required
- Rate limiting if too many requests are made in a short window

## How this service works

CoinCap gives AI agents, apps, and developers real-time cryptocurrency market data.

Two ways to access:
- **API key** — sign up at https://coincap.io and pass `Authorization: Bearer <key>` or `?apiKey=<key>`.
- **Keyless x402** (agents) — the 10 `agentFriendly` endpoints accept per-call USDC payment on Base via the [x402 protocol](https://x402.gitbook.io/x402). No signup needed. See `/.well-known/x402.json` for the machine-readable payment catalog.

## Output

Returns a JSON object containing the Simple Moving Average (SMA) technical indicator values for the specified cryptocurrency asset, calculated from historical price data. Typically includes the SMA value(s) and associated metadata such as the asset slug and time period used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "slug"
 ],
 "properties": {
  "slug": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coincap-simple-moving-average-sma-dda027c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rest.coincap.io](https://www.zero.xyz/host/rest.coincap.io/llms.txt)
