{"uid":"cap_wL5lSkYMLcM0lTqSN5rTa","slug":"tasignal-backtest-api-616c2b14","name":"TASignal Backtest API","description":"Crypto strategy backtesting API. Backtest a rule-based strategy (sma_cross, ema_cross, rsi_reversion, breakout, macd_cross) on up to 2000 closed candles of any crypto asset: signals on close, next-open fills, fees per side, long-only or long/short. Not financial advice. Past performance does not guarantee future results. Search intents: crypto backtest api, backtest trading strategy, sma crossover backtest, rsi strategy test, trading strategy api, quant backtesting.","url":"https://api.youraitools.co/tasignal/v1/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":["symbol","strategy"],"properties":{"bars":{"type":"integer","description":"Candles to test, 100-2000 (default 500)"},"fast":{"type":"integer","description":"Fast period (sma_cross/ema_cross default 20, macd_cross 12)"},"slow":{"type":"integer","description":"Slow period (sma_cross/ema_cross default 50, macd_cross 26)"},"lower":{"type":"number","description":"RSI entry level for longs (default 30)"},"upper":{"type":"number","description":"RSI entry level for shorts / exit (default 70)"},"period":{"type":"integer","description":"RSI period (default 14) or breakout lookback (default 20)"},"signal":{"type":"integer","description":"MACD signal period (default 9)"},"symbol":{"type":"string","description":"Base asset ticker, e.g. BTC, ETH, SOL, HYPE (BTC-PERP, ETH-USD and SOLUSDT are accepted too)"},"fee_bps":{"type":"number","description":"Fee per side in basis points (default 5)"},"strategy":{"enum":["sma_cross","ema_cross","rsi_reversion","breakout","macd_cross"],"type":"string","description":"Strategy rule"},"direction":{"enum":["long_only","long_short"],"type":"string","description":"default long_only"},"timeframe":{"enum":["15m","1h","4h","1d"],"type":"string","description":"Candle timeframe: 15m, 1h, 4h or 1d (default 1h; risk default 4h)"}},"description":"Search intents: crypto backtest api, backtest trading strategy, sma crossover backtest, rsi strategy test, trading strategy api, quant backtesting"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"tier":"backtest","market":"SOL","result":{"period":{"to":"2026-10-22T16:00:00.000Z","bars":450,"from":"2026-08-08T16:00:00.000Z"},"trades":2,"assumptions":"Signals on candle close, fills at the next candle open, fees per side as set; no slippage, funding, borrow or liquidity limits; position size 100% of equity, no leverage.","last_trades":[{"exit":99.676,"side":"long","entry":76.373,"exit_time":"2026-09-10T16:00:00.000Z","entry_time":"2026-08-08T16:00:00.000Z","return_pct":30.447},{"exit":115.84,"side":"long","entry":105.74,"exit_time":"2026-10-07T20:00:00.000Z","entry_time":"2026-09-18T12:00:00.000Z","return_pct":9.497}],"equity_curve":[["2026-08-08T16:00:00.000Z",0.99632],["2026-08-23T16:00:00.000Z",1.24486],["2026-09-07T16:00:00.000Z",1.36524],["2026-09-22T16:00:00.000Z",1.45808],["2026-10-07T16:00:00.000Z",1.42764],["2026-10-22T12:00:00.000Z",1.42693]],"exposure_pct":69.78,"win_rate_pct":100,"avg_trade_pct":19.972,"profit_factor":null,"sharpe_annual":3.869,"current_position":"flat","max_drawdown_pct":-10.327,"total_return_pct":42.693,"fees_bps_per_side":5,"annualized_return_pct":464.18,"buy_and_hold_return_pct":36.933,"excess_vs_buy_and_hold_pct":5.759},"source":"hyperliquid","symbol":"SOL","strategy":{"name":"ema_cross","params":{"fast":20,"slow":50},"direction":"long_only"},"timeframe":"4h","checked_at":"2026-10-22T19:00:54.904Z","confidence":"high","disclaimer":"Not financial advice. Past performance does not guarantee future results. Technical indicators, risk metrics and backtests describe historical prices only; they are not predictions or trade recommendations. TASignal never trades, holds funds or keys.","candles_used":500,"sources_failed":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_qNzJprFkkYlpJC60LnfVg","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Runs a historical backtest of a technical trading strategy (SMA cross, EMA cross, RSI reversion, breakout, or MACD cross) on a crypto asset and returns performance metrics including return, Sharpe ratio, drawdown, and trade history.","exampleAgentPrompt":"Can you backtest a 20/50 EMA crossover strategy on SOL using 4-hour candles over the last 500 bars, long only, with 5 bps fees per side, and show me the total return, Sharpe ratio, and max drawdown?","exampleUseCases":[{"title":"Evaluate RSI strategy on Ethereum","prompt":"Run a 14-period RSI reversion backtest on ETH using 1-hour candles for the last 300 bars — long only, entry below 30, exit above 70, with 5 bps fees. What's the win rate and total return?"},{"title":"Compare MACD cross vs buy-and-hold on Bitcoin","prompt":"Backtest a MACD crossover on BTC with the default 12/26/9 periods on the 4-hour timeframe over 500 candles, long and short, and tell me how much it beat or trailed buy-and-hold."},{"title":"Test breakout strategy with aggressive lookback on SOL","prompt":"Can you run a breakout strategy backtest on SOL using a 20-period lookback on the 1-day timeframe over 200 bars, long only, and give me the Sharpe ratio, max drawdown, and equity curve?"}],"resultDescription":"Returns a JSON object containing: strategy metadata (name, params, direction), market/symbol, timeframe, period covered, number of candles used, trade-by-trade history (entry/exit price, time, return %), aggregate performance stats (total return %, annualized return %, buy-and-hold return %, excess return, Sharpe ratio, max drawdown %, win rate %, profit factor, average trade %, exposure %), equity curve time series, current position status, confidence level, data source, and a disclaimer. Also includes any data sources that failed.","failureModes":["Invalid or unrecognized symbol ticker returns an error","Unsupported strategy name returns a validation error","bars parameter outside 100–2000 range may be rejected or clamped","Insufficient candle data for the requested period may reduce bars_used","Payment failure (x402) results in 402 response before backtest runs","Too few trades generated (e.g. only 1-2 crossovers) may yield null profit_factor","sources_failed array populated if Hyperliquid data fetch partially fails"],"whenToPreferThis":"Choose this endpoint when you need a fast, affordable ($0.05) on-demand backtest of a technical strategy on crypto perpetuals/spot using Hyperliquid data. It supports five classic strategies out of the box with full parameterization. Prefer this over building your own backtester when you need quick strategy validation with standard metrics (Sharpe, drawdown, win rate) without managing data pipelines. Not suitable for portfolio-level backtests, options, or strategies requiring custom signal logic beyond the five supported types.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T12:44:40.255Z","isFirstParty":false,"canonicalSlug":"tasignal-backtest-api-616c2b14"}