@orangecharts/wrun-chart-host 0.9.0 → 0.11.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 +2 -0
- package/dist/constants/feature-flags.constants.d.ts +15 -1
- package/dist/constants/feature-flags.constants.js +130 -24
- package/dist/constants/governed-exchanges.constants.d.ts +12 -0
- package/dist/constants/governed-exchanges.constants.js +16 -0
- package/dist/constants/opra-compliance.constants.d.ts +3 -2
- package/dist/constants/opra-compliance.constants.js +3 -2
- package/dist/constants/option-venues.constants.d.ts +2 -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 +21 -5
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +102 -19
- package/dist/index.d.ts +18 -0
- package/dist/index.js +18 -0
- package/dist/interfaces/cancel-reason.interface.d.ts +1 -1
- package/dist/interfaces/cme-realtime.interface.d.ts +16 -9
- package/dist/interfaces/cme-realtime.interface.js +6 -3
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +12 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +1 -5
- package/dist/interfaces/prediction-market.interface.d.ts +7 -0
- package/dist/interfaces/replay.interface.d.ts +8 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +57 -0
- package/dist/interfaces/stocks-realtime.interface.js +32 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +18 -2
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +62 -94
- package/dist/kscript-data/controls/live-trades-merge.util.js +106 -171
- package/dist/market-data/billing.interface.d.ts +174 -36
- package/dist/market-data/billing.interface.js +58 -8
- package/dist/market-data/venue.d.ts +152 -7
- 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 +294 -7
- package/dist/market-data/venues/index.js +49 -6
- package/dist/market-data/venues/opra.contract.copy.json +3 -2
- package/dist/market-data/venues/opra.d.ts +2 -2
- package/dist/market-data/venues/opra.js +5 -2
- package/dist/market-data/venues/stocks.contract.copy.json +64 -0
- package/dist/market-data/venues/stocks.d.ts +130 -0
- package/dist/market-data/venues/stocks.js +117 -0
- package/dist/settings-templates/footprint-rows.js +35 -2
- package/dist/settings-templates/form-rows.d.ts +2 -1
- 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 +79 -10
- package/dist/settings-templates/tool-rules.d.ts +32 -15
- package/dist/settings-templates/tool-rules.js +33 -11
- package/dist/settings-templates/tool-tables.generated.js +95 -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/cme-cache-context.util.d.ts +5 -3
- package/dist/utility/chart/cme-cache-context.util.js +10 -6
- package/dist/utility/chart/cme-realtime.util.js +10 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +83 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.js +142 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +14 -0
- package/dist/utility/chart/effective-chart-session.util.js +39 -0
- package/dist/utility/chart/host-bar-placement.util.d.ts +28 -0
- package/dist/utility/chart/host-bar-placement.util.js +170 -30
- package/dist/utility/chart/index-host-tier.util.d.ts +3 -1
- package/dist/utility/chart/index-host-tier.util.js +7 -2
- package/dist/utility/chart/index-mode-admission.util.js +30 -3
- package/dist/utility/chart/kscript-apply-fingerprint.util.js +1 -1
- 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 +9 -7
- package/dist/utility/chart/kscript-live-coalesce.util.js +13 -8
- package/dist/utility/chart/kscript-live-source-identity.util.d.ts +9 -0
- package/dist/utility/chart/kscript-live-source-identity.util.js +10 -1
- package/dist/utility/chart/kscript-provenance-keys.util.js +13 -0
- package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +5 -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 +156 -43
- package/dist/utility/chart/kscript-venue-policy.util.js +249 -59
- package/dist/utility/chart/live-bucket.util.d.ts +24 -8
- package/dist/utility/chart/live-bucket.util.js +85 -27
- 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/marketKind.util.js +5 -0
- package/dist/utility/chart/mixed-mode.util.d.ts +7 -0
- package/dist/utility/chart/mixed-mode.util.js +14 -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/opra-user-scripts-gate.util.d.ts +11 -16
- package/dist/utility/chart/opra-user-scripts-gate.util.js +12 -28
- package/dist/utility/chart/rth-session.util.d.ts +12 -10
- package/dist/utility/chart/rth-session.util.js +25 -21
- package/dist/utility/chart/trading-day.util.d.ts +17 -0
- package/dist/utility/chart/trading-day.util.js +59 -0
- 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/window-owner.leaf.d.ts +23 -2
- package/dist/utility/chart/window-owner.leaf.js +45 -3
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +33 -15
- package/dist/utility/chart/wrun-bar-session-facts.util.js +70 -20
- 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/intl-locale.util.js +5 -0
- 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 +4 -0
- package/dist/utility/v2/gate-plane.util.d.ts +12 -3
- package/dist/utility/v2/gate-plane.util.js +30 -4
- package/dist/utility/v2/gate-session-latch.util.js +1 -1
- package/dist/utility/v2/stocks-governed.util.d.ts +16 -0
- package/dist/utility/v2/stocks-governed.util.js +34 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +13 -0
- package/dist/utility/wrun/derived-roots.leaf.js +27 -0
- package/dist/utility/wrun/derived-roots.util.d.ts +205 -0
- package/dist/utility/wrun/derived-roots.util.js +451 -0
- package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +43 -7
- 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/run-schedule/wrun-own-candles.util.d.ts +24 -3
- package/dist/utility/wrun/run-schedule/wrun-own-candles.util.js +46 -10
- 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 +41 -10
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +111 -0
- package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +133 -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 +197 -13
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +761 -27
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +1 -2
- 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 +60 -16
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +113 -61
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +9 -0
- package/dist/utility/wrun/wrun-color-settings.util.js +33 -0
- 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-handles.util.d.ts +7 -3
- package/dist/utility/wrun/wrun-handles.util.js +9 -8
- 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-input-requirements.leaf.d.ts +68 -0
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +163 -7
- package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +59 -23
- package/dist/utility/wrun/wrun-leg-close.util.js +186 -28
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +35 -15
- package/dist/utility/wrun/wrun-live-intake.util.js +243 -126
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +13 -5
- package/dist/utility/wrun/wrun-live-tick.util.js +279 -99
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-market-facts.util.js +13 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +60 -11
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +70 -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-book-rows.util.d.ts +56 -0
- package/dist/utility/wrun/wrun-option-book-rows.util.js +96 -0
- 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 +323 -28
- package/dist/utility/wrun/wrun-option-views.util.js +484 -71
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-options-chain.util.js +2 -0
- 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 +32 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +13 -3
- 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-recovery.util.js +3 -1
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +160 -42
- package/dist/utility/wrun/wrun-overlay-run.util.js +1244 -209
- 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 +114 -19
- 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.d.ts +15 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.js +39 -14
- 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-refusal.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-refusal.util.js +22 -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-registry-errors.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-registry-errors.util.js +34 -0
- package/dist/utility/wrun/wrun-replay-lane.util.js +3 -2
- package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-run-interval-session.util.js +22 -7
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +43 -9
- package/dist/utility/wrun/wrun-run-interval.util.js +58 -15
- 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 +118 -8
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +29 -18
- package/dist/utility/wrun/wrun-source-rows.util.js +61 -27
- 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 +7 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +17 -9
- package/dist/utility/wrun/wrun-tape-source.util.js +20 -12
- package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
- package/dist/utils/replay/replay-buffer-math.js +227 -20
- package/dist/workers/constants/socket-slots.d.ts +91 -6
- package/dist/workers/constants/socket-slots.js +85 -6
- package/package.json +5 -5
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export type SlotFamily = 'reader' | 'livefeed' | 'alert' | 'parking';
|
|
18
18
|
/** `v3`: the /v3 gateway, kept apart so the core v2 pair's ping, probe and reconnect paths never see it. */
|
|
19
|
-
export type SlotProvider = 'core' | 'cme' | 'opra' | 'v3' | 'blk';
|
|
19
|
+
export type SlotProvider = 'core' | 'cme' | 'opra' | 'stocks' | 'v3' | 'blk';
|
|
20
20
|
/** Timing tier for governed slots; null = untiered (core sockets / legacy `?tier=`). */
|
|
21
21
|
type SlotTier = 'realtime' | 'delayed' | null;
|
|
22
22
|
/** Connect-time auth style: an on-open `public/authenticate` frame, or none (reader RPC-level). */
|
|
@@ -39,8 +39,8 @@ export type SlotWorkerKeepalive = 'alertPing' | 'gatePing' | 'readerIdlePing' |
|
|
|
39
39
|
* an owner instead.
|
|
40
40
|
*/
|
|
41
41
|
type SlotMainThreadKeepalive = 'v2PingPong' | 'liveFeedService' | 'alertService' | null;
|
|
42
|
-
/** The
|
|
43
|
-
type SlotUrlKey = 'CME_V2_WEB_SOCKET' | 'CME_LIVE_FEED_URL' | 'OPRA_V2_WEB_SOCKET' | 'OPRA_LIVE_FEED_URL' | 'BLK_V2_WEB_SOCKET' | 'BLK_LIVE_FEED_URL' | null;
|
|
42
|
+
/** The gate base URLs, two per plane (contract C1: tier is a path over these, not a new env var). */
|
|
43
|
+
type SlotUrlKey = 'CME_V2_WEB_SOCKET' | 'CME_LIVE_FEED_URL' | 'OPRA_V2_WEB_SOCKET' | 'OPRA_LIVE_FEED_URL' | 'STOCKS_V2_WEB_SOCKET' | 'STOCKS_LIVE_FEED_URL' | 'BLK_V2_WEB_SOCKET' | 'BLK_LIVE_FEED_URL' | null;
|
|
44
44
|
type SlotPathPrefix = '/live/' | '/delayed/' | '';
|
|
45
45
|
export interface SlotSpec {
|
|
46
46
|
/** Inbound handler + registry family. `parking` = a GOING_AWAY handover target, never opened directly. */
|
|
@@ -386,6 +386,66 @@ export declare const SOCKET_SLOTS: {
|
|
|
386
386
|
readonly connectable: true;
|
|
387
387
|
readonly wire: "v2";
|
|
388
388
|
};
|
|
389
|
+
readonly stocksV2Realtime: {
|
|
390
|
+
readonly family: "reader";
|
|
391
|
+
readonly provider: "stocks";
|
|
392
|
+
readonly tier: "realtime";
|
|
393
|
+
readonly auth: "frame";
|
|
394
|
+
readonly sendsTierFrame: true;
|
|
395
|
+
readonly subscribeParams: null;
|
|
396
|
+
readonly workerKeepalive: "gatePing";
|
|
397
|
+
readonly mainThreadKeepalive: null;
|
|
398
|
+
readonly parkingSlot: null;
|
|
399
|
+
readonly urlKey: "STOCKS_V2_WEB_SOCKET";
|
|
400
|
+
readonly pathPrefix: "/live/";
|
|
401
|
+
readonly connectable: true;
|
|
402
|
+
readonly wire: "v2";
|
|
403
|
+
};
|
|
404
|
+
readonly stocksV2Delayed: {
|
|
405
|
+
readonly family: "reader";
|
|
406
|
+
readonly provider: "stocks";
|
|
407
|
+
readonly tier: "delayed";
|
|
408
|
+
readonly auth: "frame";
|
|
409
|
+
readonly sendsTierFrame: true;
|
|
410
|
+
readonly subscribeParams: null;
|
|
411
|
+
readonly workerKeepalive: "gatePing";
|
|
412
|
+
readonly mainThreadKeepalive: null;
|
|
413
|
+
readonly parkingSlot: null;
|
|
414
|
+
readonly urlKey: "STOCKS_V2_WEB_SOCKET";
|
|
415
|
+
readonly pathPrefix: "/delayed/";
|
|
416
|
+
readonly connectable: true;
|
|
417
|
+
readonly wire: "v2";
|
|
418
|
+
};
|
|
419
|
+
readonly stocksLiveFeedRealtime: {
|
|
420
|
+
readonly family: "livefeed";
|
|
421
|
+
readonly provider: "stocks";
|
|
422
|
+
readonly tier: "realtime";
|
|
423
|
+
readonly auth: "frame";
|
|
424
|
+
readonly sendsTierFrame: true;
|
|
425
|
+
readonly subscribeParams: "brotliV2";
|
|
426
|
+
readonly workerKeepalive: "gatePing";
|
|
427
|
+
readonly mainThreadKeepalive: null;
|
|
428
|
+
readonly parkingSlot: null;
|
|
429
|
+
readonly urlKey: "STOCKS_LIVE_FEED_URL";
|
|
430
|
+
readonly pathPrefix: "/live/";
|
|
431
|
+
readonly connectable: true;
|
|
432
|
+
readonly wire: "v2";
|
|
433
|
+
};
|
|
434
|
+
readonly stocksLiveFeedDelayed: {
|
|
435
|
+
readonly family: "livefeed";
|
|
436
|
+
readonly provider: "stocks";
|
|
437
|
+
readonly tier: "delayed";
|
|
438
|
+
readonly auth: "frame";
|
|
439
|
+
readonly sendsTierFrame: true;
|
|
440
|
+
readonly subscribeParams: "brotliV2";
|
|
441
|
+
readonly workerKeepalive: "gatePing";
|
|
442
|
+
readonly mainThreadKeepalive: null;
|
|
443
|
+
readonly parkingSlot: null;
|
|
444
|
+
readonly urlKey: "STOCKS_LIVE_FEED_URL";
|
|
445
|
+
readonly pathPrefix: "/delayed/";
|
|
446
|
+
readonly connectable: true;
|
|
447
|
+
readonly wire: "v2";
|
|
448
|
+
};
|
|
389
449
|
readonly kscriptAlert: {
|
|
390
450
|
readonly family: "alert";
|
|
391
451
|
readonly provider: "core";
|
|
@@ -507,13 +567,28 @@ export declare function isPlainReaderSlot(wsType: string): wsType is 'v2';
|
|
|
507
567
|
export declare function isBlkReaderSlot(wsType: string): wsType is 'blkV2';
|
|
508
568
|
export declare function isCmeReaderSlot(wsType: string): wsType is CmeReaderSlotId;
|
|
509
569
|
export declare function isCmeLivefeedSlot(wsType: string): wsType is CmeLivefeedSlotId;
|
|
510
|
-
export type GateProvider = 'cme' | 'opra';
|
|
570
|
+
export type GateProvider = 'cme' | 'opra' | 'stocks';
|
|
571
|
+
/** Every gate plane, in the order the planes shipped: the one list a per-plane loop or table reads. */
|
|
572
|
+
export declare const GATE_PROVIDERS: readonly GateProvider[];
|
|
573
|
+
/** Whether a provider id names a gate plane (`GateProvider`), as a type guard over any string. */
|
|
574
|
+
export declare function isGateProvider(provider: unknown): provider is GateProvider;
|
|
575
|
+
/**
|
|
576
|
+
* The gate planes that list option chains (CME Group options on the CME gate, US listed options on the OPRA gate).
|
|
577
|
+
* The stocks tape carries trades alone: an options identity, fold class or chain directory never names it, so the
|
|
578
|
+
* options code keys on this narrower union and a `GateProvider` reaches it through `isOptionsGateProvider`.
|
|
579
|
+
*/
|
|
580
|
+
export type OptionsGateProvider = Extract<GateProvider, 'cme' | 'opra'>;
|
|
581
|
+
export declare function isOptionsGateProvider(provider: unknown): provider is OptionsGateProvider;
|
|
511
582
|
export type OpraReaderSlotId = SlotIdOfFamilyAndProvider<'reader', 'opra'>;
|
|
512
583
|
export type OpraLivefeedSlotId = SlotIdOfFamilyAndProvider<'livefeed', 'opra'>;
|
|
513
|
-
export type
|
|
514
|
-
export type
|
|
584
|
+
export type StocksReaderSlotId = SlotIdOfFamilyAndProvider<'reader', 'stocks'>;
|
|
585
|
+
export type StocksLivefeedSlotId = SlotIdOfFamilyAndProvider<'livefeed', 'stocks'>;
|
|
586
|
+
export type GateReaderSlotId = CmeReaderSlotId | OpraReaderSlotId | StocksReaderSlotId;
|
|
587
|
+
export type GateLivefeedSlotId = CmeLivefeedSlotId | OpraLivefeedSlotId | StocksLivefeedSlotId;
|
|
515
588
|
export declare const OPRA_READER_SLOT_IDS: readonly SlotIdOfFamilyAndProvider<"reader", "opra">[];
|
|
516
589
|
export declare const OPRA_LIVEFEED_SLOT_IDS: readonly SlotIdOfFamilyAndProvider<"livefeed", "opra">[];
|
|
590
|
+
export declare const STOCKS_READER_SLOT_IDS: readonly SlotIdOfFamilyAndProvider<"reader", "stocks">[];
|
|
591
|
+
export declare const STOCKS_LIVEFEED_SLOT_IDS: readonly SlotIdOfFamilyAndProvider<"livefeed", "stocks">[];
|
|
517
592
|
export declare const GATE_READER_SLOT_IDS_BY_PROVIDER: Record<GateProvider, readonly GateReaderSlotId[]>;
|
|
518
593
|
export declare const GATE_LIVEFEED_SLOT_IDS_BY_PROVIDER: Record<GateProvider, readonly GateLivefeedSlotId[]>;
|
|
519
594
|
/** Every gate plane's reader tiers, for the plane-neutral sweeps (sleep heal, idle release). */
|
|
@@ -546,6 +621,16 @@ declare const GATE_SLOT_BY_PROVIDER_FAMILY_TIER: {
|
|
|
546
621
|
readonly delayed: "opraLiveFeedDelayed";
|
|
547
622
|
};
|
|
548
623
|
};
|
|
624
|
+
readonly stocks: {
|
|
625
|
+
readonly reader: {
|
|
626
|
+
readonly realtime: "stocksV2Realtime";
|
|
627
|
+
readonly delayed: "stocksV2Delayed";
|
|
628
|
+
};
|
|
629
|
+
readonly livefeed: {
|
|
630
|
+
readonly realtime: "stocksLiveFeedRealtime";
|
|
631
|
+
readonly delayed: "stocksLiveFeedDelayed";
|
|
632
|
+
};
|
|
633
|
+
};
|
|
549
634
|
};
|
|
550
635
|
export declare function gateSlotForTier<P extends GateProvider, F extends 'reader' | 'livefeed', T extends CmeTier>(provider: P, family: F, tier: T): (typeof GATE_SLOT_BY_PROVIDER_FAMILY_TIER)[P][F][T];
|
|
551
636
|
/** The gate plane a slot belongs to, or null for the core, v3 and blk slots. */
|
|
@@ -350,6 +350,70 @@ export const SOCKET_SLOTS = {
|
|
|
350
350
|
connectable: true,
|
|
351
351
|
wire: 'v2',
|
|
352
352
|
},
|
|
353
|
+
// The US stocks entitlement gate (the consolidated tape: NYSE, NYSE_ARCA and NASDAQ, the three SIP tapes on the
|
|
354
|
+
// cme cluster): the same path-based tiers, tier frame, device-scoped auth and kick model as the CME and OPRA gates,
|
|
355
|
+
// on its own base URLs and kick channel. No /v3 twins (the stocks gate mounts none) and no book types (the tape
|
|
356
|
+
// carries trades only). A logged-out visitor dials its delayed tiers with the guest token (GATE_PLANES.stocks).
|
|
357
|
+
stocksV2Realtime: {
|
|
358
|
+
family: 'reader',
|
|
359
|
+
provider: 'stocks',
|
|
360
|
+
tier: 'realtime',
|
|
361
|
+
auth: 'frame',
|
|
362
|
+
sendsTierFrame: true,
|
|
363
|
+
subscribeParams: null,
|
|
364
|
+
workerKeepalive: 'gatePing',
|
|
365
|
+
mainThreadKeepalive: null,
|
|
366
|
+
parkingSlot: null,
|
|
367
|
+
urlKey: 'STOCKS_V2_WEB_SOCKET',
|
|
368
|
+
pathPrefix: '/live/',
|
|
369
|
+
connectable: true,
|
|
370
|
+
wire: 'v2',
|
|
371
|
+
},
|
|
372
|
+
stocksV2Delayed: {
|
|
373
|
+
family: 'reader',
|
|
374
|
+
provider: 'stocks',
|
|
375
|
+
tier: 'delayed',
|
|
376
|
+
auth: 'frame',
|
|
377
|
+
sendsTierFrame: true,
|
|
378
|
+
subscribeParams: null,
|
|
379
|
+
workerKeepalive: 'gatePing',
|
|
380
|
+
mainThreadKeepalive: null,
|
|
381
|
+
parkingSlot: null,
|
|
382
|
+
urlKey: 'STOCKS_V2_WEB_SOCKET',
|
|
383
|
+
pathPrefix: '/delayed/',
|
|
384
|
+
connectable: true,
|
|
385
|
+
wire: 'v2',
|
|
386
|
+
},
|
|
387
|
+
stocksLiveFeedRealtime: {
|
|
388
|
+
family: 'livefeed',
|
|
389
|
+
provider: 'stocks',
|
|
390
|
+
tier: 'realtime',
|
|
391
|
+
auth: 'frame',
|
|
392
|
+
sendsTierFrame: true,
|
|
393
|
+
subscribeParams: 'brotliV2',
|
|
394
|
+
workerKeepalive: 'gatePing',
|
|
395
|
+
mainThreadKeepalive: null,
|
|
396
|
+
parkingSlot: null,
|
|
397
|
+
urlKey: 'STOCKS_LIVE_FEED_URL',
|
|
398
|
+
pathPrefix: '/live/',
|
|
399
|
+
connectable: true,
|
|
400
|
+
wire: 'v2',
|
|
401
|
+
},
|
|
402
|
+
stocksLiveFeedDelayed: {
|
|
403
|
+
family: 'livefeed',
|
|
404
|
+
provider: 'stocks',
|
|
405
|
+
tier: 'delayed',
|
|
406
|
+
auth: 'frame',
|
|
407
|
+
sendsTierFrame: true,
|
|
408
|
+
subscribeParams: 'brotliV2',
|
|
409
|
+
workerKeepalive: 'gatePing',
|
|
410
|
+
mainThreadKeepalive: null,
|
|
411
|
+
parkingSlot: null,
|
|
412
|
+
urlKey: 'STOCKS_LIVE_FEED_URL',
|
|
413
|
+
pathPrefix: '/delayed/',
|
|
414
|
+
connectable: true,
|
|
415
|
+
wire: 'v2',
|
|
416
|
+
},
|
|
353
417
|
kscriptAlert: {
|
|
354
418
|
family: 'alert',
|
|
355
419
|
provider: 'core',
|
|
@@ -460,23 +524,34 @@ export function isCmeReaderSlot(wsType) {
|
|
|
460
524
|
export function isCmeLivefeedSlot(wsType) {
|
|
461
525
|
return CME_LIVEFEED_SLOT_SET.has(wsType);
|
|
462
526
|
}
|
|
527
|
+
/** Every gate plane, in the order the planes shipped: the one list a per-plane loop or table reads. */
|
|
528
|
+
export const GATE_PROVIDERS = ['cme', 'opra', 'stocks'];
|
|
529
|
+
const GATE_PROVIDER_SET = new Set(GATE_PROVIDERS);
|
|
530
|
+
/** Whether a provider id names a gate plane (`GateProvider`), as a type guard over any string. */
|
|
531
|
+
export function isGateProvider(provider) {
|
|
532
|
+
return typeof provider === 'string' && GATE_PROVIDER_SET.has(provider);
|
|
533
|
+
}
|
|
534
|
+
export function isOptionsGateProvider(provider) {
|
|
535
|
+
return provider === 'cme' || provider === 'opra';
|
|
536
|
+
}
|
|
463
537
|
export const OPRA_READER_SLOT_IDS = slotIdsOfFamilyAndProvider('reader', 'opra');
|
|
464
538
|
export const OPRA_LIVEFEED_SLOT_IDS = slotIdsOfFamilyAndProvider('livefeed', 'opra');
|
|
539
|
+
export const STOCKS_READER_SLOT_IDS = slotIdsOfFamilyAndProvider('reader', 'stocks');
|
|
540
|
+
export const STOCKS_LIVEFEED_SLOT_IDS = slotIdsOfFamilyAndProvider('livefeed', 'stocks');
|
|
465
541
|
export const GATE_READER_SLOT_IDS_BY_PROVIDER = {
|
|
466
542
|
cme: CME_READER_SLOT_IDS,
|
|
467
543
|
opra: OPRA_READER_SLOT_IDS,
|
|
544
|
+
stocks: STOCKS_READER_SLOT_IDS,
|
|
468
545
|
};
|
|
469
546
|
export const GATE_LIVEFEED_SLOT_IDS_BY_PROVIDER = {
|
|
470
547
|
cme: CME_LIVEFEED_SLOT_IDS,
|
|
471
548
|
opra: OPRA_LIVEFEED_SLOT_IDS,
|
|
549
|
+
stocks: STOCKS_LIVEFEED_SLOT_IDS,
|
|
472
550
|
};
|
|
473
551
|
/** Every gate plane's reader tiers, for the plane-neutral sweeps (sleep heal, idle release). */
|
|
474
|
-
export const GATE_READER_SLOT_IDS = [
|
|
552
|
+
export const GATE_READER_SLOT_IDS = GATE_PROVIDERS.flatMap((provider) => GATE_READER_SLOT_IDS_BY_PROVIDER[provider]);
|
|
475
553
|
/** Every gate plane's live-feed tiers, for the plane-neutral sweeps. */
|
|
476
|
-
export const GATE_LIVEFEED_SLOT_IDS = [
|
|
477
|
-
...CME_LIVEFEED_SLOT_IDS,
|
|
478
|
-
...OPRA_LIVEFEED_SLOT_IDS,
|
|
479
|
-
];
|
|
554
|
+
export const GATE_LIVEFEED_SLOT_IDS = GATE_PROVIDERS.flatMap((provider) => GATE_LIVEFEED_SLOT_IDS_BY_PROVIDER[provider]);
|
|
480
555
|
/**
|
|
481
556
|
* The gate slot serving each (provider, family, tier). `satisfies` makes the
|
|
482
557
|
* compiler reject a plane missing a tier pairing, so a new provider cannot
|
|
@@ -488,6 +563,10 @@ const GATE_SLOT_BY_PROVIDER_FAMILY_TIER = {
|
|
|
488
563
|
reader: { realtime: 'opraV2Realtime', delayed: 'opraV2Delayed' },
|
|
489
564
|
livefeed: { realtime: 'opraLiveFeedRealtime', delayed: 'opraLiveFeedDelayed' },
|
|
490
565
|
},
|
|
566
|
+
stocks: {
|
|
567
|
+
reader: { realtime: 'stocksV2Realtime', delayed: 'stocksV2Delayed' },
|
|
568
|
+
livefeed: { realtime: 'stocksLiveFeedRealtime', delayed: 'stocksLiveFeedDelayed' },
|
|
569
|
+
},
|
|
491
570
|
};
|
|
492
571
|
export function gateSlotForTier(provider, family, tier) {
|
|
493
572
|
return GATE_SLOT_BY_PROVIDER_FAMILY_TIER[provider][family][tier];
|
|
@@ -497,7 +576,7 @@ export function gateProviderOf(wsType) {
|
|
|
497
576
|
if (!(wsType in SOCKET_SLOTS))
|
|
498
577
|
return null;
|
|
499
578
|
const provider = SOCKET_SLOTS[wsType].provider;
|
|
500
|
-
return provider
|
|
579
|
+
return isGateProvider(provider) ? provider : null;
|
|
501
580
|
}
|
|
502
581
|
export function isGateReaderSlot(wsType) {
|
|
503
582
|
return gateProviderOf(wsType) !== null && SOCKET_SLOTS[wsType].family === 'reader';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangecharts/wrun-chart-host",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "The wrun chart-host layer shared by the kiyotaka web app and the mobile app: the wrun result reader and painter model, cut from the web app (its reference implementation).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@orangecharts/indicator-kit": "0.
|
|
27
|
-
"@orangecharts/orange-v2-pb-common": "12.
|
|
26
|
+
"@orangecharts/indicator-kit": "0.106.5",
|
|
27
|
+
"@orangecharts/orange-v2-pb-common": "12.79.0",
|
|
28
28
|
"dayjs": "1.11.23",
|
|
29
29
|
"lodash-es": "4.18.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@orangecharts/indicator-kit": "0.
|
|
33
|
-
"@orangecharts/orange-v2-pb-common": "12.
|
|
32
|
+
"@orangecharts/indicator-kit": "0.106.5",
|
|
33
|
+
"@orangecharts/orange-v2-pb-common": "12.79.0",
|
|
34
34
|
"@types/lodash-es": "4.17.12",
|
|
35
35
|
"dayjs": "1.11.23",
|
|
36
36
|
"lodash-es": "4.18.1",
|