{"uid":"cap_Raw0UKACpMSBGvTBQnuvK","slug":"fiatdock-crypto-backtester-b71a42c1","name":"FiatDock Crypto Backtester","description":"Backtest a stated trading rule on a crypto asset's daily USD closes (Coinbase Exchange) and compare it with buying and holding: SMA crossover, RSI mean reversion, DCA or buy-and-hold, 30-365 days, with fees. Returns total return, drawdown, Sharpe, win rate, exposure, every trade and the equity curve; the rules are published in every answer. Send {} for BTC, SMA 20/50, 180 days. A test of the past, not advice. Pay-per-call via x402.","url":"https://fiatdock.com/v1/market/backtest?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"days":{"type":"integer","example":180,"maximum":365,"minimum":30,"description":"Length of the tested window in days, 30-365 (default 180)"},"fast":{"type":"integer","example":20,"maximum":100,"minimum":2,"description":"sma_cross: fast moving-average length in days, 2-100 (default 20)"},"slow":{"type":"integer","example":50,"maximum":200,"minimum":3,"description":"sma_cross: slow moving-average length in days, 3-200, longer than fast (default 50)"},"asset":{"type":"string","example":"BTC","maxLength":10,"description":"Crypto asset ticker with a USD market on Coinbase Exchange (BTC, ETH, SOL, …). Default BTC"},"feeBps":{"type":"number","example":10,"maximum":100,"minimum":0,"description":"Fee on every trade in basis points, 0-100 (default 10 = 0.1%)"},"rsiBuy":{"type":"number","example":30,"maximum":50,"minimum":1,"description":"rsi_reversion: buy when RSI falls below this, 1-50 (default 30)"},"rsiSell":{"type":"number","example":70,"maximum":99,"minimum":50,"description":"rsi_reversion: sell when RSI rises above this, 50-99 (default 70)"},"strategy":{"enum":["sma_cross","rsi_reversion","dca","buy_and_hold"],"type":"string","example":"sma_cross","description":"sma_cross (long while the fast moving average is above the slow one), rsi_reversion (buy when RSI falls below rsiBuy, sell when it rises above rsiSell), dca (buy a fixed amount every dcaEveryDays), buy_and_hold. Default sma_cross"},"rsiPeriod":{"type":"integer","example":14,"maximum":50,"minimum":2,"description":"rsi_reversion: RSI length in days, 2-50 (default 14)"},"capitalUsd":{"type":"number","example":1000,"maximum":10000000,"minimum":10,"description":"Starting capital in USD, 10-10000000 (default 1000)"},"dcaEveryDays":{"type":"integer","example":7,"maximum":30,"minimum":1,"description":"dca: days between purchases, 1-30 (default 7)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.009","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.009/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.009","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.009","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Yq05ULhPbdjAHb_7qRg7z","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.009","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Backtests a trading strategy (SMA crossover, RSI mean reversion, DCA, or buy-and-hold) against a crypto asset's historical daily USD closes on Coinbase Exchange, returning full performance metrics and trade log compared to buy-and-hold.","exampleAgentPrompt":"Run a backtest on Bitcoin using an SMA crossover strategy with a 20-day fast and 50-day slow moving average over the last 180 days, assume $1,000 starting capital and a 10 basis point fee, and show me how it compares to just buying and holding.","exampleUseCases":[{"title":"SMA crossover strategy evaluation","prompt":"Backtest an SMA crossover on ETH over the past 365 days — fast MA of 20 days, slow MA of 50 days, starting with $5,000 and a 0.1% fee. How does it compare to just holding ETH?"},{"title":"RSI mean reversion profitability check","prompt":"Test an RSI mean reversion strategy on SOL: buy when RSI drops below 30, sell when it goes above 70, 14-day RSI period, $2,000 starting capital, 10 bps fee, over the last 90 days — did it beat buy-and-hold?"},{"title":"DCA vs buy-and-hold comparison","prompt":"Run a dollar-cost averaging backtest on BTC over the past 180 days — buy every 7 days, starting with $10,000 total capital, with 10 basis points fee per trade. How does DCA compare to just buying and holding from day one?"}],"resultDescription":"Returns a JSON object containing: total return percentage, maximum drawdown, Sharpe ratio, win rate, market exposure percentage, a chronological list of every trade executed (entry/exit prices, dates, P&L), the full equity curve, and a side-by-side comparison with a buy-and-hold baseline over the same period. The strategy rules used are also returned for transparency.","failureModes":["Invalid or unsupported asset ticker returns an error (asset must have a USD market on Coinbase Exchange)","'fast' SMA period must be strictly less than 'slow' period or validation error is returned","Days parameter outside 30-365 range returns a validation error","RSI buy threshold must be below 50 and sell threshold must be above 50","Coinbase Exchange historical data unavailable for the requested period may cause incomplete results","Payment failure via x402 results in a 402 response before computation occurs"],"whenToPreferThis":"Choose this endpoint when you need to quickly evaluate whether a specific trading rule (SMA crossover, RSI, DCA, or buy-and-hold) would have historically outperformed a passive strategy on a Coinbase-listed crypto asset. Ideal for quantitative research, strategy screening, or educational exploration of crypto trading rules with realistic fee modeling. Prefer it over manual calculations or general-purpose data endpoints when you need a complete performance report including drawdown, Sharpe, win rate, and equity curve in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:38:27.373Z","isFirstParty":false,"canonicalSlug":"fiatdock-crypto-backtester-b71a42c1"}