Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/deskiziarecords/QUIMERIA-HYPERION/llms.txt

Use this file to discover all available pages before exploring further.

QUIMERIA-HYPERION is configured through a .env file in the project root and a runtime API endpoint for toggling individual kernel modules. This page documents every environment variable, the module toggle endpoint, and the key signal thresholds that govern Ring 0 veto decisions.

.env file

Create .env in the QUIMERIA-HYPERION project root. None of these variables are required to start the server — missing API keys simply disable the corresponding exchange connector, and trading parameters fall back to defaults.
# Required — project root for module resolution
SMK_DIR=/path/to/QUIMERIA-HYPERION

Server settings

WS_HOST
string
default:"0.0.0.0"
Host address for the FastAPI/WebSocket server. Use 0.0.0.0 to bind all interfaces or 127.0.0.1 to restrict to localhost.
WS_PORT
integer
default:"8000"
Port for the FastAPI server and WebSocket endpoints. The dashboard is served at http://<host>:<port>/.

Trading parameters

DEFAULT_PROFIT_TARGET
float
default:"2.0"
Default profit target as a percentage. Used by the Auto-Profit Manager when no instrument-specific override is set.
DEFAULT_STOP_LOSS
float
default:"2.0"
Default stop-loss as a percentage. The AEGIS StopLossManager uses this as the initial stop before dynamic adjustment.
MAX_POSITION_SIZE
integer
default:"100000"
Maximum position size in base currency units. Enforced by the SchurRouter before order submission.
RISK_PER_TRADE
float
default:"0.02"
Fraction of account equity risked per trade (0.02 = 2%). Combined with Kelly sizing from the UQPCE uncertainty module.

Bitget API

BITGET_API_KEY
string
Bitget REST API key. Required for /api/load/bitget and /api/live/start endpoints.
BITGET_SECRET
string
Bitget API secret for HMAC request signing.
BITGET_PASSPHRASE
string
Bitget API passphrase set during key creation.

Fyers API (NSE)

FYERS_APP_ID
string
Fyers application ID for NSE market data and order routing via smk_fyers_integration.py.
FYERS_SECRET
string
Fyers API secret key.

TradingView webhook credentials

These credentials are used when TradingView alerts trigger the SMK webhook receiver.
TV_API_KEY_MEXC
string
MEXC API key for TradingView alert execution.
TV_SECRET_KEY_MEXC
string
MEXC secret key for TradingView alert execution.
TV_API_KEY_BYBIT
string
Bybit API key for TradingView alert execution.
TV_SECRET_KEY_BYBIT
string
Bybit secret key for TradingView alert execution.
TV_API_KEY_OKX
string
OKX API key for TradingView alert execution.
TV_SECRET_KEY_OKX
string
OKX secret key for TradingView alert execution.
TV_PASSPHRASE_OKX
string
OKX API passphrase (required by OKX; leave blank for MEXC and Bybit).
TV_TRADE_MODE
string
default:"spot"
Trading mode for TradingView webhooks. Use "spot" for forex/spot or "futures" for derivatives.

MetaTrader 4/5 credentials

MT_API_KEY_MEXC
string
MEXC API key for MetaTrader EA/script execution.
MT_SECRET_KEY_MEXC
string
MEXC secret key for MetaTrader EA/script execution.
MT_API_KEY_BYBIT
string
Bybit API key for MetaTrader EA/script execution.
MT_SECRET_KEY_BYBIT
string
Bybit secret key for MetaTrader EA/script execution.
MT_API_KEY_OKX
string
OKX API key for MetaTrader EA/script execution.
MT_SECRET_KEY_OKX
string
OKX secret key for MetaTrader EA/script execution.
MT_PASSPHRASE_OKX
string
OKX API passphrase (required by OKX).
MT_TRADE_MODE
string
default:"spot"
Trading mode for MetaTrader integrations. Use "spot" for forex/spot.
Never commit your .env file to source control. Add it to .gitignore before your first commit. Treat all API keys as secrets — rotate any key you suspect has been exposed.

Module toggle endpoint

The 18 SMK pipeline modules can be individually enabled or disabled at runtime without restarting the server. This is useful for isolating specific detectors during debugging or reducing CPU load in constrained environments. Endpoint: POST /api/config/modules Request body:
{
  "disabled_modules": ["topology", "fvg"]
}
Pass a list of module keys to disable. All modules not in this list are re-enabled. Pass an empty list to re-enable all modules. Available module keys: bias, ipda, dealing, eq_cross, swing, session, vol_decay, displacement, harmonic, expansion, manipulation, fvg, ob, vol_profile, kl, fusion, mandra, topology. Example — disable topological fracture when ripser is not installed:
curl -X POST http://localhost:8000/api/config/modules \
  -H "Content-Type: application/json" \
  -d '{"disabled_modules": ["topology"]}'
Example — disable all Lambda sensors for structural-only analysis:
curl -X POST http://localhost:8000/api/config/modules \
  -H "Content-Type: application/json" \
  -d '{
    "disabled_modules": [
      "vol_decay", "displacement", "harmonic",
      "expansion", "manipulation"
    ]
  }'
