# x402stock Backtest via ZeroClick

> x402stock Backtest via ZeroClick is a paid API for AI agents from agents.x402stock.xyz, paid per call via x402, $0.5/call, status unknown (last checked 2026-09-13).

Runs a historical backtest simulation for a given US stock or ETF ticker, returning performance metrics, paid per request in USDC via x402.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/backtest/%7Bticker%7D
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-backtest-via-zeroclick-666ddcbe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IYhn1utU3r14hrWewwNiG

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 x402stock-backtest-via-zeroclick-666ddcbe
```

Example prompt: Can you run a historical backtest on AAPL for me and show me how the strategy would have performed — things like total return, max drawdown, and Sharpe ratio?

## When to prefer this

Choose this endpoint when you need to computationally evaluate historical performance of a US stock or ETF ticker using a standardized backtest framework, especially when operating as an autonomous agent without API keys (pay-per-use USDC via x402). Prefer this over manual data pulls when you want pre-computed risk metrics like Sharpe ratio and max drawdown rather than raw price series.

## Known failure modes

- Invalid or unsupported ticker symbol returns an error
- Insufficient USDC balance causes payment failure and the request is rejected
- Ticker not covered by x402stock's data catalog returns a not-found error
- Network or proxy timeout from ZeroClick intermediary
- Malformed ticker path parameter causes a 400 bad request

## How this service works

Market and economic data for AI agents — US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities (crude, natural gas, gasoline), US and global macro (Fed funds, CPI/PCE, jobs, GDP, Treasury debt & yields, World Bank indicators), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 or MPP. This server is a pay-per-use, transparent proxy in front of x402stock's own API: it handles identity, payment, and proxying. Agents can purchase autonomously or with their human's approval. This document is the source of truth for agents: it lists the complete verified paid surface with each operation's live price in its x-payment-info. Endpoints not listed here are not part of the supported catalog. The live catalog at /manifest.json is authoritative for prices and any free included units (prices[].includedUnits) - some meters include free usage per account before any charge.

## Output

Returns historical backtest results for the specified ticker, including performance metrics such as total return, annualized return, max drawdown, Sharpe ratio, volatility, and other portfolio statistics computed over historical price data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-backtest-via-zeroclick-666ddcbe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.x402stock.xyz](https://www.zero.xyz/host/agents.x402stock.xyz/llms.txt)
