{"uid":"cap_2ICLfhRUjmQUwvC_xag7S","slug":"orchard-data-backtest-a9dd719a","name":"Orchard Data Backtest","description":"Market data for AI agents, paid per-call via x402 (USDC on Base). Free index at /, free spec here.","url":"https://orchard-data.letom1176.workers.dev/api/backtest","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","entry","threshold"],"properties":{"entry":{"type":"string","description":"rsi2_below | rsi14_below | ibs_below | dip_from_high20 | down_days | sma_cross_up | gap_down"},"symbol":{"type":"string","description":"Ticker, e.g. SPY, NVDA"},"stop_pct":{"type":"string","description":"Optional stop loss %"},"hold_days":{"type":"string","description":"Max hold in trading days (1-30), default 5"},"threshold":{"type":"string","description":"Rule threshold, e.g. 10 for rsi2_below"},"target_pct":{"type":"string","description":"Optional profit target %"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"spec":{"entry":"rsi2_below","symbol":"SPY","hold_days":5,"threshold":10},"verdict":{"honest_read":"...","halves_agree_on_sign":true},"full_period":{"n_trades":118,"win_rate":0.66,"strategy_multiple":2.1,"buy_hold_multiple_same_symbol":2.9}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bKwHGcso_ErVXNdEQe9aE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Backtests a rule-based entry signal (e.g. RSI2, IBS, dip-from-high) on a given ticker symbol over historical data and returns win rate, trade count, and strategy vs buy-and-hold comparison.","exampleAgentPrompt":"Can you backtest an RSI2-below-10 entry signal on SPY with a 5-day max hold and tell me the win rate, number of trades, and how it compares to just buying and holding SPY?","exampleUseCases":[{"title":"RSI2 mean-reversion strategy validation","prompt":"Backtest an RSI2 below 10 entry on SPY, holding for up to 5 days — I want to see the win rate and whether it beats buy-and-hold."},{"title":"NVDA dip-from-high signal test","prompt":"Run a backtest on NVDA using a dip-from-20-day-high entry with a threshold of 5, hold for 3 days, and add a 2% stop loss. Does the strategy outperform holding NVDA outright?"},{"title":"IBS entry evaluation with profit target","prompt":"Test an IBS-below entry with threshold 0.2 on QQQ, max hold 10 days, and a 3% profit target — how many trades does it generate and what's the win rate?"}],"resultDescription":"Returns a JSON object with the backtest spec (symbol, entry rule, threshold, hold days), a verdict block with a plain-English honest read and whether the first/second half of history agree on direction, and full-period statistics including number of trades, win rate, strategy multiple (cumulative return), and buy-and-hold multiple for the same symbol over the same period.","failureModes":["Missing required query params (symbol, entry, threshold) returns 400 or error JSON","Invalid entry type string not in enum returns error","Symbol not found or unsupported ticker may return empty results or error","Payment not completed via x402 (USDC on Base) returns 402 Payment Required","Hold days outside 1-30 range may return validation error","Threshold value out of meaningful range for chosen entry type may produce zero trades"],"whenToPreferThis":"Choose this endpoint when you need a quick, quantitative historical backtest of a specific rule-based entry signal (RSI2, IBS, dip-from-high, SMA cross, gap-down, down-days) on a U.S. equity ticker. It is purpose-built for signal validation with plain-English verdict summaries, making it ideal for AI agents that need to reason about whether a trading rule has historically worked. Prefer this over generic data APIs when you want pre-computed win rates, strategy multiples, and buy-and-hold comparisons in a single call rather than raw price data requiring your own analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:36:53.587Z","isFirstParty":false}