@orangecharts/wrun-chart-host 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/constants/feature-flags.constants.d.ts +6 -1
- package/dist/constants/feature-flags.constants.js +67 -24
- package/dist/constants/opra-compliance.constants.d.ts +3 -2
- package/dist/constants/opra-compliance.constants.js +3 -2
- package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
- package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
- package/dist/constants/venue-presets.constants.d.ts +20 -20
- package/dist/constants/venue-presets.constants.js +24 -26
- package/dist/host-env.d.ts +29 -5
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +69 -15
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
- package/dist/interfaces/replay.interface.d.ts +8 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +18 -2
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +41 -4
- package/dist/kscript-data/controls/live-trades-merge.util.js +52 -7
- package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
- package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
- package/dist/market-data/billing.interface.d.ts +95 -31
- package/dist/market-data/billing.interface.js +36 -5
- package/dist/market-data/venue.d.ts +88 -6
- package/dist/market-data/venues/cme.contract.copy.json +66 -0
- package/dist/market-data/venues/cme.d.ts +126 -0
- package/dist/market-data/venues/cme.js +133 -0
- package/dist/market-data/venues/index.d.ts +162 -5
- package/dist/market-data/venues/index.js +48 -6
- package/dist/settings-templates/index.js +7 -3
- package/dist/settings-templates/indicator-fields.d.ts +5 -4
- package/dist/settings-templates/indicator-fields.js +45 -6
- package/dist/settings-templates/tool-rules.d.ts +27 -17
- package/dist/settings-templates/tool-rules.js +27 -11
- package/dist/settings-templates/tool-tables.generated.js +91 -31
- package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
- package/dist/utility/chart/book-live-bucket.util.js +47 -0
- package/dist/utility/chart/index-mode-admission.util.js +15 -2
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
- package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
- package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
- package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
- package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +54 -35
- package/dist/utility/chart/kscript-venue-policy.util.js +78 -42
- package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
- package/dist/utility/chart/market-session-schedule.util.js +16 -0
- package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
- package/dist/utility/chart/opra-read-access.leaf.js +5 -3
- package/dist/utility/chart/rth-session.util.d.ts +3 -2
- package/dist/utility/chart/rth-session.util.js +2 -1
- package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
- package/dist/utility/chart/window-geometry.leaf.js +22 -6
- package/dist/utility/chart/wrun-run-result.util.d.ts +12 -0
- package/dist/utility/chart/wrun-run-result.util.js +141 -6
- package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
- package/dist/utility/options/option-bar-anchor.util.js +340 -0
- package/dist/utility/options/option-venue.util.d.ts +18 -0
- package/dist/utility/options/option-venue.util.js +27 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
- package/dist/utility/wrun/derived-roots.util.js +471 -0
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
- package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -2
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -2
- package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
- package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +2 -1
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +3 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +19 -4
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +52 -13
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +88 -19
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +2 -1
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +24 -9
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +39 -10
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +15 -3
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +22 -3
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +31 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +174 -13
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +685 -27
- package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +53 -12
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +101 -53
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +14 -2
- package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
- package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
- package/dist/utility/wrun/wrun-frames.d.ts +27 -6
- package/dist/utility/wrun/wrun-frames.js +73 -10
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +18 -4
- package/dist/utility/wrun/wrun-hud-looks.util.js +45 -13
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +13 -7
- package/dist/utility/wrun/wrun-live-intake.util.js +82 -29
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +158 -14
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +49 -10
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +65 -5
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +31 -5
- package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
- package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
- package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +23 -6
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +47 -11
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +86 -19
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +168 -62
- package/dist/utility/wrun/wrun-option-views.util.d.ts +47 -13
- package/dist/utility/wrun/wrun-option-views.util.js +98 -26
- package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
- package/dist/utility/wrun/wrun-output-style.util.js +20 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +17 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +100 -31
- package/dist/utility/wrun/wrun-overlay-run.util.js +733 -114
- package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +10 -9
- package/dist/utility/wrun/wrun-panel-style.util.js +58 -9
- package/dist/utility/wrun/wrun-param-map.util.d.ts +14 -11
- package/dist/utility/wrun/wrun-param-map.util.js +10 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +14 -4
- package/dist/utility/wrun/wrun-param-values.util.js +4 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
- package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
- package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +45 -1
- package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
- package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +5 -1
- package/dist/utility/wrun/wrun-source-rows.util.js +16 -3
- package/dist/utility/wrun/wrun-style-words.util.js +6 -4
- package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
- package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
- package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
- package/dist/utils/replay/replay-buffer-math.js +227 -20
- package/package.json +11 -11
|
@@ -6,14 +6,21 @@
|
|
|
6
6
|
* - the intent warm of a surface whose open suspects an options add is coming (round 2: the Indicators dialog's open,
|
|
7
7
|
* the Options panel's), `warmWrunChartGateReaderOnIntent`: the same reader, dialed only when no other tab of this
|
|
8
8
|
* browser holds it for this identity and tier (the transport's lease, V2Service `warmGateReaderOnIntent`), so an
|
|
9
|
-
* open never takes another tab's session
|
|
9
|
+
* open never takes another tab's session;
|
|
10
|
+
* - the add's own dial of an ADMITTED native options add (web: chart.add-indicator's admission), so its handshake
|
|
11
|
+
* overlaps the rest of the mount: `dialWrunChartGateReaderForAdd`, unguarded like the package door's, since the add
|
|
12
|
+
* contests the session exactly as its first read would.
|
|
10
13
|
*
|
|
11
|
-
* The plane is the one the run's planner judges the chart by
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
14
|
+
* The plane is the one the run's planner judges the chart by: the run head's own decision
|
|
15
|
+
* (`decideWrunChartOptionsMarket`, which the run head reads too), over the market whose options the chart reads (the
|
|
16
|
+
* options seam, the gate port's `chartOptionsMarket`: a stock twin's US stock while the `opra` flag is lit) and its
|
|
17
|
+
* plane (`governedOptionPlane`: OPRA on a US stock or ETF chart, CME on a CME futures chart, under the account's option
|
|
18
|
+
* venue gates), read once the `opra` flag is known when that flag decides the chart's options and once a twin's answer
|
|
19
|
+
* is in (both bounded), so an unhydrated flag map never reads as a chart off the plane. Light at module load (the env,
|
|
20
|
+
* the flag words and the plane's exchange): a surface's open loads no lane registry.
|
|
15
21
|
*/
|
|
16
22
|
import { wrunChartHostEnv } from '../../../host-env.js';
|
|
23
|
+
import { FeatureFlag } from '../../../constants/feature-flags.constants.js';
|
|
17
24
|
import { OPRA_GOVERNED_EXCHANGES } from '../../../interfaces/opra-realtime.interface.js';
|
|
18
25
|
/**
|
|
19
26
|
* The exchange a gate plane's lane reads name, the one the transport routes them by: an OPRA lane asks by the plane's
|
|
@@ -23,35 +30,98 @@ import { OPRA_GOVERNED_EXCHANGES } from '../../../interfaces/opra-realtime.inter
|
|
|
23
30
|
export function wrunGateReadExchangeOf(plane, chartExchange) {
|
|
24
31
|
return plane === 'opra' ? OPRA_GOVERNED_EXCHANGES[0] : chartExchange;
|
|
25
32
|
}
|
|
26
|
-
/** The
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
/** The `opra` flag lit for this account, as the host's flag store reads it now (false where none is up). */
|
|
34
|
+
function opraFlagLit() {
|
|
35
|
+
try {
|
|
36
|
+
return wrunChartHostEnv().user.isFeatureOn(FeatureFlag.Opra);
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** A door's chart as a market reference: an exchange alone names no market. */
|
|
43
|
+
function gateReaderChartRef(chart) {
|
|
44
|
+
return typeof chart === 'string' ? { exchange: chart, symbol: undefined } : chart;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The market whose options a chart reads, its plane and its stop, decided ONCE (a run's head reads it, and both gate
|
|
48
|
+
* reader warms): the flag map first where the `opra` flag decides the chart's options (`opraFlagDecidesChartOptions`: a
|
|
49
|
+
* US stock, an OPRA contract or index chart, a known stock twin) or where `stamped` says the overlay read OPRA before,
|
|
50
|
+
* bounded (`awaitOpraFlagHydration`); then, under a lit flag or a stamp only, the chart's stock twin answer, bounded
|
|
51
|
+
* (the gate port's `awaitStockTwin`, which answers at once for a known answer and a market that cannot be a twin); then
|
|
52
|
+
* the market (the gate port's `chartOptionsMarket`), its plane and its stop in one synchronous step, so the three read
|
|
53
|
+
* one state of the seam. A host that binds neither twin port reads every chart's options off its own market. Rejects
|
|
54
|
+
* only when the options gate cannot load.
|
|
55
|
+
*/
|
|
56
|
+
export async function decideWrunChartOptionsMarket(chart, stamped = false) {
|
|
29
57
|
const gate = await wrunChartHostEnv().market.loadOptionsGate();
|
|
30
|
-
if (gate.opraFlagDecidesChartOptions(
|
|
58
|
+
if (stamped || gate.opraFlagDecidesChartOptions(chart))
|
|
31
59
|
await gate.awaitOpraFlagHydration();
|
|
32
|
-
|
|
33
|
-
|
|
60
|
+
if (gate.awaitStockTwin !== undefined && (stamped || opraFlagLit()))
|
|
61
|
+
await gate.awaitStockTwin(chart);
|
|
62
|
+
const market = gate.chartOptionsMarket?.(chart) ?? chart;
|
|
63
|
+
const plane = gate.governedOptionPlane(market);
|
|
64
|
+
const opraStop = plane === null ? gate.opraOptionPlaneStop(market) : undefined;
|
|
65
|
+
return { chart, market, plane, ...(opraStop !== undefined ? { opraStop } : {}) };
|
|
66
|
+
}
|
|
67
|
+
/** The exchange the reads of a chart's options route by on their gate plane (see the module comment), or null for a
|
|
68
|
+
* chart whose options ride no plane. Rejects only when the options gate cannot load. */
|
|
69
|
+
export async function wrunChartGateReadExchange(chart) {
|
|
70
|
+
const decided = await decideWrunChartOptionsMarket(gateReaderChartRef(chart));
|
|
71
|
+
const exchange = decided.market.exchange;
|
|
72
|
+
return decided.plane === null || typeof exchange !== 'string'
|
|
73
|
+
? null
|
|
74
|
+
: wrunGateReadExchangeOf(decided.plane, exchange);
|
|
34
75
|
}
|
|
35
76
|
/**
|
|
36
77
|
* Warm the gate reader the chart's options are read on, for a surface whose open suspects an options add is coming:
|
|
37
78
|
* dialed through the transport only when no other tab of this browser holds that reader for this identity and tier,
|
|
38
79
|
* once per reader's life (a reader this tab already dials or holds is left alone), and under every guard of a dial (a
|
|
39
|
-
* guest, a terms wall, a refusal).
|
|
40
|
-
*
|
|
41
|
-
*
|
|
80
|
+
* guest, a terms wall, a refusal). `kind` names the reads it readies the reader for (the slot they ride: `candles` by
|
|
81
|
+
* default, `metadata` for the one-shot reads a native options add makes first). A reader no read ever uses is released
|
|
82
|
+
* by the transport's idle sweep. Resolves with what it did (`no-plane` for a chart whose options ride no gate plane,
|
|
83
|
+
* `failed` when a load or a port failed); never rejects.
|
|
42
84
|
*/
|
|
43
|
-
export async function warmWrunChartGateReaderOnIntent(
|
|
85
|
+
export async function warmWrunChartGateReaderOnIntent(chart, surface, kind = 'candles') {
|
|
44
86
|
try {
|
|
45
|
-
if (
|
|
87
|
+
if (chart === null || chart === undefined)
|
|
46
88
|
return 'no-plane';
|
|
47
|
-
const exchange =
|
|
48
|
-
if (exchange ===
|
|
89
|
+
const exchange = gateReaderChartRef(chart).exchange;
|
|
90
|
+
if (typeof exchange !== 'string' || exchange === '')
|
|
91
|
+
return 'no-plane';
|
|
92
|
+
const readExchange = await wrunChartGateReadExchange(chart);
|
|
93
|
+
if (readExchange === null)
|
|
49
94
|
return 'no-plane';
|
|
50
95
|
const { default: v2 } = await wrunChartHostEnv().transport.loadV2Service();
|
|
51
|
-
return await v2.warmGateReaderOnIntent(
|
|
96
|
+
return await v2.warmGateReaderOnIntent(readExchange, surface, kind);
|
|
52
97
|
}
|
|
53
98
|
catch {
|
|
54
99
|
// Advice: the add's own door warm, and its first ask, dial for themselves.
|
|
55
100
|
return 'failed';
|
|
56
101
|
}
|
|
57
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* The add's own dial of the reader a chart's options data reads ride (V2Service `warmGateReaderFor`: the `candles`
|
|
105
|
+
* slot at the served tier, under every guard of an on-demand dial but no lease, since the add contests another tab's
|
|
106
|
+
* session exactly as its first read would). For an add the host has ADMITTED (web: chart.add-indicator, after its
|
|
107
|
+
* slot, duplicate and lock gates), never for an intent: a refused add must dial nothing. A chart whose options ride no
|
|
108
|
+
* plane dials nothing. `chart` is the chart's market (an exchange alone names no market: a stock twin is not seen
|
|
109
|
+
* there, and its venue's own plane is dialed). Resolves once the dial was asked for; never rejects.
|
|
110
|
+
*/
|
|
111
|
+
export async function dialWrunChartGateReaderForAdd(chart) {
|
|
112
|
+
try {
|
|
113
|
+
if (chart === null || chart === undefined)
|
|
114
|
+
return;
|
|
115
|
+
const chartExchange = gateReaderChartRef(chart).exchange;
|
|
116
|
+
if (typeof chartExchange !== 'string' || chartExchange === '')
|
|
117
|
+
return;
|
|
118
|
+
const exchange = await wrunChartGateReadExchange(chart);
|
|
119
|
+
if (exchange === null)
|
|
120
|
+
return;
|
|
121
|
+
const { default: v2 } = await wrunChartHostEnv().transport.loadV2Service();
|
|
122
|
+
v2.warmGateReaderFor(exchange);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
// Advice: the add's first read dials the reader for itself.
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { WrunGateReaderIntentSurface } from '../../../host-ports.types.js';
|
|
2
2
|
import type { WrunIndicatorMetadata } from '../../../interfaces/wrun-runtime.interface.js';
|
|
3
|
+
import { type WrunGateReaderChart } from './wrun-chart-gate-reader.util.js';
|
|
3
4
|
/** Whether a poll source class's plan reads the chart's options chain: an OPRA lane resolves the chain's underlying, a
|
|
4
5
|
* chain lane the chain itself (sources/opra-option-lanes.util), one summary read on the network. The run's lanes known
|
|
5
6
|
* without it never wait for that plan (`prepareWrunSandboxRun`), and its reads ride the chain's plane. */
|
|
@@ -15,9 +16,13 @@ export declare function wrunSheetReadsGatePlane(metadata: Pick<WrunIndicatorMeta
|
|
|
15
16
|
/**
|
|
16
17
|
* Dial the gate reader a sheet's lanes read on this chart, and start the chunk loads their plans await (see the module
|
|
17
18
|
* comment). The plane and its exchange are the chart's (`wrunChartGateReadExchange`, the decision the intent warm of a
|
|
18
|
-
* surface's open shares: the plane the run's planner judges the chart by,
|
|
19
|
-
*
|
|
19
|
+
* surface's open shares: the plane the run's planner judges the chart by, over the market whose options the chart reads,
|
|
20
|
+
* a stock twin's US stock under a lit `opra` flag included, read once the `opra` flag is known when that flag decides
|
|
21
|
+
* the chart's options). `chart` is the chart's market (an exchange alone names no market: a stock twin is not seen
|
|
22
|
+
* there, and its venue's own plane is warmed). `intent`: no add was asked yet (a row's settled intent), so the dial asks the
|
|
20
23
|
* transport's lease-guarded warm (`warmGateReaderOnIntent`) and never takes another tab's session; without it the dial
|
|
21
|
-
* is the add's own (`warmGateReaderFor`)
|
|
24
|
+
* is the add's own (`warmGateReaderFor`), and the door notes the account's options read. On the CME plane the door
|
|
25
|
+
* starts the optionable directory beside the dial, whichever door it is. Resolves once the dial was asked for, or
|
|
26
|
+
* nothing was to warm.
|
|
22
27
|
*/
|
|
23
|
-
export declare function warmWrunSheetGateReaders(metadata: Pick<WrunIndicatorMetadata, 'inputs' | 'inputSources'> | null | undefined,
|
|
28
|
+
export declare function warmWrunSheetGateReaders(metadata: Pick<WrunIndicatorMetadata, 'inputs' | 'inputSources'> | null | undefined, chart: WrunGateReaderChart | null | undefined, intent?: WrunGateReaderIntentSurface): Promise<void>;
|
|
@@ -23,8 +23,15 @@
|
|
|
23
23
|
* A door with no add asked yet (round 2: a row's settled intent, `surface` `add-intent`) dials through the transport's
|
|
24
24
|
* intent warm instead, which never takes the session of another tab of the browser reading that reader
|
|
25
25
|
* (V2Service `warmGateReaderOnIntent`); an add's own doors contest it as the add always did.
|
|
26
|
+
*
|
|
27
|
+
* OPTLOAD W3: on a CME chart the door also starts the optionable directory a chain lane's identity awaits after the
|
|
28
|
+
* plan (two serial StreamMarkets pages on a cold page, 1.5 to 3.8 s from the plan to the first options ask on INT, ES1!
|
|
29
|
+
* 1h), for any account: the plan's read then joins it, or finds its snapshot. And the add's own door notes that this
|
|
30
|
+
* account reads options on the chart's gate plane, the stamp the next chart load prepares that access by (web:
|
|
31
|
+
* utility/options/chart-options-access.util); a row's intent notes nothing.
|
|
26
32
|
*/
|
|
27
33
|
import { wrunChartHostEnv } from '../../../host-env.js';
|
|
34
|
+
import { gateProviderForExchange } from '../../v2/gate-plane.util.js';
|
|
28
35
|
import { wrunPollLanesOfClass } from '../sources/registry.js';
|
|
29
36
|
import { wrunRowLaneOfClass } from '../sources/row-lane-registry.js';
|
|
30
37
|
import { wrunChartGateReadExchange } from './wrun-chart-gate-reader.util.js';
|
|
@@ -53,17 +60,46 @@ export function wrunSourceClassReadsGatePlane(sourceClass) {
|
|
|
53
60
|
export function wrunSheetReadsGatePlane(metadata) {
|
|
54
61
|
return (metadata.inputs ?? []).some((input) => wrunSourceClassReadsGatePlane(metadata.inputSources?.[input.name]?.source));
|
|
55
62
|
}
|
|
63
|
+
/** The add door's options stamp (the provenance port's `noteGatePlaneOptionsRead`, optional): advice, never awaited. */
|
|
64
|
+
function noteWrunDoorOptionsRead(env) {
|
|
65
|
+
try {
|
|
66
|
+
void env.chart
|
|
67
|
+
.loadOptionsOverlayProvenance()
|
|
68
|
+
.then((provenance) => provenance.noteGatePlaneOptionsRead?.())
|
|
69
|
+
.catch(() => undefined);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// A host without the port keeps no stamp: the next chart load prepares nothing ahead, as before.
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/** Start the CME optionable directory read (the market port's `prewarmOptionableDirectory`, optional): advice. */
|
|
76
|
+
function startWrunCmeOptionableDirectory(env) {
|
|
77
|
+
try {
|
|
78
|
+
void env.market
|
|
79
|
+
.loadOptionChainService()
|
|
80
|
+
.then(({ default: service }) => service.prewarmOptionableDirectory?.())
|
|
81
|
+
.catch(() => undefined);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// The plan reads the directory itself, as before.
|
|
85
|
+
}
|
|
86
|
+
}
|
|
56
87
|
/**
|
|
57
88
|
* Dial the gate reader a sheet's lanes read on this chart, and start the chunk loads their plans await (see the module
|
|
58
89
|
* comment). The plane and its exchange are the chart's (`wrunChartGateReadExchange`, the decision the intent warm of a
|
|
59
|
-
* surface's open shares: the plane the run's planner judges the chart by,
|
|
60
|
-
*
|
|
90
|
+
* surface's open shares: the plane the run's planner judges the chart by, over the market whose options the chart reads,
|
|
91
|
+
* a stock twin's US stock under a lit `opra` flag included, read once the `opra` flag is known when that flag decides
|
|
92
|
+
* the chart's options). `chart` is the chart's market (an exchange alone names no market: a stock twin is not seen
|
|
93
|
+
* there, and its venue's own plane is warmed). `intent`: no add was asked yet (a row's settled intent), so the dial asks the
|
|
61
94
|
* transport's lease-guarded warm (`warmGateReaderOnIntent`) and never takes another tab's session; without it the dial
|
|
62
|
-
* is the add's own (`warmGateReaderFor`)
|
|
95
|
+
* is the add's own (`warmGateReaderFor`), and the door notes the account's options read. On the CME plane the door
|
|
96
|
+
* starts the optionable directory beside the dial, whichever door it is. Resolves once the dial was asked for, or
|
|
97
|
+
* nothing was to warm.
|
|
63
98
|
*/
|
|
64
|
-
export async function warmWrunSheetGateReaders(metadata,
|
|
99
|
+
export async function warmWrunSheetGateReaders(metadata, chart, intent) {
|
|
65
100
|
try {
|
|
66
|
-
|
|
101
|
+
const chartExchange = typeof chart === 'string' ? chart : chart?.exchange;
|
|
102
|
+
if (!metadata || !chart || typeof chartExchange !== 'string' || chartExchange === '')
|
|
67
103
|
return;
|
|
68
104
|
if (!wrunSheetReadsGatePlane(metadata))
|
|
69
105
|
return;
|
|
@@ -75,9 +111,14 @@ export async function warmWrunSheetGateReaders(metadata, chartExchange, intent)
|
|
|
75
111
|
env.market.loadDeribitOptions(),
|
|
76
112
|
env.market.loadOptionsChartSource(),
|
|
77
113
|
]);
|
|
78
|
-
const exchange = await wrunChartGateReadExchange(
|
|
114
|
+
const exchange = await wrunChartGateReadExchange(chart);
|
|
79
115
|
if (exchange === null)
|
|
80
116
|
return;
|
|
117
|
+
if (intent === undefined)
|
|
118
|
+
noteWrunDoorOptionsRead(env);
|
|
119
|
+
// The reader the reads ride names the plane (the transport's own routing rule): only a CME chain reads the directory.
|
|
120
|
+
if (gateProviderForExchange(exchange) === 'cme')
|
|
121
|
+
startWrunCmeOptionableDirectory(env);
|
|
81
122
|
const { default: v2 } = await env.transport.loadV2Service();
|
|
82
123
|
if (intent === undefined)
|
|
83
124
|
v2.warmGateReaderFor(exchange);
|
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
*
|
|
20
20
|
* A read that never answers is bounded by the fetch's own deadline (wrun-deadline.util
|
|
21
21
|
* `WRUN_SOURCE_FETCH_DEADLINE_MS`, 45 s from its send) and by the transport's watchdog: it then fails, leaves this
|
|
22
|
-
* registry, and the next rung asks the wire.
|
|
23
|
-
*
|
|
22
|
+
* registry, and the next rung asks the wire. A read whose gate socket stops delivering is asked again by the
|
|
23
|
+
* transport itself, on a fresh socket, before any budget here runs out (the worker's gate reader stall watch,
|
|
24
|
+
* reader-stall-watch.worker.util), so a joined read is never one left on a dead socket. The degrade budget is a paint
|
|
25
|
+
* deadline, never a stall verdict: those are the transport's. A read is taken once (a run that joined it notes it again if its own budget runs out first), a failed read and
|
|
24
26
|
* an answered one past `WRUN_LATE_READ_ADOPT_MS` are dropped, and every read of an overlay goes with it (teardown,
|
|
25
27
|
* suspend: `forgetWrunLateReads`). Pure module state: nothing here reads the host env.
|
|
26
28
|
*/
|
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
*
|
|
20
20
|
* A read that never answers is bounded by the fetch's own deadline (wrun-deadline.util
|
|
21
21
|
* `WRUN_SOURCE_FETCH_DEADLINE_MS`, 45 s from its send) and by the transport's watchdog: it then fails, leaves this
|
|
22
|
-
* registry, and the next rung asks the wire.
|
|
23
|
-
*
|
|
22
|
+
* registry, and the next rung asks the wire. A read whose gate socket stops delivering is asked again by the
|
|
23
|
+
* transport itself, on a fresh socket, before any budget here runs out (the worker's gate reader stall watch,
|
|
24
|
+
* reader-stall-watch.worker.util), so a joined read is never one left on a dead socket. The degrade budget is a paint
|
|
25
|
+
* deadline, never a stall verdict: those are the transport's. A read is taken once (a run that joined it notes it again if its own budget runs out first), a failed read and
|
|
24
26
|
* an answered one past `WRUN_LATE_READ_ADOPT_MS` are dropped, and every read of an overlay goes with it (teardown,
|
|
25
27
|
* suspend: `forgetWrunLateReads`). Pure module state: nothing here reads the host env.
|
|
26
28
|
*/
|
|
@@ -42,9 +42,12 @@ export const WRUN_OPTION_DAILY_LOOKBACK_DAYS = 7;
|
|
|
42
42
|
* resolves afresh (a rolled lead, a listing that changed). */
|
|
43
43
|
const statsCharts = new WeakMap();
|
|
44
44
|
/** The chart the statistics lanes decide their chain over: on the OPRA plane the plane's own chain by coin (no chain
|
|
45
|
-
* directory read: `wrunLaneOpraPlaneChain`), off it the chart's chain as the one resolver resolves it.
|
|
45
|
+
* directory read: `wrunLaneOpraPlaneChain`), off it the chart's chain as the one resolver resolves it. Both lanes
|
|
46
|
+
* decide through decideWrunLaneChain, so the crypto venue listing waits for a crypto venue word. */
|
|
46
47
|
function resolveStatsChart(ctx) {
|
|
47
|
-
return resolveWrunLaneChainChart(ctx, ctx.opraPlane === true ? wrunLaneOpraPlaneChain(ctx.coin) : undefined
|
|
48
|
+
return resolveWrunLaneChainChart(ctx, ctx.opraPlane === true ? wrunLaneOpraPlaneChain(ctx.coin) : undefined, {
|
|
49
|
+
cryptoListingOnDemand: true,
|
|
50
|
+
});
|
|
48
51
|
}
|
|
49
52
|
function statsChartOf(ctx) {
|
|
50
53
|
const scope = ctx.runScope;
|
|
@@ -216,9 +216,12 @@ function printsKnobs(source, ctx, scope) {
|
|
|
216
216
|
* input of one run reads one resolution (one chain, one `auto` book), and the next run resolves afresh. */
|
|
217
217
|
const flowCharts = new WeakMap();
|
|
218
218
|
/** The chart the lane decides its chain over: on the OPRA plane the plane's own chain by coin (no chain directory
|
|
219
|
-
* read: `wrunLaneOpraPlaneChain`), off it the chart's chain as the one resolver resolves it.
|
|
219
|
+
* read: `wrunLaneOpraPlaneChain`), off it the chart's chain as the one resolver resolves it. The lane decides through
|
|
220
|
+
* decideWrunLaneChain, so the crypto venue listing waits for a crypto venue word (`cryptoListingOnDemand`). */
|
|
220
221
|
function flowChartOf(ctx) {
|
|
221
|
-
const resolve = () => resolveWrunLaneChainChart(ctx, ctx.opraPlane === true ? wrunLaneOpraPlaneChain(ctx.coin) : undefined
|
|
222
|
+
const resolve = () => resolveWrunLaneChainChart(ctx, ctx.opraPlane === true ? wrunLaneOpraPlaneChain(ctx.coin) : undefined, {
|
|
223
|
+
cryptoListingOnDemand: true,
|
|
224
|
+
});
|
|
222
225
|
const scope = ctx.runScope;
|
|
223
226
|
if (scope === undefined)
|
|
224
227
|
return resolve();
|
|
@@ -3,7 +3,7 @@ import { type WrunPollLaneContext } from './wrun-poll-lane.types.js';
|
|
|
3
3
|
import { wrunLaneChainPlaneOf, type WrunLaneChainPlane } from './wrun-row-lane.types.js';
|
|
4
4
|
import { type WrunOptionsChainCryptoVenues, type WrunOptionsChainDecision, type WrunOptionsChainRefusal, type WrunOptionsChartSource } from '../wrun-options-chain.util.js';
|
|
5
5
|
import { type WrunRefusalSeed } from '../wrun-refusal.util.js';
|
|
6
|
-
import type { OpraOptionPlaneStop } from '../../../host-ports.types.js';
|
|
6
|
+
import type { OpraOptionPlaneStop, WrunChartOptionsMarket } from '../../../host-ports.types.js';
|
|
7
7
|
type LaneCtx = Pick<WrunPollLaneContext, 'inputName' | 'sourceClass' | 'coin' | 'exchange' | 'symbol'>;
|
|
8
8
|
/** The chart market a lane resolves its chain for, keyed (one resolution per chart per run). */
|
|
9
9
|
export declare function wrunLaneChartKey(ctx: Pick<WrunPollLaneContext, 'exchange' | 'symbol' | 'coin'>): string;
|
|
@@ -20,6 +20,13 @@ export interface WrunLaneChartChain {
|
|
|
20
20
|
* directory read was sent (its reader dials nothing until the take-back, so the read would wait out its budget),
|
|
21
21
|
* and every chain decision over the chart stops with `session-elsewhere` on that plane. */
|
|
22
22
|
heldElsewhere?: GateProvider;
|
|
23
|
+
/** The chain is a stock twin's stock chain (the options seam read the chart's US stock while the `opra` flag is lit):
|
|
24
|
+
* the chart market it stands in for. The chart trades on a crypto or HIP-3 venue, so its crypto venue words still
|
|
25
|
+
* read their venues' chains of the coin (`resolveWrunLaneCryptoVenues`). */
|
|
26
|
+
stockTwinOf?: {
|
|
27
|
+
exchange: string;
|
|
28
|
+
symbol: string;
|
|
29
|
+
};
|
|
23
30
|
}
|
|
24
31
|
/** The chart's metadata as the chain resolution reads it: its market and category (pb-common `Category`). */
|
|
25
32
|
export interface WrunChainChartMetadata {
|
|
@@ -28,24 +35,46 @@ export interface WrunChainChartMetadata {
|
|
|
28
35
|
coin?: unknown;
|
|
29
36
|
category?: unknown;
|
|
30
37
|
}
|
|
38
|
+
/** A run's one options decision as the chain resolution reads it (derived-roots.util `decideWrunRunOptionsMarket`, or
|
|
39
|
+
* a chain lane's context, `optionsDecision`): the market whose options the chart reads, the gate plane they ride, and
|
|
40
|
+
* off every plane the known stop. */
|
|
41
|
+
export interface WrunChartChainDecision {
|
|
42
|
+
market: WrunChartOptionsMarket;
|
|
43
|
+
plane: GateProvider | null;
|
|
44
|
+
opraStop?: OpraOptionPlaneStop;
|
|
45
|
+
}
|
|
31
46
|
/**
|
|
32
47
|
* Resolve the chart's chain (lazy imports: the resolver reaches the chain directory service): the ONE resolution every
|
|
33
48
|
* chain class reads, the options chain lane's (over the chart's own metadata) and each row lane's
|
|
34
|
-
* (`resolveWrunLaneChartChain`, over its context's market and category).
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
49
|
+
* (`resolveWrunLaneChartChain`, over its context's market and category). First the swap: the market whose options the
|
|
50
|
+
* chart reads, `decision.market` when the caller holds the run's one decision (derived-roots.util
|
|
51
|
+
* `decideWrunRunOptionsMarket`), else the options seam now (the gate port's `chartOptionsMarket`): a stock twin's US
|
|
52
|
+
* stock while the `opra` flag is lit (its chain is the stock's OPRA chain, read exactly as a stock chart's, and names
|
|
53
|
+
* the twin, `stockTwinOf`), the chart's own market otherwise (its metadata read as before, its category included). The
|
|
54
|
+
* chart's options controls' resolver (`resolveOptionsChartSource`: an option contract chart on a crypto venue reads its
|
|
55
|
+
* own contract's chain), and a chain directory's own failure on a chart its plane governs (a CME futures chart, a chart
|
|
56
|
+
* on the OPRA plane) as that plane's evidence; any other resolver failure fails the run. Off every plane, the chart's
|
|
57
|
+
* stop reason rides along (`opraStop`, opra-options-gate.util `opraOptionPlaneStop`: the `opra` flag dark, an index
|
|
58
|
+
* chart), so every chain decision over the chart says why it reads no US chain. On a plane another screen holds the
|
|
59
|
+
* session of, nothing is read (`heldElsewhere`): the chain stops by that name at once. With a decision the plane and
|
|
60
|
+
* the stop are the decision's, frozen when the run's head took it, and the resolver is handed that plane (a twin
|
|
61
|
+
* answer or a flag landing since never moves the run's chain onto another plane); without one each is read now, over
|
|
62
|
+
* the market (exchange and symbol), never the venue alone.
|
|
41
63
|
*/
|
|
42
|
-
export declare function resolveWrunChartChain(metadata: WrunChainChartMetadata | undefined): Promise<WrunLaneChartChain>;
|
|
43
|
-
/** Resolve the chart's chain for a lane: `resolveWrunChartChain` over the lane context's market and category.
|
|
44
|
-
|
|
64
|
+
export declare function resolveWrunChartChain(metadata: WrunChainChartMetadata | undefined, decision?: WrunChartChainDecision): Promise<WrunLaneChartChain>;
|
|
65
|
+
/** Resolve the chart's chain for a lane: `resolveWrunChartChain` over the lane context's market and category. In a
|
|
66
|
+
* run's plan the context IS the run's one options market (the planner swapped a stock twin's chain lanes onto its
|
|
67
|
+
* stock, derived-roots.util `wrunUnderlyingLaneContext`) and carries the run's decision (`optionsDecision`): the chain
|
|
68
|
+
* resolves under that decision's plane, never the seam's or the flag's of now. Outside a plan (no decision) both are
|
|
69
|
+
* read now. */
|
|
70
|
+
export declare function resolveWrunLaneChartChain(ctx: Pick<WrunPollLaneContext, 'exchange' | 'symbol' | 'coin' | 'category' | 'stockTwinOf' | 'optionsDecision'>): Promise<WrunLaneChartChain>;
|
|
45
71
|
/** The crypto venue words a chain decision reads on this chart: on the OPRA plane no crypto venue lists a US
|
|
46
|
-
* stock's options (the words refuse by the flag alone, no listing asked)
|
|
47
|
-
*
|
|
48
|
-
|
|
72
|
+
* stock's options (the words refuse by the flag alone, no listing asked), unless the chain is a stock twin's
|
|
73
|
+
* (`stockTwinOf`: the chart trades on a crypto venue, and a word naming one reads that venue's chain of the coin, so a
|
|
74
|
+
* script pinning `bybit` keeps Bybit's); anywhere else the run's own resolver over the crypto words among `venues`
|
|
75
|
+
* (every crypto word when absent; the listing is asked once per coin, and only for a crypto word with the
|
|
76
|
+
* crypto-options gate on: `[]` reads the gate and the coin alone). */
|
|
77
|
+
export declare function resolveWrunLaneCryptoVenues(chain: WrunLaneChartChain, chartCoin: string, venues?: readonly unknown[]): Promise<WrunOptionsChainCryptoVenues>;
|
|
49
78
|
export { wrunLaneChainPlaneOf, type WrunLaneChainPlane };
|
|
50
79
|
/** The `book` knob's default word: the series named after the chain's coin, else the first series in series order,
|
|
51
80
|
* resolved to that one series when the run plans (`decideWrunLaneChain`), never per answer. */
|
|
@@ -89,6 +118,9 @@ export type WrunLaneChainOfBook = Omit<WrunLaneChain, 'book'>;
|
|
|
89
118
|
export interface WrunLaneChainChart {
|
|
90
119
|
chain: WrunLaneChartChain;
|
|
91
120
|
cryptoVenues: WrunOptionsChainCryptoVenues;
|
|
121
|
+
/** A chart resolved with its listing on demand (`WrunLaneChainChartOptions`): the listing, asked once, when a
|
|
122
|
+
* decision first names a crypto venue word (`decideWrunLaneChain`); `cryptoVenues` holds the gate and the coin. */
|
|
123
|
+
cryptoVenuesOnDemand?: () => Promise<WrunOptionsChainCryptoVenues>;
|
|
92
124
|
deribitListed: (coin: string) => boolean;
|
|
93
125
|
/** The exchange a plain venue word's chain lists on (the venue table's first exchange of its row). */
|
|
94
126
|
venueExchange: (word: string) => string | undefined;
|
|
@@ -101,6 +133,16 @@ export interface WrunLaneChainChart {
|
|
|
101
133
|
/** The book `auto` reads on a decided chain (`resolveWrunLaneChainAutoBook`), asked once per chain per run. */
|
|
102
134
|
autoBook: (chain: WrunLaneChainOfBook) => Promise<string>;
|
|
103
135
|
}
|
|
136
|
+
/** How a chart is resolved for a lane (`resolveWrunLaneChainChart`). */
|
|
137
|
+
export interface WrunLaneChainChartOptions {
|
|
138
|
+
/**
|
|
139
|
+
* Ask the crypto venue listing only when an input's venue word names a crypto venue (`decideWrunLaneChain` asks it),
|
|
140
|
+
* so an `auto`, `cme` or `deribit` decision reads none: a CME chain asks no listing before its read. For a lane that
|
|
141
|
+
* decides every input through `decideWrunLaneChain`: the synchronous `decideWrunLaneChainIdentity` cannot ask, and
|
|
142
|
+
* refuses a crypto word over such a chart. Absent: every crypto word's listing, asked when the chart resolves.
|
|
143
|
+
*/
|
|
144
|
+
cryptoListingOnDemand?: boolean;
|
|
145
|
+
}
|
|
104
146
|
/**
|
|
105
147
|
* The book `auto` reads on a decided chain (D11), resolved when the run plans, from the chain's own listing and never
|
|
106
148
|
* from the rows an answer holds, so every ask of one instance (each tier segment, the coarser tier's fallback, each
|
|
@@ -129,9 +171,9 @@ export declare const WRUN_OPTION_CHART_UNRESOLVED_CODE = "wrun_option_chart_unre
|
|
|
129
171
|
* words (`resolveWrunLaneCryptoVenues`), for a CME chain on a continuous alias the contract leading it now
|
|
130
172
|
* (option-chain.service `resolveChainContract`, the roll rule the terminal identity admits the alias by; MES1!'s as
|
|
131
173
|
* MESF's contract), and each decided chain's default book (`resolveWrunLaneChainAutoBook`, asked once per chain for
|
|
132
|
-
* this chart).
|
|
174
|
+
* this chart). The crypto venue listing is asked here for every crypto word, or on demand (`options`).
|
|
133
175
|
*/
|
|
134
|
-
export declare function resolveWrunLaneChainChart(ctx: Pick<WrunPollLaneContext, 'exchange' | 'symbol' | 'coin' | 'category'>, held?: WrunLaneChartChain): Promise<WrunLaneChainChart>;
|
|
176
|
+
export declare function resolveWrunLaneChainChart(ctx: Pick<WrunPollLaneContext, 'exchange' | 'symbol' | 'coin' | 'category' | 'stockTwinOf' | 'optionsDecision'>, held?: WrunLaneChartChain, options?: WrunLaneChainChartOptions): Promise<WrunLaneChainChart>;
|
|
135
177
|
/**
|
|
136
178
|
* The chart's chain on the OPRA plane, read off the plane itself: OPRA's chain of the chart's own underlying (its coin,
|
|
137
179
|
* upper case: a stock or ETF chart's ticker, an OPRA contract chart's underlying), on the plane's one exchange (the
|
|
@@ -141,7 +183,10 @@ export declare function resolveWrunLaneChainChart(ctx: Pick<WrunPollLaneContext,
|
|
|
141
183
|
* failing, refuses nothing before the read (an empty answer, and the empty-answer rule speaks). The venue and book words
|
|
142
184
|
* are still decided over it (`decideWrunLaneChain`), with no read either.
|
|
143
185
|
*/
|
|
144
|
-
export declare function wrunLaneOpraPlaneChain(coin: string
|
|
186
|
+
export declare function wrunLaneOpraPlaneChain(coin: string, stockTwinOf?: {
|
|
187
|
+
exchange: string;
|
|
188
|
+
symbol: string;
|
|
189
|
+
}): WrunLaneChartChain;
|
|
145
190
|
/** Who a venue decision is for: the input, the chart market (and the label a refusal names it by, `EXCHANGE/SYMBOL`
|
|
146
191
|
* by default) and the run's OPRA facts. */
|
|
147
192
|
export interface WrunLaneChainDecider {
|
|
@@ -160,7 +205,7 @@ export interface WrunLaneChainDecider {
|
|
|
160
205
|
* chain, else the first venue whose listing names the coin; a pinned word that venue's chain; the `crypto-options`
|
|
161
206
|
* flag, the listing, the directory and the OPRA wall by name). A refusal comes back as the decision's own.
|
|
162
207
|
*/
|
|
163
|
-
export declare function decideWrunLaneChainIdentity(chart: Pick<WrunLaneChainChart, 'chain' | 'cryptoVenues' | 'deribitListed'>, venue: unknown, who: WrunLaneChainDecider): WrunOptionsChainDecision;
|
|
208
|
+
export declare function decideWrunLaneChainIdentity(chart: Pick<WrunLaneChainChart, 'chain' | 'cryptoVenues' | 'deribitListed' | 'cryptoVenuesOnDemand'>, venue: unknown, who: WrunLaneChainDecider): WrunOptionsChainDecision;
|
|
164
209
|
/** The input's `book`, validated: `auto` (absent too) or one series name upper case, else a refusal by name
|
|
165
210
|
* (`wrun_option_knob_invalid`, om's one name for an options knob outside its words). */
|
|
166
211
|
export declare function wrunLaneChainBook(value: unknown, ctx: {
|
|
@@ -175,7 +220,7 @@ export declare function wrunLaneChainBook(value: unknown, ctx: {
|
|
|
175
220
|
* exchange, the underlying the plane files the series under (a CME continuous alias read as the contract leading it
|
|
176
221
|
* now), the coin and the book. Refuses by name with the options chain's own reasons and seeds (a coin no venue lists:
|
|
177
222
|
* `no-chain`), a continuous CME chart whose lead cannot be resolved (`cme-unresolved`, Retry), and a book outside its
|
|
178
|
-
* words.
|
|
223
|
+
* words. A crypto word over a chart whose listing is asked on demand asks it here, once per chart.
|
|
179
224
|
*/
|
|
180
225
|
export declare function decideWrunLaneChain(chart: WrunLaneChainChart, knobs: {
|
|
181
226
|
venue?: unknown;
|