Modules disabled via this endpoint remain disabled until re-enabled via another POST or until the server restarts. Disabling a Ring 0 module such as mandra_kernel or kl_divergence will allow trades that would otherwise be vetoed — do this only in paper-trading environments.

Advanced threshold tuning

The thresholds below are the default values used by Ring 0 and the Lambda sensor layer. They are derived from CLAUDE.md and are calibrated for liquid forex instruments on H1 timeframes. Adjust them based on backtesting results for your specific instrument and timeframe.
Parameter: λ1 threshold
Default: 0.7 (adaptive range: 0.5–0.8)
Logic: V_t / ATR₂₀ < 0.7 triggers the Entrapment signal — price has compressed relative to its 20-bar average range, indicating accumulation or distribution squeeze.
Lower this threshold (e.g., 0.5) on higher-volatility instruments like crypto to reduce false entrapment signals. Raise it (e.g., 0.8) on low-volatility instruments like JPY pairs.Always wipe the ATR₂₀ cache after changing this threshold to prevent stale volatility bias from affecting the first N bars after the change.
Parameter: λ3 phase threshold
Default: π/2 ≈ 1.5708 (adaptive range: π/4–3π/4)
Logic: When the FFT phase difference φ_diff > π/2, the system enters Liar State and Ring 0 issues a VETO_LIAR_STATE halt.
During ultra-high-frequency volatility spikes, λ3 may over-veto even when the structural IPDA bias is strongly directional (the λ3 Harmonic Trap Paradox). In those environments, consider raising the threshold toward 3π/4 — but backtest the change first, as widening this gate can allow entries during genuine harmonic reversals.
Parameter: Mandra ΔE_min
Default: 0.02 (adaptive range: 0.005–0.08)
Logic: A trade is only allowed when the Mandra kernel computes ΔE ≥ 0.02 — meaning the proposed entry provides at least 2% net information energy gain over the current regime uncertainty.
A negative ΔE (ERR_MANDRA_ENTROPY) means the market is too chaotic for entry. Do not override this gate. During IPDA Reverse Periods (consolidation between quarterly shifts), expect frequent Mandra rejections — wait for the next delivery phase to begin.Lower the threshold only after confirming via backtesting that your instrument produces ΔE values in a consistently higher range than the default.
Parameter: HMM persistence prior
Default: 0.6–0.95 (state-dependent)
Logic: The Hidden Markov Model in Ring -1 uses a persistence prior that biases the regime tracker toward staying in its current state. Higher values (toward 0.95) make the regime tracker slower to switch — appropriate for trend-following on daily timeframes. Lower values (toward 0.6) allow faster regime detection — appropriate for scalping or when macro conditions are actively shifting.
Do not increase Kelly position sizing until HMM Regime is STABLE (state 1 or 2). Regime 0 (SIDEWAYS) should trigger Accumulation logic and reduced or zero sizing.
Parameter: Kelly fraction
Default: 0.05–0.5 (UQPCE-adjusted)
Logic: The Kelly criterion fraction is dynamically adjusted by the UQPCE uncertainty module based on polynomial chaos expansion of recent P&L variance. The static bounds (0.05 minimum, 0.5 maximum) prevent both over-caution and over-leverage.
Hard risk limits enforced independently of Kelly:
  • Daily loss limit: $50,000 (Emporia hard stop)
  • Max drawdown: 10% (trading halt)
  • Max single-instrument concentration: 25% of equity
ParameterValueSubsystem
FHT consciousness gate0.7Market aliveness filter (Fractal Harmonic Transform)
Hurst persistent regime> 0.6Trending market classification
Hurst anti-persistent< 0.4Mean-reversion market classification
Blackbody temp execute> 0.8Multi-band synthesis execution trigger
Max total pipeline latency5msSLO: 0.5ms data + 2ms sensors + 1ms fusion + 0.5ms Mandra + 1ms execution
KL divergence halt> 1.3× thresholdERR_REGIME_FRACTURE — manual manifold recalibration required
Topological H₁ loop haltSum > thresholdHALT_H1_LOOP — wait for manifold compaction before re-entering
The FHT consciousness threshold of 0.7 should be validated against historical data before live deployment. If your instrument consistently scores below 0.7 (common in very thin markets), consider disabling the FHT gate rather than lowering the threshold.

Ring 0 veto conditions reference

These six conditions will halt all trade execution regardless of what any individual layer signals. They cannot be overridden by module configuration.
Veto codeTriggerSource file
MANDRA:ΔE<0Negative information energy gainrisk/mandra_kernels.py
TOPO:H1_FRACTUREPersistent homology loop sum exceeds thresholddetectors/topological_fracture_detector.py
FUSION:LAMBDA_VETOAny λ sensor issued a hard vetocore/kernel/lambda_fusion_engine.py
L3:LIAR_STATEFFT phase inversion φ_diff > π/2lambda_sensors/harmonic_trap_detector.py
KL:REGIME_FRACTUREKL divergence > 1.3× thresholddetectors/kl_divergence_detector.py
CONF:INSUFFICIENTFusion confidence < 0.2core/kernel/lambda_fusion_engine.py
Read veto decisions in real time from the log API:
curl "http://localhost:8000/api/logs/veto.log?lines=50"

Build docs developers (and LLMs) love