# ScriptMasterLabs Backtest Run API

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

Runs a trading strategy backtest over historical data for a given symbol, venue, and time horizon, settled via x402 USDC micropayment.

## Facts

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

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-backtest-run-api-aeb461a3
```

Example prompt: Run a backtest on a momentum strategy for BTC over the last 90 days on Coinbase with 10 bps fees and 5 bps slippage, allowing short positions, using daily intervals.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call backtesting computation for crypto trading strategies without committing to a subscription service. It is best suited for agents that need on-demand historical strategy simulation with configurable fees, slippage, and short-selling assumptions, and can pay in USDC via the x402 protocol on Base.

## Known failure modes

- Missing required 'symbol' or 'strategy' query parameter returns an error
- Unsupported venue or strategy name causes a failure or empty result
- Payment not settled via x402 results in HTTP 402 Payment Required
- Invalid interval or days value may cause a computation error
- Hosted on Render free tier — cold starts may cause timeouts or slow responses
- Undocumented response schema means output format may change without notice

## 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 output for the specified symbol, strategy, venue, and parameters — likely including metrics such as returns, drawdown, trade count, and other simulation statistics, though the exact response schema is undocumented (returns generic example object).

## 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"
      },
      "venue": {
       "type": "string",
       "description": "venue"
      },
      "symbol": {
       "type": "string",
       "description": "symbol"
      },
      "fee_bps": {
       "type": "string",
       "description": "fee_bps"
      },
      "interval": {
       "type": "string",
       "description": "interval"
      },
      "strategy": {
       "type": "string",
       "description": "strategy"
      },
      "allow_short": {
       "type": "string",
       "description": "allow_short"
      },
      "slippage_bps": {
       "type": "string",
       "description": "slippage_bps"
      }
     }
    }
   }
  },
  "output": {
   "properties": {
    "example": {}
   }
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scriptmasterlabs-backtest-run-api-aeb461a3/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)
