# Memecoin Backtest Engine

> Memecoin Backtest Engine is a paid API for AI agents from agent-data.centorprat.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-29).

Backtests a memecoin trading strategy against historical pump.fun token launches using 1-minute bars, replaying your screen filters and exit rules to report win rate, returns, and trade analytics.

## Facts

- Endpoint: POST https://agent-data.centorprat.workers.dev/crypto/backtest?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/memecoin-backtest-engine-85577a11
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r2KK9abeCvkuYljxYCnCI

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 memecoin-backtest-engine-85577a11 -d '<json body>'
```

Example prompt: Backtest my pump.fun memecoin strategy over the last 14 days, entering at 15-minute token age, with a 50% take-profit, 20% stop-loss, and 2% fees per side — what's the win rate and average return?

## When to prefer this

Use this endpoint when you need to validate a pump.fun memecoin trading strategy — including screen filters and multi-tier exit logic — against real historical token launches before deploying capital. Prefer it over live screeners when you want quantified performance metrics (win rate, return distribution, exit breakdown) with realistic fee modeling. It is especially useful when comparing entry timing windows (5/15/30/60 min) or validating that a preset's signal ledger has edge.

## Known failure modes

- Invalid entryAt value (must be 5, 15, 30, 60, or 'signal')
- Strategy filters reference unknown fields — call GET /crypto/screen-fields first
- Lookback window too large with insufficient historical data
- Missing required strategy object in request body
- Payment failure or insufficient USDC balance for $0.01 per-call fee
- Conflicting exit parameters (e.g. trailing stop activates above take-profit)

## How this service works

Pay-per-call data and tools for AI agents, $0.002-0.01 per call in USDC via x402 (Base, Polygon or Solana), no account or API key; MAX tiers ($0.05-0.25) run deeper jobs. Agent toolkit: web search, search + read top pages, any page as clean markdown with a prompt-injection check, which-x402-API-to-call recommender, seller check. Data: Google Maps places with contacts, YouTube video data and transcripts, job listings (Indeed, LinkedIn, 13 boards), Google Ads Transparency, TikTok comments, Pinterest, Airbnb, Redfin, AliExpress, app stores, live sports, website and SEO checks, Shopify store tech stacks, and onchain token / address risk checks.

## Output

Returns a structured report including win rate, average and median return after fees, breakdown of exit reasons (take-profit tier hits, stop-loss, trailing stop, time stop), per-day performance results, and the best and worst individual trades from the backtest window.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "days": {
   "type": "number",
   "description": "lookback, default 7"
  },
  "exits": {
   "type": "object",
   "description": "takeProfit, stopLossPct, trailingStopPct, trailingActivatesAtPct, maxHoldMinutes"
  },
  "entryAt": {
   "description": "5 | 15 | 30 | 60 (pump.fun snapshot age) or \"signal\" (a preset's live signals)"
  },
  "strategy": {
   "type": "object",
   "description": "screen strategy (preset and/or filters); GET /crypto/screen-fields"
  },
  "costPctPerSide": {
   "type": "number",
   "description": "fees + slippage per side, default 2"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "byDay": {
   "2026-10-24": {
    "trades": 140,
    "avgReturnPct": 4.1
   }
  },
  "trades": 412,
  "examples": {
   "best": [],
   "worst": []
  },
  "winRatePct": 31.8,
  "exitReasons": {
   "stop-loss": 260,
   "take-profit": 61
  },
  "avgReturnPct": 6.4,
  "medianReturnPct": -27.1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/memecoin-backtest-engine-85577a11/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data.centorprat.workers.dev](https://www.zero.xyz/host/agent-data.centorprat.workers.dev/llms.txt)
