Simulate Compare

Run all strategies under identical SL/TP conditions for comparison.

post/simulate/compare

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/compare
  • Auth: none declared

Request body

sl_pctnumber

Stop Loss %

tp_pctnumber

Take Profit %

max_barsinteger

Max holding period (bars)

top_ninteger nullable

Number of coins, at most 5 (null = 5). 6..535 → HTTP 400 with detail {error, max_top_n: 5, requested, alternative: "/simulate per strategy"}; above 535 → the generic 422 (detail is a list). Every call runs all strategies and more coins do not finish inside the 45 s gateway limit (Q-B55).

Response

Successful Response

sl_pctnumber required
tp_pctnumber required
max_barsinteger required
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.

run_capinteger nullable

Q-B131: the per-request limit that actually stopped this run before min(top_n_requested, eligible_universe) coins, or null when none did (coins_used then reaches that number, data gaps aside). See run_cap_reason for which limit.

run_cap_reason'indicator_cache' | 'compare_max_coins' nullable

Q-B131: which limit run_cap is. «indicator_cache»: the cached path of /simulate/compare, /simulate/validate and /simulate/optimize computes at most the indicator-cache size per request (no all-coin hold; larger runs are a separate async path, Q-B132). «compare_max_coins»: kept for compatibility — since Q-B55 /simulate/compare rejects a top_n above its limit (COMPARE_MAX_COINS) with HTTP 400, so this cut no longer binds. When both apply, the smaller one — the one that bound — is reported. null when no limit bound.

coins_not_computedstring[]

Q-B131: explicitly requested symbols= that were not run because the per-request compute limit (the indicator-cache size) was reached. Empty when every requested symbol ran. Distinct from coins_missing_data (coins without candles in the window).

data_rangestring required

Changes

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