# ScriptMasterLabs ACP x402 — Backtest Sweep

> ScriptMasterLabs ACP x402 — Backtest Sweep is a paid API for AI agents from acp-x402-discovery.onrender.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Runs a parametric sweep backtest of a trading strategy over a crypto asset, testing combinations of fast/slow moving-average periods across a specified lookback window and venue.

## Facts

- Endpoint: GET https://acp-x402-discovery.onrender.com/x402/backtest-sweep
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scriptmasterlabs-acp-x402-backtest-sweep-4d926e65
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xii_ZsRZSxDr74043VGIl

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 scriptmasterlabs-acp-x402-backtest-sweep-4d926e65
```

Example prompt: Run a backtest sweep on BTC using a crossover strategy on Binance over the last 90 days with 1-hour intervals, testing fast MA of 10 and slow MA of 50.

## When to prefer this

Use this endpoint when you need to evaluate how different fast/slow moving average parameter combinations perform for a specific crypto trading strategy on a given venue, and you want sweep-style optimization rather than a single fixed backtest run. It is well-suited for quantitative agents doing strategy optimization loops.

## Known failure modes

- Missing required 'symbol' or 'strategy' parameter returns validation error
- Invalid venue name returns an error or empty results
- Unsupported interval string causes a parameter error
- Very short 'days' windows with high-frequency intervals may yield insufficient data
- Payment not settled in USDC on Base causes x402 authorization failure

## How this service works

Pay-per-call crypto, RWA, federal, SEC, and compliance APIs. Settled in USDC on Base via x402. Hyphen routes only (e.g. /x402/rwa-aggregates, /x402/gas-tracker).

## Output

Returns backtest performance results for the specified symbol, strategy, and MA parameter combinations across the given lookback window and venue, including metrics such as returns, trade counts, and parameter-level comparisons.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "days": {
       "type": "string",
       "description": "days"
      },
      "fast": {
       "type": "string",
       "description": "fast"
      },
      "slow": {
       "type": "string",
       "description": "slow"
      },
      "venue": {
       "type": "string",
       "description": "venue"
      },
      "symbol": {
       "type": "string",
       "description": "symbol"
      },
      "interval": {
       "type": "string",
       "description": "interval"
      },
      "strategy": {
       "type": "string",
       "description": "strategy"
      }
     }
    }
   }
  },
  "output": {
   "properties": {
    "example": {}
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scriptmasterlabs-acp-x402-backtest-sweep-4d926e65/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from acp-x402-discovery.onrender.com](https://www.zero.xyz/host/acp-x402-discovery.onrender.com/llms.txt)
