{"uid":"cap_2krAHmrHROWqWEGMAdwED","slug":"mangrove-developer-backtests-cc9e3e4a","name":"Mangrove Developer Backtests","description":"Developer references for Mangrove Agent, API contracts, MCP and AI integrations.","url":"https://api.mangrovedeveloper.ai/api/v1/backtests?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"seed":{"type":"integer"},"asset":{"type":"string"},"fee_pct":{"type":"number"},"end_date":{"type":"string"},"exchange":{"type":"string"},"interval":{"type":"string"},"data_file":{"type":"string"},"base_token":{"type":"string"},"generation":{"type":"integer"},"start_date":{"type":"string"},"data_source":{"type":"string"},"quote_token":{"type":"string"},"strategy_id":{"type":"string"},"slippage_pct":{"type":"number"},"cooldown_bars":{"type":"integer"},"strategy_json":{"type":"string"},"corpus_dataset":{"type":"string"},"initial_balance":{"type":"number"},"lookback_months":{"type":"integer"},"volatility_mode":{"type":"string"},"execution_config":{"type":"object"},"hourly_data_file":{"type":"string"},"max_trade_amount":{"type":"number"},"min_trade_amount":{"type":"number"},"market_data_venue":{"type":"string"},"target_volatility":{"type":"number"},"volatility_window":{"type":"integer"},"max_open_positions":{"type":"integer"},"max_risk_per_trade":{"type":"number"},"max_trades_per_day":{"type":"integer"},"max_units_per_trade":{"type":"number"},"daily_momentum_limit":{"type":"number"},"initial_asset_balance":{"type":"number"},"min_balance_threshold":{"type":"number"},"weekly_momentum_limit":{"type":"number"},"enable_volatility_adjustment":{"type":"boolean"}}},"responseSchema":null,"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_XnCrfdkiTJmrKNgvT4gW3","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":"Runs a trading strategy backtest over historical market data with configurable parameters including asset, exchange, date range, fees, slippage, and risk controls.","exampleAgentPrompt":"Run a backtest on my strategy (strategy_id: 'strat_macd_v2') for BTC/USDC on Coinbase from 2023-01-01 to 2023-12-31, using 1-hour intervals, a 0.1% fee, 0.05% slippage, $10,000 initial balance, max 3 open positions, and volatility adjustment enabled.","exampleUseCases":[{"title":"Momentum strategy annual performance review","prompt":"Backtest my momentum strategy (strategy_id: 'mom_strat_01') on ETH/USDC on Binance from 2023-01-01 to 2023-12-31, using daily intervals, 0.2% fees, 0.1% slippage, $50,000 starting balance, max 5 trades per day, and a 2% max risk per trade."},{"title":"Volatility-adjusted BTC strategy simulation","prompt":"Run a backtest for strategy 'vol_adj_btc' on BTC/USDC on Coinbase from 2024-01-01 to 2024-06-30 with hourly data, 0.15% fee, 0.05% slippage, $20,000 initial balance, volatility adjustment turned on, and a target volatility of 0.02."},{"title":"Low-risk altcoin strategy stress test","prompt":"Simulate my conservative strategy JSON for SOL/USDC on a spot exchange from 2022-06-01 to 2023-06-01, 4-hour bars, fees at 0.1%, slippage at 0.05%, $5,000 initial balance, max 1 open position, 10-bar cooldown between trades, and $500 max trade amount."}],"resultDescription":"Returns backtest results including simulated trade history, portfolio performance metrics (e.g. total return, Sharpe ratio, drawdown), per-trade logs, and risk statistics derived from running the specified strategy against historical market data over the given date range and configuration.","failureModes":["Invalid strategy_id or malformed strategy_json returns a 400 or validation error","Unsupported exchange or market_data_venue results in a data-not-found error","Date range outside available historical data returns an empty or partial result","Missing required fields (e.g. asset, start_date, end_date) causes a 422 unprocessable entity","Payment failure (insufficient USDC balance) returns a 402 Payment Required","Conflicting parameters (e.g. min_trade_amount > max_trade_amount) may cause a runtime error"],"whenToPreferThis":"Use this endpoint when you need to simulate and evaluate a crypto trading strategy against historical market data with granular control over execution parameters such as fees, slippage, volatility mode, and risk limits. Prefer this over live trading endpoints when the goal is performance analysis, parameter tuning, or strategy validation before deployment. Best suited for quantitative analysts, algo traders, and AI agents managing or optimizing trading strategies on the Mangrove platform.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-04T06:33:39.146Z","isFirstParty":false,"canonicalSlug":"mangrove-developer-backtests-cc9e3e4a"}