@openpit/engine
    Preparing search index...

    Class Configurator

    Runtime built-in policy configurator.

    Obtained from Engine.configure(). It reconfigures the policies of that one engine, so changes made through it are visible to every later call on it. Calling it from a callback of the same engine throws LifecycleError.

    Index
    • Returns void

    • Returns void

    • Retunes a registered order-size-limit policy at runtime.

      Errors

      Throws PolicyConfigureError on unknown policy, type mismatch, or validation failure. Throws ParamError for malformed options. Throws LifecycleError when the owning engine is re-entered synchronously from one of its policy callbacks.

      Parameters

      Returns void

    • Retunes a registered P&L-bounds kill-switch policy at runtime.

      Errors

      Throws PolicyConfigureError on unknown policy, type mismatch, or validation failure. Throws ParamError for malformed options. Throws LifecycleError when the owning engine is re-entered synchronously from one of its policy callbacks.

      Parameters

      Returns void

    • Retunes a registered rate-limit policy at runtime.

      Errors

      Throws PolicyConfigureError on unknown policy, type mismatch, or validation failure. Throws ParamError for malformed options. Throws LifecycleError when the owning engine is re-entered synchronously from one of its policy callbacks.

      Parameters

      Returns void

    • Force-sets live accumulated P&L for one generic P&L kill-switch entry.

      Errors

      Throws PolicyConfigureError on unknown policy, type mismatch, or validation failure. Throws ParamError/AssetError/AccountIdError for malformed options. Throws LifecycleError when the owning engine is re-entered synchronously from one of its policy callbacks.

      Parameters

      Returns void

    • Force-sets live accumulated spot-funds account-wide P&L state.

      The new state is checked against the effective account P&L barrier in the same call. A barrier breach or halted state under a barrier returns the policy-reported block even when the account already has a block. The engine processes the block request before returning and preserves the existing first cause.

      Errors

      Throws TypeError, RangeError, or ParamError for an invalid state, AccountIdError for an invalid account, or PolicyConfigureError when the target policy cannot apply the configuration. Throws LifecycleError when the owning engine is re-entered synchronously from one of its policy callbacks.

      Parameters

      Returns PolicyConfigurationResult

    • Retunes a registered spot-funds policy at runtime.

      Errors

      Throws PolicyConfigureError on unknown policy, type mismatch, or validation failure. Throws ParamError/AssetError/AccountIdError for malformed options. Throws LifecycleError when the owning engine is re-entered synchronously from one of its policy callbacks.

      Parameters

      Returns void

    • Retunes the spot-funds account-wide P&L-bounds axis.

      With a known effective account currency, an account-tier mismatch fails closed and blocks the account; account-group and global mismatches are skipped. A known-currency account with no account barrier and no matching fallback has no effective barrier, but its P&L keeps accumulating and publishing. Without an effective currency, the first in-scope barrier applies. Bounds are compared as stored and are never FX-converted.

      An account whose effective barrier changed is evaluated against its stored account P&L in the same call: an already halted account, or one already beyond the new barrier, is blocked before this call returns and appears in the returned result, which reports the blocks the engine has already recorded. Each returned AccountBlockOutcome identifies the affected account together with its newly inserted block. Removing the last effective barrier reports no block and does not release an existing block. Clearing an override can expose a fallback barrier; the fallback is evaluated normally and may record and report a block.

      Errors

      Throws PolicyConfigureError on unknown policy, type mismatch, or validation failure. Throws ParamError for malformed options. Throws LifecycleError when the owning engine is re-entered synchronously from one of its policy callbacks.

      Parameters

      Returns AccountBlockOutcomes