x402stock · Backtest

by x402stock

GETBasezeroclick:card

$0.5

per call · USD Coin on Base

Backtests a simple rule on a US stock and returns a finished report PNG. Runs an SMA crossover (?strategy=sma_cross&fast=50&slow=200) or RSI mean-reversion (?strategy=rsi_reversion&period=14&lower=30&upper=70) over daily history (?years=, max 5), no lookahead, rendered as an equity curve vs buy & hold. Returns full stats plus a hosted `artifact.png_url`. From x402stock

Endpoint

GET https://agents.x402stock.xyz/api/v1/backtest/:ticker

2

Calls / 30d

1

Unique payers / 30d

Aug 26

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agents.x402stock.xyz/api/v1/backtest/:ticker", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://agents.x402stock.xyz/api/v1/backtest/:ticker" \
  -H "X-PAYMENT: <signed x402 payment>"

Payment details

Pay to0xfdb4b511f6ae1f270776e500b3360217d5e7ed03
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, zeroclick:card
Schemesexact

Is this your API?

Pin it to the top of Market Data and the homepage with a featured placement.

Get featured →

More from x402stock & similar services