Simulate

Offload the CPU-bound backtest to a worker thread so the single-worker event loop keeps answering /health (prevents watchdog false-restarts).

post/simulate

Request

  • Base URL: https://api.pruviq.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.pruviq.com/simulate
  • Auth: none declared

Request body

record_provenanceboolean

Capture actual engine/input hashes for a fresh registry-strategy execution; bypass result cache, retain compute limits

strategystring

Strategy ID

directionstring nullable

long | short | both (null = use strategy default)

sl_pctnumber

Stop Loss %

tp_pctnumber

Take Profit %

max_barsinteger

Max holding period (bars)

market_type'futures' | 'spot'

spot | futures

symbolsstring[] nullable

Specific symbols (null = use top_n)

symbolstring nullable

Single-symbol alias for symbols. Auto-mapped (prevents silent ignore of a singular field).

top_ninteger nullable

Number of coins (null = top 50)

include_stablecoinsboolean

Include stablecoins (USDC, DAI…) in the top_n universe. Default false — ~0 volatility → empty backtests. Ignored when symbols is set (explicit picks always honored).

start_datestring nullable

Backtest start date (YYYY-MM-DD)

end_datestring nullable

Backtest end date (YYYY-MM-DD)

cutoff_utcstring date-time nullable

Only candles closed by this UTC instant; null = current closed hour. Does not freeze historical source revisions.

timeframe'1H' | '2H' | '4H' | '6H' | '12H' | '1D' | '1W'

Candle timeframe: 1H, 2H, 4H, 6H, 12H, 1D, 1W

compoundingboolean

True = reinvest profits (compound), False = fixed position size (simple)

avoid_hoursinteger[] nullable

UTC hours to avoid entering trades (0-23). null = use strategy default

avoid_monthsinteger[] nullable

Months to avoid entering trades (1-12). null = no month filter

min_vol_regimenumber nullable

Minimum ATR ratio (current ATR / 14-period ATR MA) to allow entry. e.g., 0.7 = skip low-volatility periods. null = no filter

btc_trend_filterboolean

If true, only allow LONG entries when BTC is above its 50-period SMA. Improves LONG edge in bull regimes.

fee_pctnumber nullable

Fee per side (0.0005 = 0.05%). None = use market_type default

leveragenumber

Leverage multiplier for PnL calculation

Response

Successful Response

strategystring required
directionstring required
paramsobject required
market_typestring required
total_tradesinteger required
winsinteger required
lossesinteger required
win_ratenumber required
total_return_pctnumber required
profit_factornumber required
avg_win_pctnumber required
avg_loss_pctnumber required
max_drawdown_pctnumber required
max_consecutive_lossesinteger required
total_fees_pctnumber required
sharpe_window_daysinteger nullable
sharpe_annualized_below_one_yearboolean nullable
mc_p_valuenumber nullable
mc_percentilenumber nullable
total_funding_pctnumber
funding_uncoveredstring[]
funding_missingstring[]
tp_countinteger required
sl_countinteger required
timeout_countinteger required
sharpe_rationumber
sortino_rationumber
calmar_rationumber
coins_usedinteger required
top_n_requestedinteger nullable

The top_n this run resolved to. null for explicit symbols= requests (no top-N universe).

eligible_universeinteger nullable

Coins eligible for a top-N universe at run time (stablecoins unless include_stablecoins, non-crypto and liquidity-dead markets excluded), read in the same selection as the coins run. null for symbols= requests (and on /backtest when the strategy is invalid, is_valid=false).

universe_cappedboolean nullable

eligible_universe < top_n_requested: the request asked for more coins than exist, so the whole eligible universe ran. A cap only — coins lacking data are reported in coins_missing_data. null for symbols= requests.

coins_missing_datainteger nullable

min(top_n_requested, eligible_universe) - (selected coins with at least one candle inside start_date..end_date). Counts selected coins with no complete candle up to the cutoff AND coins whose candles all fall outside the requested window (those stay in coins_used, so this can exceed min(top_n_requested, eligible_universe) - coins_used). null for symbols= requests.

data_rangestring required
btc_hold_return_pctnumber
yearly_statsobject[]
rolling_sharpeobject[]
best_trade_pctnumber nullable
worst_trade_pctnumber nullable
exposure_time_pctnumber nullable
direction_breakdownobject nullable
monthly_statsobject[]
start_sensitivityobject[]
regime_performanceobject nullable
trades_totalinteger
trades_truncatedinteger
ruin_indexinteger nullable
reliability_warningstring nullable required

계약은 build_reliability_warning 한 곳이 소유한다(룰3).

Changes

No recorded changes to this operation across all 2 revisions of this API.