Spaces:
Running
Running
Download classes/types.OrderTransientError.html from tripolskypetr/backtest-kit-docs: direct link, hf CLI and curl.
- Browser
- Download file 37.7 kB
-
https://huggingface.co/spaces/tripolskypetr/backtest-kit-docs/resolve/main/classes/types.OrderTransientError.html
- Command line
-
hf download hf://spaces/tripolskypetr/backtest-kit-docs/classes/types.OrderTransientError.html
-
curl -L -o types.OrderTransientError.html https://huggingface.co/spaces/tripolskypetr/backtest-kit-docs/resolve/main/classes/types.OrderTransientError.html
37.7 kB
| <html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>OrderTransientError | backtest-kit</title><meta name="description" content="Documentation for backtest-kit"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">backtest-kit</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">backtest-kit</a></li><li><a href="../modules/types.html">types</a></li><li><a href="types.OrderTransientError.html">OrderTransientError</a></li></ul><h1>Class OrderTransientError</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>EXPLICIT transient failure marker — "the operation failed for a temporary / | |
| unknown reason (network blip, lost response, exchange 5xx, rate limit); retry me".</p> | |
| <a id="purpose-declarative-sugar-not-routing" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Purpose: declarative sugar, not routing<a href="#purpose-declarative-sugar-not-routing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>The framework treats EVERY non-typed throw from the order gates and checks as the | |
| "transient" verdict already — this class adds NO special handling and is NOT | |
| pattern-matched anywhere in the framework by design. A plain <code>throw new Error(...)</code> | |
| behaves identically. The class exists purely so application code states its intent | |
| explicitly: a reader of the adapter sees "transient" spelled out instead of having | |
| to know that unbranded throws default to it. Use it as the third leg of the triad:</p> | |
| <ul> | |
| <li><a href="types.OrderRejectedError.html" class="tsd-kind-class">OrderRejectedError</a> — terminal business rejection (GATES);</li> | |
| <li><a href="types.OrderDeletedError.html" class="tsd-kind-class">OrderDeletedError</a> — confirmed order-not-found (CHECKS);</li> | |
| <li>OrderTransientError — everything temporary, in EITHER context.</li> | |
| </ul> | |
| <a id="what-the-transient-verdict-means-per-channel" class="tsd-anchor"></a><h2 class="tsd-anchor-link">What the "transient" verdict means per channel<a href="#what-the-transient-verdict-means-per-channel" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Resolved as <code>IBrokerOrderVerdict</code> <code>{ reason: "transient" }</code> | |
| (see interfaces/Broker.interface):</p> | |
| <ul> | |
| <li><strong>Open gate</strong> (<code>onOrderOpenCommit</code> type "active"/"schedule", | |
| <code>callbacks.onOrderSync</code>, <code>listenSync</code>): the open is retried IDENTITY-STABLY — | |
| the same signal row with the SAME signalId is re-submitted on the next tick | |
| (<code>event.attempt</code> increments; the attempt is PRE-ARMED — persisted before the gate | |
| call, so even a crash mid-attempt resumes with attempt >= 1), up to | |
| CC_ORDER_OPEN_RETRY_ATTEMPTS. Tag exchange orders with <code>clientOrderId = signalId</code> | |
| and RECONCILE at attempt > 0: query the prior order by that id BEFORE re-sending | |
| and confirm the open if it filled. Do NOT rely on catching "duplicate" on re-send — | |
| Binance's duplicate-clientOrderId guard only covers OPEN orders; an | |
| instantly-filled market order will not dup. | |
| Exhaustion drops the signal loudly AND signals <code>exitEmitter</code> (fatal: the network | |
| would not let the engine work). With the config at 0 the retry slot is disabled: | |
| a rejected open is dropped at once and the next tick regenerates a FRESH id.</li> | |
| <li><strong>Close gate</strong> (<code>onOrderCloseCommit</code>, same listeners): the position stays open | |
| and the close is re-attempted on the next tick/candle (<code>event.attempt</code> | |
| increments), up to CC_ORDER_CLOSE_RETRY_ATTEMPTS. Exhaustion FORCE-CLOSES the | |
| engine state with the ORIGINAL closeReason + <code>errorEmitter</code> + <code>exitEmitter</code> | |
| (the real exchange position must be reconciled by the adapter/operator). | |
| With the config at 0 the cap is disabled: the close retries forever (legacy).</li> | |
| <li><strong>Checks</strong> (<code>onOrderActiveCheck</code> / <code>onOrderScheduleCheck</code>, | |
| <code>callbacks.onOrderCheck</code>, <code>listenCheck</code>): the failed ping is TOLERATED — the | |
| order is assumed still open and monitoring continues (<code>event.attempt</code> | |
| increments), up to CC_ORDER_CHECK_RETRY_ATTEMPTS CONSECUTIVE failures; a single | |
| successful check resets the streak to 0. Exhaustion acts terminally (close | |
| "closed" / cancel "user") + <code>exitEmitter</code>. With the config at 0 any failure is | |
| terminal on the spot (legacy).</li> | |
| </ul> | |
| <a id="nuances" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Nuances<a href="#nuances" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><ul> | |
| <li><strong>Counted per consecutive failures, not per elapsed ticks.</strong> For checks the ping | |
| fires every live tick, so "consecutive" is literal; for the close gate the | |
| counter advances only when a close actually triggers and gets rejected — gaps | |
| where no close condition holds do not touch it (only a confirmed gate or a | |
| position transition resets it).</li> | |
| <li><strong>Exhaustion of transient failures is FATAL</strong> (<code>exitEmitter</code> after the | |
| <code>errorEmitter</code> log) — unlike the typed terminal errors above, which are business | |
| outcomes and never signal a process exit.</li> | |
| <li><strong>Open and close counters are persisted (pre-armed before each gate call);</strong> the | |
| check counter is in-memory (a restart resets the tolerance window in the safe | |
| direction). For open/close, <code>attempt > 0</code> is therefore a HARD invariant even | |
| across crashes: a prior order MAY have reached the exchange — reconcile first. | |
| On restore the persisted counters are CLAMPED to 1: the reconcile bit survives, | |
| the streak resets — a pre-crash outage never exhausts the budget on the first | |
| post-restart attempt.</li> | |
| <li><strong>Nominal brand for symmetry.</strong> <code>__type__ === Symbol.for("OrderTransientError")</code> | |
| and the static guard exist for consistency with the other two errors (useful in | |
| the application's own logging/metrics); the framework itself never checks it.</li> | |
| <li><strong>Live-only in production wiring.</strong> Backtest short-circuits gates and never | |
| fires checks.</li> | |
| </ul> | |
| </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">Broker</span><span class="hl-2">.</span><span class="hl-1">useBrokerAdapter</span><span class="hl-2">({</span><br/><span class="hl-2"> </span><span class="hl-4">async</span><span class="hl-2"> </span><span class="hl-1">onOrderOpenCommit</span><span class="hl-2">(</span><span class="hl-5">payload</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">try</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-6">await</span><span class="hl-2"> </span><span class="hl-5">exchange</span><span class="hl-2">.</span><span class="hl-1">placeOrder</span><span class="hl-2">({ </span><span class="hl-5">clientOrderId:</span><span class="hl-2"> </span><span class="hl-5">payload</span><span class="hl-2">.</span><span class="hl-5">signalId</span><span class="hl-2">, ... });</span><br/><span class="hl-2"> } </span><span class="hl-6">catch</span><span class="hl-2"> (</span><span class="hl-5">e</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">if</span><span class="hl-2"> (</span><span class="hl-1">isNetworkError</span><span class="hl-2">(</span><span class="hl-5">e</span><span class="hl-2">)) {</span><br/><span class="hl-2"> </span><span class="hl-0">// Explicit intent: temporary — let the bounded identity-stable retry run</span><br/><span class="hl-2"> </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">OrderTransientError</span><span class="hl-2">(</span><span class="hl-3">`binance unreachable: </span><span class="hl-4">${</span><span class="hl-5">e</span><span class="hl-11">.</span><span class="hl-5">message</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> </span><span class="hl-6">throw</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">OrderRejectedError</span><span class="hl-2">(</span><span class="hl-3">`order refused: </span><span class="hl-4">${</span><span class="hl-5">e</span><span class="hl-11">.</span><span class="hl-5">message</span><span class="hl-4">}</span><span class="hl-3">`</span><span class="hl-2">);</span><br/><span class="hl-2"> }</span><br/><span class="hl-2"> },</span><br/><span class="hl-2">});</span> | |
| </code><button type="button">Copy</button></pre> | |
| </div></div></section><section class="tsd-panel tsd-hierarchy" data-refl="4828"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-signature-type">Error</span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">OrderTransientError</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/45946781ee6619003b5512335c666c5e47a7af30/types.d.ts#L48030">types.d.ts:48030</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="types.OrderTransientError.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a> | |
| </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="types.OrderTransientError.html#__type__" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>__type__</span></a> | |
| <a href="types.OrderTransientError.html#message" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>message</span></a> | |
| <a href="types.OrderTransientError.html#name" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a> | |
| <a href="types.OrderTransientError.html#preparestacktrace" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prepare<wbr/>Stack<wbr/>Trace?</span></a> | |
| <a href="types.OrderTransientError.html#stack" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>stack?</span></a> | |
| <a href="types.OrderTransientError.html#stacktracelimit" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>stack<wbr/>Trace<wbr/>Limit</span></a> | |
| </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="types.OrderTransientError.html#capturestacktrace" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>capture<wbr/>Stack<wbr/>Trace</span></a> | |
| <a href="types.OrderTransientError.html#fromerror" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Error</span></a> | |
| <a href="types.OrderTransientError.html#isordertransienterror" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Order<wbr/>Transient<wbr/>Error</span></a> | |
| </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="constructorordertransienterror" class="tsd-anchor"></a><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">OrderTransientError</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.OrderTransientError.html" class="tsd-signature-type tsd-kind-class">OrderTransientError</a><a href="#constructorordertransienterror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Optional human-readable reason (logged, not routed on)</p> | |
| </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.OrderTransientError.html" class="tsd-signature-type tsd-kind-class">OrderTransientError</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Overrides Error.constructor</p><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/45946781ee6619003b5512335c666c5e47a7af30/types.d.ts#L48036">types.d.ts:48036</a></li></ul></aside></div></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="__type__" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code><span>__type__</span><a href="#__type__" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">__type__</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">symbol</span></div><div class="tsd-comment tsd-typography"><p>Runtime brand (Symbol.for — survives duplicated module instances)</p> | |
| </div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/45946781ee6619003b5512335c666c5e47a7af30/types.d.ts#L48032">types.d.ts:48032</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="message" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>message</span><a href="#message" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.message</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1077</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="name" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.name</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1076</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="preparestacktrace" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code> <code class="tsd-tag">Optional</code><span>prepare<wbr/>Stack<wbr/>Trace</span><a href="#preparestacktrace" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">prepareStackTrace</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">stackTraces</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">CallSite</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">any</span></div><div class="tsd-comment tsd-typography"><p>Optional override for formatting stack traces</p> | |
| </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link"><a id="see" class="tsd-anchor"></a>See<a href="#see" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="https://v8.dev/docs/stack-trace-api#customizing-stack-traces">https://v8.dev/docs/stack-trace-api#customizing-stack-traces</a></p> | |
| </div></div><aside class="tsd-sources"><p>Inherited from Error.prepareStackTrace</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:143</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="stack" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>stack</span><a href="#stack" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">stack</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.stack</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1078</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="stacktracelimit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>stack<wbr/>Trace<wbr/>Limit</span><a href="#stacktracelimit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">stackTraceLimit</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from Error.stackTraceLimit</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:145</li></ul></aside></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="capturestacktrace" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>capture<wbr/>Stack<wbr/>Trace</span><a href="#capturestacktrace" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="capturestacktrace-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">captureStackTrace</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">targetObject</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">constructorOpt</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#capturestacktrace-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Create .stack property on a target object</p> | |
| </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">targetObject</span>: <span class="tsd-signature-type">object</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">constructorOpt</span>: <span class="tsd-signature-type">Function</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Error.captureStackTrace</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:136</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="fromerror" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>from<wbr/>Error</span><a href="#fromerror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="fromerror-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">fromError</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="types.OrderTransientError.html" class="tsd-signature-type tsd-kind-class">OrderTransientError</a><a href="#fromerror-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Nominal constructor for a new OrderTransientError from any thrown object. Use this | |
| instead of <code>instanceof</code> to recognize instances created by a DIFFERENT copy of | |
| this module (duplicated bundles, linked packages).</p> | |
| </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">object</span></span><div class="tsd-comment tsd-typography"><p>Any thrown object</p> | |
| </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="types.OrderTransientError.html" class="tsd-signature-type tsd-kind-class">OrderTransientError</a></h4><p>a new OrderTransientError with the original message, or a default message | |
| if the original was not a string</p> | |
| <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/45946781ee6619003b5512335c666c5e47a7af30/types.d.ts#L48056">types.d.ts:48056</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="isordertransienterror" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Static</code><span>is<wbr/>Order<wbr/>Transient<wbr/>Error</span><a href="#isordertransienterror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="isordertransienterror-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">isOrderTransientError</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#isordertransienterror-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Nominal type guard by the runtime brand. Provided for symmetry with | |
| OrderRejectedError / OrderDeletedError (e.g. for application-side logging) — | |
| the framework itself does not branch on it: transient is the default verdict | |
| for ANY non-typed throw.</p> | |
| </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">object</span></span><div class="tsd-comment tsd-typography"><p>Any thrown object</p> | |
| </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>true when the object carries the OrderTransientError brand</p> | |
| <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/tripolskypetr/backtest-kit/blob/45946781ee6619003b5512335c666c5e47a7af30/types.d.ts#L48046">types.d.ts:48046</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#purpose-declarative-sugar-not-routing"><span>Purpose: declarative sugar, not routing</span></a><a href="#what-the-transient-verdict-means-per-channel"><span>What the "transient" verdict means per channel</span></a><a href="#nuances"><span>Nuances</span></a><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#__type__" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>__type__</span></a><a href="#message" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>message</span></a><a href="#name" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a><a href="#preparestacktrace" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>prepare<wbr/>Stack<wbr/>Trace</span></a><a href="#stack" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>stack</span></a><a href="#stacktracelimit" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>stack<wbr/>Trace<wbr/>Limit</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#capturestacktrace" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>capture<wbr/>Stack<wbr/>Trace</span></a><a href="#fromerror" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Error</span></a><a href="#isordertransienterror" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Order<wbr/>Transient<wbr/>Error</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">backtest-kit</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html> | |
| <!-- Yandex.Metrika counter --> | |
| <script type="text/javascript"> | |
| (function(m,e,t,r,i,k,a){ | |
| m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; | |
| m[i].l=1*new Date(); | |
| for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }} | |
| k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a) | |
| })(window, document,'script','https://mc.yandex.ru/metrika/tag.js?id=105455585', 'ym'); | |
| ym(105455585, 'init', {ssr:true, webvisor:true, clickmap:true, ecommerce:"dataLayer", accurateTrackBounce:true, trackLinks:true}); | |
| </script> | |
| <noscript><div><img src="https://mc.yandex.ru/watch/105455585" style="position:absolute; left:-9999px;" alt="" /></div></noscript> | |
| <!-- /Yandex.Metrika counter --> | |
| <!-- Google tag (gtag.js) --> | |
| <script async src="https://www.googletagmanager.com/gtag/js?id=G-3MQZEBBDDR"></script> | |
| <script> | |
| window.dataLayer = window.dataLayer || []; | |
| function gtag(){dataLayer.push(arguments);} | |
| gtag('js', new Date()); | |
| gtag('config', 'G-3MQZEBBDDR'); | |
| </script> | |