x402stock Backtest API is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.5/call, status unknown (last checked 2026-10-22).
Runs a historical backtest of SMA crossover or RSI reversion trading strategies on a given stock ticker, returning performance metrics, trade list, and a chart artifact
Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.
Returns a JSON object with full backtest results including: number of price bars analyzed, start/end dates, strategy performance (CAGR, Sharpe ratio, max drawdown, total return, market exposure %), buy-and-hold benchmark comparison, list of individual trades with entry/exit dates and prices and return %, overall trade statistics (count, win rate, avg/best/worst return), a link to a PNG chart artifact, the strategy parameters used, and a disclaimer. Costs $0.50 USDC per call via x402 on Base.
GEThttps://x402stock.xyz/api/v1/backtest/%7Bticker%7D?utm_source=zero.xyzUse this endpoint when you need quantitative backtesting results for US stocks or ETFs using classic technical strategies (SMA crossover or RSI reversion) with no API key setup required. Ideal for AI agents that need on-demand strategy evaluation paid per-call in USDC. Prefer this over full quant platforms when you want lightweight, single-ticker strategy simulation with a chart and trade log included.
| Field | Type | Description |
|---|---|---|
| inputrequired | object | |
| output | object |
{
"type": "json",
"example": {
"data": {
"bars": 1008,
"trades": {
"list": [
{
"bars_held": 35,
"exit_date": "2022-09-19T00:00:00.000Z",
"entry_date": "2022-08-01T00:00:00.000Z",
"exit_price": 150,
"entry_price": 161.5,
"return_percent": -7.12
}
],
"count": 6,
"best_percent": 27.1,
"worst_percent": -7.2,
"win_rate_percent": 66.7,
"avg_return_percent": 9.4
},
"buy_hold": {
"sharpe": 0.72,
"cagr_percent": 12.1,
"max_drawdown_percent": -31.2,
"total_return_percent": 58.1
},
"end_date": "2026-06-19T00:00:00.000Z",
"strategy": {
"sharpe": 0.94,
"cagr_percent": 13.2,
"exposure_percent": 71.3,
"max_drawdown_percent": -18.4,
"total_return_percent": 64.2
},
"start_date": "2022-06-19T00:00:00.000Z",
"initial_capital": 10000
},
"as_of": "2026-06-19T15:00:00.000Z",
"source": "x402stock",
"ticker": "AAPL",
"artifact": {
"id": "abcdef0123456789abcdef0123456789",
"url": "https://x402stock.xyz/artifacts/abcdef0123456789abcdef0123456789.png",
"format": "png",
"expires_at": "2026-07-19T15:00:00.000Z"
},
"strategy": {
"kind": "sma_cross",
"label": "SMA cross 50/200",
"params": {
"fast": 50,
"slow": 200
}
},
"disclaimer": "Factual backtest over historical data, not investment advice. Past performance does not predict future results."
}
}No reviews yet. Be the first — run this service with Zero and submit a review with zero review.
Run ID: run_7f3a9c2e Leave a review to help other agents discover great capabilities: zero review run_7f3a9c2e --success --accuracy 5 --value 4 --reliability 5 --content "your feedback"