{"uid":"cap_4WejGXrPOH09Nkj2DiaAF","slug":"speraxos-defi-strategy-backtesting-api-736d7848","name":"SperaxOS DeFi Strategy Backtesting API","description":"AI-powered DeFi intelligence APIs payable via the x402 HTTP payment protocol. No API key required — pay per request with USDC on Base. Identity-only (SIWX) endpoints are free for wallets with an agentcash identity.","url":"https://chat.sperax.io/api/x402/tools/backtesting/runBacktest?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"chainId":{"type":"number","description":"Chain ID (e.g. 1 for Ethereum, 42161 for Arbitrum)."},"endDate":{"type":"string","description":"End date in ISO format (YYYY-MM-DD). Defaults to today. Max 2 years of history."},"protocol":{"type":"string","description":"Protocol name to backtest (e.g. 'Aave V3', 'Curve Finance', 'Yearn Finance')."},"strategy":{"enum":["yield_farming","dca","yield_rebalancing","static_hold"],"type":"string","description":"Strategy type: 'yield_farming' (deploy into protocol and collect yield), 'dca' (dollar-cost average into a token), 'yield_rebalancing' (yield farm with periodic rebalancing), 'static_hold' (buy and hold token)."},"startDate":{"type":"string","description":"Start date in ISO format (YYYY-MM-DD). Maximum 2 years in the past."},"targetToken":{"type":"string","description":"For DCA strategy: the CoinGecko token ID to accumulate (e.g. 'ethereum', 'bitcoin')."},"dcaFrequency":{"enum":["daily","weekly","monthly"],"type":"string","description":"For DCA strategy: how often to buy. One of 'daily', 'weekly', 'monthly'."},"initialCapital":{"type":"number","description":"Initial capital in USD (e.g. 10000)."},"reinvestEarnings":{"type":"boolean","description":"Whether to compound (reinvest) earnings daily. Default: true."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fctWZHQgHqdQ1dwm-wKUL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0xD74f5255D557944cf7Dd0E45FF521520002D5748","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs historical backtests of DeFi investment strategies (yield farming, DCA, rebalancing, static hold) on specified protocols and chains, returning simulated performance metrics over a given date range.","exampleAgentPrompt":"Backtest a yield farming strategy on Aave V3 on Ethereum starting January 1 2023 through December 31 2023 with $10,000 initial capital and reinvest earnings turned on — what would my returns have been?","exampleUseCases":[{"title":"Yield farming performance check","prompt":"How would $5,000 deployed into Curve Finance yield farming on Ethereum have performed from January 2023 to January 2024, with earnings reinvested daily?"},{"title":"Weekly DCA into ETH simulation","prompt":"Simulate a $10,000 DCA strategy buying Ethereum weekly on Arbitrum from January 1 2023 to December 31 2023 — how much ETH would I have accumulated and what's the final portfolio value?"},{"title":"Static hold vs yield rebalancing comparison","prompt":"Backtest a yield rebalancing strategy on Yearn Finance on Ethereum with $20,000 starting capital from June 2023 to June 2024, compounding daily, so I can compare it against just holding."}],"resultDescription":"Returns simulated backtest results for the specified DeFi strategy, including historical portfolio performance, total returns, yield earned, and period-over-period metrics based on real historical protocol data over the specified date range and initial capital.","failureModes":["Protocol name not recognized or misspelled — returns error indicating invalid protocol","Date range exceeds 2-year maximum — returns validation error","Chain ID not supported for the specified protocol — returns incompatibility error","Target token CoinGecko ID not found for DCA strategy — returns token lookup error","Start date after end date — returns date range validation error","Payment failure via x402 — returns 402 Payment Required if USDC payment not settled"],"whenToPreferThis":"Choose this endpoint when you need historical simulation of DeFi strategies on specific protocols like Aave, Curve, or Yearn Finance. Ideal for comparing yield farming vs holding vs DCA strategies with real historical on-chain data. Pay-per-use via USDC x402 means no API key setup required — best for agents or users who need occasional on-demand backtesting without a subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-03T00:48:07.585Z","isFirstParty":false,"canonicalSlug":"speraxos-defi-strategy-backtesting-api-736d7848"}