---
name: "xpay-financial-modeling-prep-getsma"
description: "Calculate the Simple Moving Average (SMA) for a stock using the FMP SMA API. This tool helps users analyze trends and identify potential buy or sell signals based on historical price data."
version: "1.0.0"
price: "$0.01/call"
provider: "Financial Modeling Prep"
---

# GetSMA

Calculate the Simple Moving Average (SMA) for a stock using the FMP SMA API. This tool helps users analyze trends and identify potential buy or sell signals based on historical price data.

**Provider:** Financial Modeling Prep
**Price:** $0.01/call
**Pricing model:** Flat rate per call

## When to Use

Use this tool when you need to calculate the simple moving average (sma) for a stock using the fmp sma api. this tool helps users analyze trends and identify potential buy or sell signals based on historical price data.. This is part of the Financial Modeling Prep provider on xpay✦.

## MCP Connection

Connect to xpay✦ to access this tool (and 252+ others):

```json
{
  "mcpServers": {
    "xpay": {
      "url": "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
    }
  }
}
```

For Claude Code:
```bash
claude mcp add --transport http xpay "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
```

## How to Execute

Use the xpay✦ meta-tools to run this tool:

1. **`xpay_details`** — Get full input schema: `xpay_details("financial-modeling-prep/getSMA")`
2. **`xpay_run`** — Execute: `xpay_run("financial-modeling-prep/getSMA", { ...inputs })`

## Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `symbol` | string | Yes | Stock symbol |
| `timeframe` | string | Yes | Timeframe (1min, 5min, 15min, 30min, 1hour, 4hour, 1day) |
| `periodLength` | number | Yes | Period length for the indicator |
| `from` | string | No | Start date (YYYY-MM-DD) |
| `to` | string | No | End date (YYYY-MM-DD) |

## Pricing

- **Cost:** $0.01/call
- **Balance check:** Use `xpay_balance` to check remaining credits
- Get your API key at [xpay.tools](https://xpay.tools/account/settings/api-keys/) — $5 free credits included

## Related Skills

- [Financial Modeling Prep (all tools)](https://xpay.tools/skills/financial-modeling-prep/SKILL.md) — 253 tools
- [SearchSymbol](https://xpay.tools/skills/financial-modeling-prep/searchsymbol/SKILL.md) — $0.01/call
- [SearchName](https://xpay.tools/skills/financial-modeling-prep/searchname/SKILL.md) — $0.01/call
- [SearchCIK](https://xpay.tools/skills/financial-modeling-prep/searchcik/SKILL.md) — $0.01/call
- [SearchCUSIP](https://xpay.tools/skills/financial-modeling-prep/searchcusip/SKILL.md) — $0.01/call
- [SearchISIN](https://xpay.tools/skills/financial-modeling-prep/searchisin/SKILL.md) — $0.01/call

## Links

- Tool page: https://xpay.tools/financial-modeling-prep/getsma/
- Provider: https://xpay.tools/financial-modeling-prep/
- All tools: https://xpay.tools/explore
