@orangecharts/wrun-chart-host 0.11.0 → 0.14.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 +3 -4
- package/dist/constants/feature-flags.constants.js +34 -52
- package/dist/constants/feature-limits.constants.d.ts +1 -1
- package/dist/constants/feature-limits.constants.js +5 -4
- package/dist/constants/interval.constants.d.ts +7 -0
- package/dist/constants/interval.constants.js +7 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
- package/dist/constants/stocks-compliance.constants.d.ts +15 -0
- package/dist/constants/stocks-compliance.constants.js +15 -0
- package/dist/host-env.d.ts +55 -3
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +36 -3
- package/dist/index.d.ts +18 -0
- package/dist/index.js +19 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +78 -15
- package/dist/indicators/controls/tpo-session.util.js +320 -242
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
- package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
- package/dist/interfaces/cme-realtime.interface.js +2 -1
- package/dist/interfaces/feed.interface.d.ts +15 -1
- package/dist/interfaces/replay.interface.d.ts +5 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
- package/dist/interfaces/stocks-realtime.interface.js +5 -4
- package/dist/interfaces/wrun-runtime.interface.d.ts +97 -19
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
- package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
- package/dist/market-data/billing.interface.d.ts +9 -1
- package/dist/market-data/venue.d.ts +1 -1
- package/dist/market-data/venues/index.d.ts +4 -4
- package/dist/market-data/venues/stocks.contract.copy.json +4 -4
- package/dist/market-data/venues/stocks.d.ts +4 -4
- package/dist/market-data/venues/stocks.js +15 -13
- package/dist/settings-templates/frvp-fields.d.ts +12 -1
- package/dist/settings-templates/frvp-fields.js +15 -4
- package/dist/settings-templates/index.js +12 -5
- package/dist/settings-templates/indicator-fields.js +28 -2
- package/dist/settings-templates/tool-rules.d.ts +17 -8
- package/dist/settings-templates/tool-rules.js +15 -8
- package/dist/settings-templates/tool-tables.generated.js +4 -2
- package/dist/utility/auth/server-clock.util.d.ts +3 -1
- package/dist/utility/auth/server-clock.util.js +3 -1
- package/dist/utility/chart/book-live-bucket.util.js +2 -2
- package/dist/utility/chart/cache-alignment.util.d.ts +15 -7
- package/dist/utility/chart/cache-alignment.util.js +14 -7
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
- package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
- package/dist/utility/chart/cme-session-bucket.util.js +25 -332
- package/dist/utility/chart/continuous-contracts.util.js +6 -5
- package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
- package/dist/utility/chart/display-offset.leaf.js +41 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
- package/dist/utility/chart/effective-chart-session.util.js +13 -5
- package/dist/utility/chart/feed-interval.util.d.ts +6 -20
- package/dist/utility/chart/feed-interval.util.js +13 -22
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
- package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
- package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
- package/dist/utility/chart/host-bar-placement.util.js +8 -2
- package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
- package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
- package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
- package/dist/utility/chart/indicator-run-interval.util.js +21 -12
- package/dist/utility/chart/interval-registry.util.d.ts +1 -1
- package/dist/utility/chart/interval-registry.util.js +1 -1
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
- package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
- package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
- package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
- package/dist/utility/chart/live-bucket.util.d.ts +39 -17
- package/dist/utility/chart/live-bucket.util.js +103 -57
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
- package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
- package/dist/utility/chart/market-session-schedule.util.js +39 -1
- package/dist/utility/chart/market-session.util.d.ts +136 -0
- package/dist/utility/chart/market-session.util.js +341 -0
- package/dist/utility/chart/market-sessions.util.d.ts +83 -0
- package/dist/utility/chart/market-sessions.util.js +220 -0
- package/dist/utility/chart/om-panel.util.d.ts +5 -3
- package/dist/utility/chart/om-panel.util.js +42 -7
- package/dist/utility/chart/om-target.util.d.ts +14 -1
- package/dist/utility/chart/om-target.util.js +22 -5
- package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
- package/dist/utility/chart/opra-read-access.leaf.js +22 -0
- package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
- package/dist/utility/chart/profile-row-height.util.js +74 -37
- package/dist/utility/chart/rth-session.util.d.ts +55 -20
- package/dist/utility/chart/rth-session.util.js +94 -46
- package/dist/utility/chart/session-interval.util.d.ts +2 -1
- package/dist/utility/chart/session-interval.util.js +1 -3
- package/dist/utility/chart/session-lattice.util.d.ts +150 -0
- package/dist/utility/chart/session-lattice.util.js +488 -0
- package/dist/utility/chart/trading-day.util.d.ts +40 -2
- package/dist/utility/chart/trading-day.util.js +84 -7
- package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
- package/dist/utility/chart/us-equities-session.util.js +44 -15
- package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
- package/dist/utility/chart/window-geometry.leaf.js +57 -8
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
- package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
- package/dist/utility/chart/wrun-run-result.util.d.ts +29 -12
- package/dist/utility/chart/wrun-run-result.util.js +89 -25
- package/dist/utility/common/time.util.js +5 -4
- package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
- package/dist/utility/market-events/earnings-scope.util.js +17 -9
- package/dist/utility/market-events/market-events.util.d.ts +14 -7
- package/dist/utility/market-events/market-events.util.js +30 -17
- package/dist/utility/number-format.util.d.ts +14 -21
- package/dist/utility/number-format.util.js +38 -24
- package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
- package/dist/utility/options/option-venue-disclosure.util.js +71 -11
- package/dist/utility/options/option-venue.util.d.ts +1 -1
- package/dist/utility/options/option-venue.util.js +1 -1
- package/dist/utility/pool-symbol.leaf.d.ts +7 -0
- package/dist/utility/pool-symbol.leaf.js +50 -5
- package/dist/utility/stocks/stock-display.util.d.ts +15 -0
- package/dist/utility/stocks/stock-display.util.js +37 -0
- package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
- package/dist/utility/v2/gate-plane.util.d.ts +6 -0
- package/dist/utility/v2/gate-plane.util.js +11 -1
- package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
- package/dist/utility/v2/gate-session-latch.util.js +3 -3
- package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
- package/dist/utility/v2/governed-tier.leaf.js +17 -16
- package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
- package/dist/utility/v2/stocks-governed.util.js +14 -0
- package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
- package/dist/utility/v2/v2-enums.leaf.js +458 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
- package/dist/utility/wrun/derived-roots.leaf.js +27 -1
- package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
- package/dist/utility/wrun/derived-roots.util.js +97 -56
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
- package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
- package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
- package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
- package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
- package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
- package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
- package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
- package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
- package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
- package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +41 -22
- package/dist/utility/wrun/wrun-batched-marks.util.js +255 -59
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
- package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
- package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-canvases.util.js +7 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
- package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
- package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
- package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
- package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
- package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
- package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
- package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
- package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
- package/dist/utility/wrun/wrun-host.service.js +137 -27
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
- package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
- package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
- package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
- package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
- package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
- package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
- package/dist/utility/wrun/wrun-live-tick.util.js +648 -97
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
- package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
- package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-option-views.util.js +5 -2
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +75 -11
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +176 -43
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
- package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +239 -24
- package/dist/utility/wrun/wrun-overlay-run.util.js +2204 -405
- package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-panel-mount.util.js +20 -14
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
- package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
- package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
- package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
- package/dist/utility/wrun/wrun-refusal.util.js +103 -16
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
- package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
- package/dist/utility/wrun/wrun-run-health.util.d.ts +89 -2
- package/dist/utility/wrun/wrun-run-health.util.js +204 -1
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
- package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
- package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-script-inputs.util.js +51 -13
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
- package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
- package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
- package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
- package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
- package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
- package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
- package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
- package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
- package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
- package/dist/utility/wrun/wrun-visibility-table.js +9 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +44 -32
- package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
- package/dist/utils/replay/replay-buffer-math.js +60 -30
- package/dist/workers/constants/socket-slots.d.ts +11 -7
- package/dist/workers/constants/socket-slots.js +6 -5
- package/package.json +11 -11
|
@@ -16,6 +16,12 @@ export declare function mergeKScriptWorkerSourceRows(existingRows: unknown, next
|
|
|
16
16
|
export declare function kScriptWorkerRowsBackfillExisting(existingRows: unknown, incomingRows: unknown): boolean;
|
|
17
17
|
export declare function packSourceRows(rows: unknown): KScriptWorkerSourceRowsPayload;
|
|
18
18
|
export declare function unpackOhlcvRows(payload: unknown): number[][];
|
|
19
|
+
/**
|
|
20
|
+
* The rows of a packed transfer as zero-copy views of its buffer, one per row, each cut at the row's own length by
|
|
21
|
+
* `unpackOhlcvRows`'s rule (`rowLengths`, else the block's `cols`), so the zero padding past a shorter row never shows
|
|
22
|
+
* and no row is copied to a plain array. Every view keeps the transferred buffer alive.
|
|
23
|
+
*/
|
|
24
|
+
export declare function packedOhlcvRowViews(payload: KScriptWorkerPackedOhlcvRows): Float64Array[];
|
|
19
25
|
/**
|
|
20
26
|
* Volume-less OHLC bars as the six-column rows the engine's `ohlcv` source
|
|
21
27
|
* declares (PROPERTY_MAPPINGS.ohlcv maps volume to column 5). Forex and
|
|
@@ -115,6 +115,22 @@ export function unpackOhlcvRows(payload) {
|
|
|
115
115
|
}
|
|
116
116
|
return rows;
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* The rows of a packed transfer as zero-copy views of its buffer, one per row, each cut at the row's own length by
|
|
120
|
+
* `unpackOhlcvRows`'s rule (`rowLengths`, else the block's `cols`), so the zero padding past a shorter row never shows
|
|
121
|
+
* and no row is copied to a plain array. Every view keeps the transferred buffer alive.
|
|
122
|
+
*/
|
|
123
|
+
export function packedOhlcvRowViews(payload) {
|
|
124
|
+
const values = new Float64Array(payload.buffer);
|
|
125
|
+
const rowLengths = payload.rowLengths ? new Uint32Array(payload.rowLengths) : undefined;
|
|
126
|
+
const rows = [];
|
|
127
|
+
for (let rowIndex = 0; rowIndex < payload.rows; rowIndex += 1) {
|
|
128
|
+
const length = rowLengths?.[rowIndex] ?? payload.cols;
|
|
129
|
+
const offset = rowIndex * payload.cols;
|
|
130
|
+
rows.push(values.subarray(offset, offset + length));
|
|
131
|
+
}
|
|
132
|
+
return rows;
|
|
133
|
+
}
|
|
118
134
|
const OHLC_ROW_LENGTH = 5;
|
|
119
135
|
/**
|
|
120
136
|
* Volume-less OHLC bars as the six-column rows the engine's `ohlcv` source
|
|
@@ -71,6 +71,8 @@ export type CmeCheckoutResponseDto = {
|
|
|
71
71
|
};
|
|
72
72
|
/** Subscription as served by GET /cme/subscription (already camelCase on the wire). */
|
|
73
73
|
export interface CmeSubscriptionDto {
|
|
74
|
+
/** `past_due` while Stripe retries a failed renewal; absent on a server from before it. */
|
|
75
|
+
status?: 'active' | 'past_due';
|
|
74
76
|
/** Held-now access level ('depth' while a downgrade is pending). */
|
|
75
77
|
level: CmeDepthDto;
|
|
76
78
|
pendingDowngrade: 'l1' | null;
|
|
@@ -80,6 +82,8 @@ export interface CmeSubscriptionDto {
|
|
|
80
82
|
pendingCancellation: boolean;
|
|
81
83
|
/** Next-cycle price (already L1-priced during a pending downgrade). */
|
|
82
84
|
priceUsd: number;
|
|
85
|
+
/** Stripe's hosted page for the owed renewal invoice while `past_due`; absent or null when none is owed or on a server from before it. */
|
|
86
|
+
invoiceUrl?: string | null;
|
|
83
87
|
}
|
|
84
88
|
/** GET /cme/subscription -> 200 body. */
|
|
85
89
|
export interface GetCmeSubscriptionResponseDto {
|
|
@@ -111,6 +115,10 @@ export interface CmeSubscription {
|
|
|
111
115
|
renewsAt: string;
|
|
112
116
|
pendingCancellation: boolean;
|
|
113
117
|
priceUsd: number;
|
|
118
|
+
/** The renewal payment failed: a cancel ends the subscription now (orange's `cancelPlanOf`). */
|
|
119
|
+
pastDue: boolean;
|
|
120
|
+
/** Where the owed renewal invoice is paid (Stripe's hosted invoice), or null: nothing owed, or a server from before the field. */
|
|
121
|
+
invoiceUrl: string | null;
|
|
114
122
|
}
|
|
115
123
|
export interface CmeAttestationSubmission {
|
|
116
124
|
classification: CmeClassification;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { serverNowMs } from '../utility/auth/server-clock.util.js';
|
|
1
2
|
/**
|
|
2
3
|
* The single source of truth for CME-family exchange codes and their role.
|
|
3
4
|
* Every governed/purchasable/filter list derives from this table, so GLOBEX's
|
|
@@ -22,7 +23,7 @@ export const CME_GOVERNED_EXCHANGES = CME_EXCHANGE_CATALOG.map((e) => e.code);
|
|
|
22
23
|
*/
|
|
23
24
|
export const CME_BUNDLE_EXCHANGES = CME_EXCHANGE_CATALOG.filter((e) => e.role === 'purchasable').map((e) => e.code);
|
|
24
25
|
/** Attestation validity is derived at read time from expiresAt, never cached. */
|
|
25
|
-
export function isCmeAttestationValid(attestation, now =
|
|
26
|
+
export function isCmeAttestationValid(attestation, now = serverNowMs()) {
|
|
26
27
|
if (!attestation)
|
|
27
28
|
return false;
|
|
28
29
|
const expires = Date.parse(attestation.expiresAt);
|
|
@@ -14,6 +14,16 @@ export interface FeedValueKey {
|
|
|
14
14
|
/** The column's combine rule; the relay resolves the default by name (P3 C7). */
|
|
15
15
|
combine?: FeedCombineRule;
|
|
16
16
|
}
|
|
17
|
+
/** The publisher's creator tier (C15 v2); the relay's old `request` word reads as `pro`. */
|
|
18
|
+
export type FeedTier = 'free' | 'plus' | 'pro' | 'business';
|
|
19
|
+
/** A listed feed's sale terms on its head (C13 rule 5): the registry's price words, the billing model, the buy page. */
|
|
20
|
+
export interface FeedListing {
|
|
21
|
+
price_label: string;
|
|
22
|
+
model: string;
|
|
23
|
+
buy_url: string;
|
|
24
|
+
}
|
|
25
|
+
/** What the relay lets the calling credential read of a listed feed (C13 rule 5). */
|
|
26
|
+
export type FeedAccess = 'granted' | 'payment_required' | 'pending';
|
|
17
27
|
/** `GET /api/v2/feeds/{scope}/{name}/head`: the feed's newest row and its state at read time. */
|
|
18
28
|
export interface FeedHead {
|
|
19
29
|
address: string;
|
|
@@ -30,7 +40,7 @@ export interface FeedHead {
|
|
|
30
40
|
rows: number;
|
|
31
41
|
state: 'live' | 'lagging' | 'stale' | 'offline';
|
|
32
42
|
/** P3 C7 head facts (optional until every relay serves them). */
|
|
33
|
-
tier?:
|
|
43
|
+
tier?: FeedTier;
|
|
34
44
|
/** Readings the feed keeps before the oldest drop (the tier's cap). */
|
|
35
45
|
cap?: number;
|
|
36
46
|
/** The storage grain in seconds: one reading kept per slot of this length. */
|
|
@@ -41,6 +51,10 @@ export interface FeedHead {
|
|
|
41
51
|
observed_cadence_s?: number | null;
|
|
42
52
|
/** True when the feed is published at its cadence only: no coarser bars. */
|
|
43
53
|
exact_interval?: boolean;
|
|
54
|
+
/** A listed feed's sale terms, null while it is not for sale; absent on every other feed. */
|
|
55
|
+
listing?: FeedListing | null;
|
|
56
|
+
/** A listed feed only: whether this caller may read its rows, has to buy them, or waits for the sale. */
|
|
57
|
+
access?: FeedAccess;
|
|
44
58
|
}
|
|
45
59
|
/** One row on the wire (C1): `[ts_seconds, v1..vN]`, or `[ts_seconds, state]` for a state feed. */
|
|
46
60
|
export type FeedWireRow = [number, ...(number | string | null)[]];
|
|
@@ -117,6 +117,11 @@ export interface ReplayBuffer {
|
|
|
117
117
|
forwardScannedAtMs?: number;
|
|
118
118
|
fullRows: number[][];
|
|
119
119
|
heatmapColumns: Float64Array[];
|
|
120
|
+
/**
|
|
121
|
+
* The heatmap overlay whose surface `heatmapColumns` holds (one heatmap per chart). A load of another overlay, or a
|
|
122
|
+
* settings save of this one, starts a new surface: the pool is dropped before its legs plan.
|
|
123
|
+
*/
|
|
124
|
+
heatmapPoolOwnerId?: string;
|
|
120
125
|
/**
|
|
121
126
|
* Last pan-back gap-fill outcome, keyed to stable evidence (column count and
|
|
122
127
|
* deepest captured column) rather than window bounds: the window's floor
|
|
@@ -48,9 +48,10 @@ export declare const STOCKS_DELAY_MINUTES = 15;
|
|
|
48
48
|
* The ONE compliance switch for user scripting on the tape: the tapes a user-authored indicator may read, in the
|
|
49
49
|
* browser and on the cloud lane (Kyle 2026-10-29, like OPRA since its launch), at the viewer's tier. The kScript venue
|
|
50
50
|
* policy (kscript-venue-policy.util) reads it for every wall: a tape listed here is open to user runs, a tape left out
|
|
51
|
-
* stays first-party only, as CME is.
|
|
52
|
-
*
|
|
53
|
-
* else gates it. A listing venue's plain code (`NASDAQ`) is
|
|
51
|
+
* stays first-party only, as CME is. Every tape is open (Kyle 2026-11-06: every wrun Indicator works on US equities,
|
|
52
|
+
* Nasdaq-listed names on Tape C included), so the list is the governed list itself and a tape the gate adds opens with
|
|
53
|
+
* it. To close a tape again, list the open ones here; nothing else gates it. A listing venue's plain code (`NASDAQ`) is
|
|
54
|
+
* the free lane and never reads this.
|
|
54
55
|
*/
|
|
55
56
|
export declare const STOCKS_TAPE_SCRIPTING_VENUES: readonly StocksGovernedExchange[];
|
|
56
57
|
/** The SIP tape letter each governed venue carries, for copy that names the tape (reports and the badge card). */
|
|
@@ -19,11 +19,12 @@ export const STOCKS_DELAY_MINUTES = 15;
|
|
|
19
19
|
* The ONE compliance switch for user scripting on the tape: the tapes a user-authored indicator may read, in the
|
|
20
20
|
* browser and on the cloud lane (Kyle 2026-10-29, like OPRA since its launch), at the viewer's tier. The kScript venue
|
|
21
21
|
* policy (kscript-venue-policy.util) reads it for every wall: a tape listed here is open to user runs, a tape left out
|
|
22
|
-
* stays first-party only, as CME is.
|
|
23
|
-
*
|
|
24
|
-
* else gates it. A listing venue's plain code (`NASDAQ`) is
|
|
22
|
+
* stays first-party only, as CME is. Every tape is open (Kyle 2026-11-06: every wrun Indicator works on US equities,
|
|
23
|
+
* Nasdaq-listed names on Tape C included), so the list is the governed list itself and a tape the gate adds opens with
|
|
24
|
+
* it. To close a tape again, list the open ones here; nothing else gates it. A listing venue's plain code (`NASDAQ`) is
|
|
25
|
+
* the free lane and never reads this.
|
|
25
26
|
*/
|
|
26
|
-
export const STOCKS_TAPE_SCRIPTING_VENUES =
|
|
27
|
+
export const STOCKS_TAPE_SCRIPTING_VENUES = STOCKS_GOVERNED_EXCHANGES;
|
|
27
28
|
/** The SIP tape letter each governed venue carries, for copy that names the tape (reports and the badge card). */
|
|
28
29
|
export const STOCKS_TAPE_OF_EXCHANGE = {
|
|
29
30
|
NYSE_TAPE: 'A',
|
|
@@ -447,9 +447,14 @@ export interface WrunMetadataParam {
|
|
|
447
447
|
* the setting out (its value still reaches init()) and the chart mounts
|
|
448
448
|
* nothing for the output (no plot, legend entry, Style row or stats row
|
|
449
449
|
* drawn from it); the module still computes every output
|
|
450
|
-
* (wrunRowVisibleHere).
|
|
450
|
+
* (wrunRowVisibleHere). A setting's word (never an output's) and an input's
|
|
451
|
+
* `needed_by` may also name one select param of the same sheet with the
|
|
452
|
+
* option values it shows on (contract C-COINS item 1, `{ size_unit: [1],
|
|
453
|
+
* min_unit: [1] }`): the keys combine with AND (wrunVisibleBySettingKeys
|
|
454
|
+
* reads them). */
|
|
451
455
|
export interface WrunVisibleBy {
|
|
452
|
-
size_unit
|
|
456
|
+
size_unit?: number[];
|
|
457
|
+
readonly [setting: string]: readonly number[] | undefined;
|
|
453
458
|
}
|
|
454
459
|
/** One entry of a sheet's `layout` (frozen sheet contract, plan 1.2):
|
|
455
460
|
* recorded in source order together with every param declaration. */
|
|
@@ -689,6 +694,12 @@ export interface WrunInputSource {
|
|
|
689
694
|
missing?: 'carry' | 'nan' | 'zero' | 'empty';
|
|
690
695
|
block_size?: number;
|
|
691
696
|
max_depth?: number;
|
|
697
|
+
/** `book` only (kit 0.109.0, wrun-book-bands.leaf `isWrunBandedBookSource`): the input reads the bid and ask size
|
|
698
|
+
* sums per band instead of the levels, its block `[bid_0, ask_0, bid_1, ask_1, ...]` (two values a tuple, max_cells
|
|
699
|
+
* the band count). Percents of the touch, 1 to 8 of them, each above 0 and at most 10, strictly ascending
|
|
700
|
+
* (`wrun_book_bands_invalid` otherwise). No part of the ask: a raw and a banded book input read one lane and one
|
|
701
|
+
* fetch. */
|
|
702
|
+
bands?: number[];
|
|
692
703
|
/** `tape` only (the C1 facets, `wrun-tape-source.util.ts`): the smallest
|
|
693
704
|
* print size served in the venue's raw stored unit, a number literal or
|
|
694
705
|
* the name of a declared numeric param (resolved from the run's current
|
|
@@ -702,6 +713,12 @@ export interface WrunInputSource {
|
|
|
702
713
|
* `minQuoteAmount`, and every cell's `size` is then the print's dollar
|
|
703
714
|
* value. */
|
|
704
715
|
min_value?: number | string;
|
|
716
|
+
/** `tape` only (contract C-COINS item 2): the smallest print served by its
|
|
717
|
+
* size in coins, spelled like `min_size`. The host asks the dollar table
|
|
718
|
+
* at the coins times the lowest price the request's window traded at
|
|
719
|
+
* times 0.9 (wrunCoinTapeFloor), and every cell's `size` is the print's
|
|
720
|
+
* dollar value, as on a `min_value` tape. */
|
|
721
|
+
min_coins?: number | string;
|
|
705
722
|
history?: string;
|
|
706
723
|
/** `volume_profile` only: the lane the input reads, the kScript
|
|
707
724
|
* volume_profile source's `ticksPerBar` (price ticks per bucket, an
|
|
@@ -841,9 +858,7 @@ export interface WrunInputSource {
|
|
|
841
858
|
/** The size units (`market.size_unit()` codes: 0 units, 1 coins, 2 shares, 3 contracts) of the
|
|
842
859
|
* markets where the run reads this input (kit 0.72.0), the shape of an output's `visible_by`;
|
|
843
860
|
* absent = every market. On any other market the run's sheet marks it `undemanded`. */
|
|
844
|
-
needed_by?:
|
|
845
|
-
size_unit: number[];
|
|
846
|
-
};
|
|
861
|
+
needed_by?: WrunVisibleBy;
|
|
847
862
|
/** A secondary `trades` input only (kit 0.77.0, sheet-only), beside `exchange` and never beside
|
|
848
863
|
* `symbol`: "coin", the venue's primary market for the chart's coin. The run resolves every
|
|
849
864
|
* venue a coin leg names before anything reads the sheet (wrunSheetWithCoinLegs, the native
|
|
@@ -998,6 +1013,11 @@ export interface WrunMetadataOutput {
|
|
|
998
1013
|
format?: string;
|
|
999
1014
|
/** false: no legend entry (drawn all the same). */
|
|
1000
1015
|
legend?: boolean;
|
|
1016
|
+
/** false: the output answers no hover card, neither over its plot (the series hover) nor over its legend
|
|
1017
|
+
* value; drawn, listed (unless `legend: false`) and printed all the same. Default true. On a candle
|
|
1018
|
+
* group any member's false silences the group's one card. The adapter also stamps it on every mount
|
|
1019
|
+
* that paints no ink (wrun-run-result.util wrunMountPresentationFields). */
|
|
1020
|
+
hover_card?: boolean;
|
|
1001
1021
|
/** false: mounted hidden (the Style page's Visible row starts off). */
|
|
1002
1022
|
visible?: boolean;
|
|
1003
1023
|
/** The size units of the markets where the output mounts at all (kit
|
|
@@ -1159,6 +1179,10 @@ export interface WrunLevels {
|
|
|
1159
1179
|
font_weight?: WrunFontWeight;
|
|
1160
1180
|
font_family?: WrunFontFamily;
|
|
1161
1181
|
label_place?: 'outside' | 'inside' | 'axis';
|
|
1182
|
+
/** A row labelled by the frame's `labels_text` shows its label even when the row is shorter than the font. */
|
|
1183
|
+
label_overflow?: boolean;
|
|
1184
|
+
/** Of the labels_text rows in view, only this many draw, the largest by row value first (0 or absent: all). */
|
|
1185
|
+
label_limit?: number;
|
|
1162
1186
|
/** DL-hover: a hover card per row (a switch; the frame's `tooltips` fill it). */
|
|
1163
1187
|
hover?: boolean;
|
|
1164
1188
|
/** DL-poc: the POC row's ink, width (1..10 px), dash, reach and tag. */
|
|
@@ -2466,13 +2490,35 @@ export interface WrunHistoryWarmupWindow {
|
|
|
2466
2490
|
/** The exact warm-up stamp (`history_warmup`, frozen kit contract D3): W = the sum over `windows` of
|
|
2467
2491
|
* max(ceil(sum of terms + plus), min), each window evaluated with the arithmetic the chart applies to the
|
|
2468
2492
|
* `warmup` declaration, plus the top-level `plus` (the dependency edges and the fixed horizons). */
|
|
2469
|
-
export interface
|
|
2493
|
+
export interface WrunHistoryWarmupExact {
|
|
2470
2494
|
kind: 'exact';
|
|
2471
2495
|
windows: WrunHistoryWarmupWindow[];
|
|
2472
2496
|
plus?: number;
|
|
2473
2497
|
}
|
|
2474
|
-
/** The
|
|
2475
|
-
|
|
2498
|
+
/** The gate that certified a converging warm-up stamp (STAMPS round A): the corpus it ran (`om-history-matrix-v1`,
|
|
2499
|
+
* the one round A knows), W at the sheet's defaults (`bars`, at least 1), the valid split points it compared
|
|
2500
|
+
* (`splits`, at least 24, the gate's own minimum) and the settings it tested (`defaults`). */
|
|
2501
|
+
export interface WrunHistoryWarmupGate {
|
|
2502
|
+
corpus: 'om-history-matrix-v1';
|
|
2503
|
+
bars: number;
|
|
2504
|
+
splits: number;
|
|
2505
|
+
settings: 'defaults';
|
|
2506
|
+
}
|
|
2507
|
+
/** The converging warm-up stamp (`history_warmup` of kind `converges`, STAMPS round A): the exact stamp's windows and
|
|
2508
|
+
* `plus` (W counted in ACCEPTED inputs, the recursions skip a non-finite one), the relative `tolerance` a run
|
|
2509
|
+
* started W bars early agrees within (1e-6, the only one round A admits) and the gate that certified it. An
|
|
2510
|
+
* empirical bound the chart re-checks at every splice (the overlap proof), never an exact one. */
|
|
2511
|
+
export interface WrunHistoryWarmupConverges {
|
|
2512
|
+
kind: 'converges';
|
|
2513
|
+
windows: WrunHistoryWarmupWindow[];
|
|
2514
|
+
plus?: number;
|
|
2515
|
+
tolerance: number;
|
|
2516
|
+
gate: WrunHistoryWarmupGate;
|
|
2517
|
+
}
|
|
2518
|
+
/** The warm-up stamp of either kind (`history_warmup`): both carry the windows and `plus` W is read from. */
|
|
2519
|
+
export type WrunHistoryWarmup = WrunHistoryWarmupExact | WrunHistoryWarmupConverges;
|
|
2520
|
+
/** The four batched kinds, each a sheet key and the engine's plot type (wrun-batched-kinds.leaf lists them). */
|
|
2521
|
+
export type WrunBatchedMarksKind = 'marks' | 'spans' | 'rays' | 'flags';
|
|
2476
2522
|
/** A colour of a batched section: a colour word (`#rrggbb`, `rgba(...)`,
|
|
2477
2523
|
* `theme.<token>`) or a packed RGBA number (the colour param's own form,
|
|
2478
2524
|
* `((r * 256 + g) * 256 + b) * 1024 + round(alpha * 1000)`, or a packed theme
|
|
@@ -2488,7 +2534,8 @@ interface WrunBatchedSectionCommon {
|
|
|
2488
2534
|
first_output: number;
|
|
2489
2535
|
/** A hover template, at most 200 chars (null or absent = no readout): `{{side}} {{qty}}
|
|
2490
2536
|
* {{price}} {{fills}}` on marks, `{{top}} {{bottom}} {{length}} {{word}}` on spans, `{{y1}}
|
|
2491
|
-
* {{y2}} {{length}} {{word}}` on rays (the kit's WRUN_BATCHED_TOOLTIP_TOKENS), `{{
|
|
2537
|
+
* {{y2}} {{length}} {{word}}` on rays (the kit's WRUN_BATCHED_TOOLTIP_TOKENS), `{{qty}}
|
|
2538
|
+
* {{price}} {{count}} {{word}}` on flags (`{{word}}` the record's chip text), `{{start}}` and
|
|
2492
2539
|
* `{{end}}` in place of `{{length}}` on a timed (stride-5) section (the kit's
|
|
2493
2540
|
* WRUN_BATCHED_TIMED_TOOLTIP_TOKENS, printed as chart times); `{{<field>:<format>}}` picks a
|
|
2494
2541
|
* number format, a word of WRUN_BATCHED_NUMBER_FORMATS (wrun-batched-readout.util:
|
|
@@ -2498,22 +2545,27 @@ interface WrunBatchedSectionCommon {
|
|
|
2498
2545
|
label?: string;
|
|
2499
2546
|
panel?: 'overlay';
|
|
2500
2547
|
}
|
|
2548
|
+
/** The size law over a record's quantity (marks, and the marks a flags section points at): `unit` is the Min
|
|
2549
|
+
* size quantity (> 0), `scale` the Bubble size 1..10; on sqrt k = 0.5 + 0.1 * scale, d = round(clamp(11k *
|
|
2550
|
+
* sqrt(qty / unit), 11k, min(64, 50k))), then 6..64 css px. `log` grows the diameter with the quantity's
|
|
2551
|
+
* logarithm, and `min_px` / `max_px` bound the diameter in css px (the dark pool prints: $1M at 5 px, $100M at
|
|
2552
|
+
* 12 px). The engine draws `log` and the bounds from the release that draws `flags`. */
|
|
2553
|
+
export interface WrunMarkSize {
|
|
2554
|
+
law?: 'sqrt' | 'linear' | 'log';
|
|
2555
|
+
unit?: number;
|
|
2556
|
+
scale?: number;
|
|
2557
|
+
min_px?: number;
|
|
2558
|
+
max_px?: number;
|
|
2559
|
+
}
|
|
2501
2560
|
/** One `marks[]` entry (`plot.marks`): per bar, `slots` records of `[price, qty, meta]` with
|
|
2502
2561
|
* `meta = side + 4 * fills + 262144 * offset_ms` (side 0..3: 0 sell, 1 buy; fills 0..65535;
|
|
2503
2562
|
* offset_ms 0..2^30); a NaN price is an empty slot. Look fields take the param-native units
|
|
2504
2563
|
* (round-2 fold 1); the chart derives the pixels exactly as Big Trades 0.3.2 did. */
|
|
2505
2564
|
export interface WrunMarksSection extends WrunBatchedSectionCommon {
|
|
2506
2565
|
stride: 3;
|
|
2507
|
-
/** 0 Bubble, 1 Soft dot, 2 Ring, 3 Square (default 0). */
|
|
2566
|
+
/** 0 Bubble, 1 Soft dot, 2 Ring, 3 Square, 4 Diamond (hollow, a 1 px edge; the word `diamond`) (default 0). */
|
|
2508
2567
|
look?: number;
|
|
2509
|
-
|
|
2510
|
-
* the Bubble size 1..10; k = 0.5 + 0.1 * scale, d = round(clamp(11k * sqrt(qty / unit), 11k,
|
|
2511
|
-
* min(64, 50k))), then 6..64 css px. */
|
|
2512
|
-
size?: {
|
|
2513
|
-
law?: 'sqrt' | 'linear';
|
|
2514
|
-
unit?: number;
|
|
2515
|
-
scale?: number;
|
|
2516
|
-
};
|
|
2568
|
+
size?: WrunMarkSize;
|
|
2517
2569
|
/** 0 Candle center, 1 Trade time (the record's `offset_ms` inside the bar). */
|
|
2518
2570
|
x?: number;
|
|
2519
2571
|
/** Indexed by the record's side: [sell, buy, ...], 2..4 colours (default the theme's down and up). */
|
|
@@ -2569,7 +2621,32 @@ export interface WrunRaysSection extends WrunBatchedSectionCommon {
|
|
|
2569
2621
|
opacity?: number;
|
|
2570
2622
|
words?: string[];
|
|
2571
2623
|
}
|
|
2572
|
-
|
|
2624
|
+
/** The icon a flag's chip leads with, one per word (`icons`). */
|
|
2625
|
+
export type WrunFlagIcon = 'none' | 'dot' | 'diamond' | 'sprout' | 'flame';
|
|
2626
|
+
/** One `flags[]` entry (`plot.flags`, the dark pool round): per bar, `slots` records of `[price, qty, meta]` read and
|
|
2627
|
+
* copied as on marks, with `meta = word + 4 * count + 262144 * offset_ms` (word 0..3 picks the chip's template in
|
|
2628
|
+
* `words`, count 0..65535, offset_ms 0..2^30); a NaN price is an empty slot. The engine places the chips on every
|
|
2629
|
+
* paint (the largest dollars first, a chip above the highest candle under it, one that would touch a placed chip or
|
|
2630
|
+
* has no room dropped, at most `max_in_view`, a 1 px hairline down to the record) and never stretches the price
|
|
2631
|
+
* scale for them. */
|
|
2632
|
+
export interface WrunFlagsSection extends WrunBatchedSectionCommon {
|
|
2633
|
+
stride: 3;
|
|
2634
|
+
/** 1..4 chip templates of at most 32 chars, picked by the record's word: `{{qty}}` (`:compact`, `:usd`, `:int`),
|
|
2635
|
+
* `{{price}}` and `{{count}}`. */
|
|
2636
|
+
words?: string[];
|
|
2637
|
+
/** The icon each word's chip leads with, a word of `WrunFlagIcon` or its index (default none). */
|
|
2638
|
+
icons?: Array<WrunFlagIcon | number>;
|
|
2639
|
+
/** The chips in view at most, 1..16 (default 5). */
|
|
2640
|
+
max_in_view?: number;
|
|
2641
|
+
/** 0 Candle center, 1 Trade time (default 1). */
|
|
2642
|
+
x?: number;
|
|
2643
|
+
/** The size law of the marks the chips point at (as on marks). */
|
|
2644
|
+
size?: WrunMarkSize;
|
|
2645
|
+
/** Up to 3 colours by part: [chip fill, chip edge (the hairline too), text]; a part left out takes its default
|
|
2646
|
+
* ([theme.bg, theme.muted, theme.text]); more than 3 refuses the run. */
|
|
2647
|
+
colors?: WrunBatchedColor[];
|
|
2648
|
+
}
|
|
2649
|
+
export type WrunBatchedSection = WrunMarksSection | WrunSpansSection | WrunRaysSection | WrunFlagsSection;
|
|
2573
2650
|
export interface WrunIndicatorMetadata {
|
|
2574
2651
|
id: string;
|
|
2575
2652
|
name: string;
|
|
@@ -2653,6 +2730,7 @@ export interface WrunIndicatorMetadata {
|
|
|
2653
2730
|
marks?: WrunMarksSection[];
|
|
2654
2731
|
spans?: WrunSpansSection[];
|
|
2655
2732
|
rays?: WrunRaysSection[];
|
|
2733
|
+
flags?: WrunFlagsSection[];
|
|
2656
2734
|
/** g4 DW21: false keeps the author's colours on a light chart (default true). */
|
|
2657
2735
|
contrast_guard?: boolean;
|
|
2658
2736
|
/** The history-independent stamp (kit 0.66.0, scaffold 66): the compiler proved that every bar's
|
|
@@ -1 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a bar `intervalMs` wide counts volume by the gateway's daily rule (tsdb-gateway trade_tradfi.go over
|
|
3
|
+
* kiyotaka-go pkg/venue: PresetTradingViewDaily keeps the volume of the prints that may not set a high or low,
|
|
4
|
+
* PresetTradingView below a day leaves it out).
|
|
5
|
+
*/
|
|
6
|
+
export declare function barCountsDailyVolume(intervalMs: number): boolean;
|
|
7
|
+
/** A live candle frame's volume under each of the gateway's rules (a stocks tape print's frame carries both). */
|
|
8
|
+
export interface LiveVolumeByRule {
|
|
9
|
+
intraday: number;
|
|
10
|
+
daily: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The candle a source folding at `intervalMs` takes from a live frame: a stocks tape print's frame names its volume
|
|
14
|
+
* under both rules (`liveVolumeByRule`), and each source takes the one its own bars count, whatever the chart's
|
|
15
|
+
* interval (a 1D run on a 1m chart keeps the odd lots' volume the 1m bars leave out). Every other frame passes as is.
|
|
16
|
+
*/
|
|
17
|
+
export declare function liveCandleAtInterval<T extends Record<string, unknown>>(point: unknown, data: T, intervalMs: number): T;
|
|
1
18
|
export declare function mergeLiveOhlcvDataPoint(lastData: any[], data: any, normalizedTime: number): any[];
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
const LIVE_OHLC_EXTREME_RATIO = 0.05;
|
|
2
2
|
const LIVE_OHLC_RANGE_MULTIPLIER = 3;
|
|
3
|
+
/** From a day up the gateway counts a stocks tape print's volume by its daily rule, below a day by its intraday rule. */
|
|
4
|
+
const DAILY_VOLUME_RULE_MS = 86_400_000;
|
|
5
|
+
/**
|
|
6
|
+
* Whether a bar `intervalMs` wide counts volume by the gateway's daily rule (tsdb-gateway trade_tradfi.go over
|
|
7
|
+
* kiyotaka-go pkg/venue: PresetTradingViewDaily keeps the volume of the prints that may not set a high or low,
|
|
8
|
+
* PresetTradingView below a day leaves it out).
|
|
9
|
+
*/
|
|
10
|
+
export function barCountsDailyVolume(intervalMs) {
|
|
11
|
+
return intervalMs >= DAILY_VOLUME_RULE_MS;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The candle a source folding at `intervalMs` takes from a live frame: a stocks tape print's frame names its volume
|
|
15
|
+
* under both rules (`liveVolumeByRule`), and each source takes the one its own bars count, whatever the chart's
|
|
16
|
+
* interval (a 1D run on a 1m chart keeps the odd lots' volume the 1m bars leave out). Every other frame passes as is.
|
|
17
|
+
*/
|
|
18
|
+
export function liveCandleAtInterval(point, data, intervalMs) {
|
|
19
|
+
const byRule = point?.liveVolumeByRule;
|
|
20
|
+
if (!byRule || typeof byRule !== 'object')
|
|
21
|
+
return data;
|
|
22
|
+
const volume = barCountsDailyVolume(intervalMs) ? byRule.daily : byRule.intraday;
|
|
23
|
+
return typeof volume === 'number' && Number.isFinite(volume) ? { ...data, volume } : data;
|
|
24
|
+
}
|
|
3
25
|
function finiteNumber(value) {
|
|
4
26
|
if (typeof value === 'string' && value.trim() === '')
|
|
5
27
|
return undefined;
|
|
@@ -11,25 +11,29 @@ export declare const TRADES_RETENTION_SEC: number;
|
|
|
11
11
|
export declare const TRADES_LARGE_RETENTION_SEC: number;
|
|
12
12
|
/** tsdb-gateway's bar limit on the large lane (validateKiyoPlusBar, kiyo_plus_validation.go): an
|
|
13
13
|
* unaggregated read (TRADE_LARGE included) is estimated at one point per minute, and a tier user's
|
|
14
|
-
* window
|
|
15
|
-
*
|
|
14
|
+
* window longer than the tier's default max_bar_limit (15,000 on every tier of ore and cme) is
|
|
15
|
+
* trimmed to its last 15,000 minutes without a word, counted from the window's own end (a window
|
|
16
|
+
* ending at now counts from the gateway's clock). About 10.4 days: the lane's history horizon on
|
|
17
|
+
* one ask, at any date, so a replay weeks back reads its history too. */
|
|
16
18
|
export declare const TRADES_LARGE_BAR_LIMIT_SEC: number;
|
|
17
19
|
/** A raw-tape acquisition's seed cap: a longer window over the raw TRADE table costs the gateway a
|
|
18
20
|
* scan over cold chunks (measured 18-30 s, or a server-side internal error, for ten days). */
|
|
19
21
|
export declare const TRADES_MAX_HISTORY_SEC: number;
|
|
20
22
|
/**
|
|
21
|
-
* The
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* collector's list.
|
|
23
|
+
* The payload field a run names the instant its lanes' declared history counts back from, when that instant is not
|
|
24
|
+
* the server's now. A market replay run names the replay's present (the close of the newest completed bar the replay
|
|
25
|
+
* shows, the open of the bar its playhead is in), while its lanes run on to the replay window's end (the forward
|
|
26
|
+
* runway), on every lane it asks (wrun-overlay-run.util `fetchLane`). A live run names its session's pin for the tape
|
|
27
|
+
* (wrun-history-as-of.util: the instant the session's first run counted the tape's history back from), from the
|
|
28
|
+
* session's second run on, while the window still ends at the server's now; its first run names none, so that ask is
|
|
29
|
+
* the payload it always was. Every reader of a declared history counts back from it (`sourceHistoryAsOfMs`: the
|
|
30
|
+
* K_TRADES seed, the wrun reconcile's served start). The table's retention and the gateway's bar limit never read it:
|
|
31
|
+
* the table keeps, and the gateway trims a window, by the wall clock.
|
|
31
32
|
*/
|
|
32
|
-
export declare const
|
|
33
|
+
export declare const SOURCE_HISTORY_AS_OF_FIELD = "historyAsOfMs";
|
|
34
|
+
/** The instant a declared history counts back from: the one an ask names (`SOURCE_HISTORY_AS_OF_FIELD`, a finite
|
|
35
|
+
* instant above zero, never later than the server's now), else the server's now. */
|
|
36
|
+
export declare function sourceHistoryAsOfMs(named: unknown, serverNowMs: number): number;
|
|
33
37
|
/** A tape's market: the frame's venue else the chart's, and the normalized symbol, else the raw one (`ES1!`). */
|
|
34
38
|
export interface TradesLargeMarket {
|
|
35
39
|
exchange?: unknown;
|
|
@@ -103,18 +107,26 @@ interface LiveTradeWire {
|
|
|
103
107
|
export declare function liveTradeOfPoint(point: unknown, large?: boolean): LiveTradeWire | undefined;
|
|
104
108
|
/**
|
|
105
109
|
* The chart bar a print at `tsMs` lands in, keyed the way the chart's candles of that market are:
|
|
106
|
-
* the
|
|
107
|
-
*
|
|
108
|
-
* epoch week opens on a Thursday no weekly candle carries),
|
|
109
|
-
* boundary on a month-class bar).
|
|
110
|
+
* the market's session lattice at 4h, 1d and 1w on a session-lattice venue (the gateway's
|
|
111
|
+
* `sessionProfile.bucketExpression`: the CME family, forex), else a week bar on its Monday
|
|
112
|
+
* (`findMonday`, the chart's week: the epoch week opens on a Thursday no weekly candle carries),
|
|
113
|
+
* else the UTC floor (the calendar boundary on a month-class bar).
|
|
110
114
|
*/
|
|
111
115
|
export declare function tradesBarStartMs(tsMs: number, intervalMs: number, exchange?: unknown): number;
|
|
116
|
+
/**
|
|
117
|
+
* The key of the chart bar after the one keyed `barMs` (a `tradesBarStartMs` key), for a walk over a window's bars:
|
|
118
|
+
* the session lattice's next bar on a lattice venue (`sessionLatticeNextBarMs`: a lattice bar can outlast its width,
|
|
119
|
+
* so the bucket of `barMs + intervalMs` can be the bar itself), else the bar's end (a calendar bar's next boundary, a
|
|
120
|
+
* fixed bar its width on). Null when no later bar can be named: a walk stops there, it never repeats `barMs`.
|
|
121
|
+
*/
|
|
122
|
+
export declare function tradesNextBarStartMs(barMs: number, intervalMs: number, exchange?: unknown): number | null;
|
|
112
123
|
/**
|
|
113
124
|
* Where a seeded history ask opens: the open of the chart bar holding `nowMs - historySec`, so the
|
|
114
125
|
* seed covers whole bars and a bar is never bought from its middle (it would be replaced by its
|
|
115
126
|
* later prints on every poll). A CME session lattice bar opens where the lattice opens it (a daily
|
|
116
127
|
* bar at the prior 17:00 Chicago open, ahead of its 00:00Z label); every other bar on
|
|
117
|
-
* `tradesBarStartMs` (a Monday on a week chart). Without a history the live edge itself.
|
|
128
|
+
* `tradesBarStartMs` (a Monday on a week chart). Without a history the live edge itself. `nowMs` is
|
|
129
|
+
* the ask's as-of (`sourceHistoryAsOfMs`: a replay's present, else the server's now).
|
|
118
130
|
*/
|
|
119
131
|
export declare function tradesSeedStartMs(nowMs: number, historySec: number, intervalMs: number, exchange?: unknown): number;
|
|
120
132
|
/**
|
|
@@ -128,23 +140,31 @@ export declare function tradesBarOpenMs(tsMs: number, intervalMs: number, exchan
|
|
|
128
140
|
* right there, else the bar after it (the lattice's next session bar, the next calendar or fixed
|
|
129
141
|
* bar), so an ask that may not reach behind `tsMs` still covers whole bars only. */
|
|
130
142
|
export declare function tradesFirstBarOpenFromMs(tsMs: number, intervalMs: number, exchange?: unknown): number;
|
|
131
|
-
/** Where a large-lane ask opens at the earliest: the first bar open at or after
|
|
132
|
-
* gateway's bar limit (TRADES_LARGE_BAR_LIMIT_SEC, kept a margin inside it), so the
|
|
133
|
-
* trims the window it was handed and the worker's grid opens where the answer does.
|
|
134
|
-
|
|
143
|
+
/** Where a large-lane ask opens at the earliest: the first bar open at or after the ask's window
|
|
144
|
+
* end minus the gateway's bar limit (TRADES_LARGE_BAR_LIMIT_SEC, kept a margin inside it), so the
|
|
145
|
+
* gateway never trims the window it was handed and the worker's grid opens where the answer does.
|
|
146
|
+
* The gateway counts a raw window's cap from the window's own end (now, for a window ending there),
|
|
147
|
+
* so the limit bounds the ask's length, never how far back it sits. */
|
|
148
|
+
export declare function tradesBarLimitStartMs(windowEndMs: number, barLimitSec: number, intervalMs: number, exchange?: unknown): number;
|
|
135
149
|
/**
|
|
136
150
|
* The first stamp a seeded history ask serves prints from, whichever of these is latest (K_TRADES's
|
|
137
151
|
* request builder honors them all): the open of the bar holding the ask's own window start (an ask
|
|
138
152
|
* never opens inside a bar: a CME daily-class bar's key runs ahead of its open), the seed start
|
|
139
153
|
* (`tradesSeedStartMs`), the table's retention horizon, and on the large lane the gateway's bar
|
|
140
154
|
* limit (`barLimitSec`, `tradesBarLimitStartMs`). A reader of the answer (the wrun reconcile) tells
|
|
141
|
-
* a PARTIAL first bucket, one that opened before this stamp, from a bucket served whole.
|
|
155
|
+
* a PARTIAL first bucket, one that opened before this stamp, from a bucket served whole. The seed
|
|
156
|
+
* counts back from the ask's as-of (`historyAsOfMs`, the ask's `SOURCE_HISTORY_AS_OF_FIELD`:
|
|
157
|
+
* `sourceHistoryAsOfMs`, the request builder's rule), the retention from `nowMs`, and the bar limit
|
|
158
|
+
* from the ask's window end (`windowEndMs`, else `nowMs`: the gateway counts a raw window's cap from
|
|
159
|
+
* its own end).
|
|
142
160
|
*/
|
|
143
161
|
export declare function tradesServedStartMs(nowMs: number, historySec: number, intervalMs: number, options?: {
|
|
144
162
|
windowFromMs?: number;
|
|
163
|
+
windowEndMs?: number;
|
|
145
164
|
retentionSec?: number;
|
|
146
165
|
barLimitSec?: number;
|
|
147
166
|
exchange?: unknown;
|
|
167
|
+
historyAsOfMs?: unknown;
|
|
148
168
|
}): number;
|
|
149
169
|
/** Null for a point the fold rejects, another channel's included; without `large`, either channel (stamp readers). */
|
|
150
170
|
export declare function readLiveTradePrint(newPoint: unknown, large?: boolean): LiveTradePrint | null;
|
|
@@ -171,29 +191,15 @@ export declare function tradesTapeFloorValuesPrints(floor: TradesTapeFloor): boo
|
|
|
171
191
|
* builds `<root>-USD`), else the raw symbol's root (`6AZ6` is 6A, the continuous `ES1!` is ES, a
|
|
172
192
|
* bare root is itself); undefined without either. */
|
|
173
193
|
export declare function tradesCmeProductRoot(market: TradesLargeMarket): string | undefined;
|
|
174
|
-
/** Whether the collector copies a CME Group product root into the large-print table (`TRADES_LARGE_CME_ROOTS`); false
|
|
175
|
-
* for an unknown root. */
|
|
176
|
-
export declare function tradesLargeServesCmeRoot(root: unknown): boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Whether the large-print table holds a market's big trades, the ONE rule of the tape lane a market rides
|
|
179
|
-
* (`tradesLaneLimits`): on a CME Group venue only a product root the collector copies (`tradesLargeServesCmeRoot`, the
|
|
180
|
-
* root `tradesCmeProductRoot` reads: `MGC1!`, `MGCZ6` and `MGC-USD` are MGC, which it does not); every other market
|
|
181
|
-
* is the collector's dollar rule's, which copies every print of at least $10k quote on a dollar-quoted market (a
|
|
182
|
-
* dollar tape on any other quote is refused by name before any fetch, `wrun_tape_value_unproven`). A tape on a market
|
|
183
|
-
* the table does not hold rides the raw tape, never the empty table.
|
|
184
|
-
*/
|
|
185
|
-
export declare function tradesLargeServesMarket(market: TradesLargeMarket): boolean;
|
|
186
194
|
/** The venues whose TRADE_LARGE read honors `minAmountPerOrder`; no other read may name it (a v2-only field leaves /v3). */
|
|
187
195
|
export declare function tradesFloorPerOrder(exchange: unknown): boolean;
|
|
188
196
|
/** Whether a tape floor is a dollar floor (C-DOLLAR's `minValue`, finite and above zero). */
|
|
189
197
|
export declare function tradesTapeFloorIsDollars(floor: Pick<TradesTapeFloor, 'minValue'>): boolean;
|
|
190
198
|
/** The tape lane an acquisition rides: the large lane (the table's retention, the gateway's bar
|
|
191
199
|
* limit, the declared history) when it asks `large`, else the raw tape (a two-hour seed inside the
|
|
192
|
-
* raw table's retention). Big trades read the large-print table
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* the collector does not copy rides the raw tape (its two hours and the raw live channel, every fill
|
|
196
|
-
* judged on its own) instead of an empty table that draws nothing. A dollar floor (`floor.minValue`)
|
|
200
|
+
* raw table's retention). Big trades read the large-print table only, never the raw tape: raw trade
|
|
201
|
+
* is kept about two days, so a longer chart would show its small prints on the newest bars alone. A
|
|
202
|
+
* market the collector never copies reads the table empty and gets no live row either. A dollar floor (`floor.minValue`)
|
|
197
203
|
* on the raw tape reads no history at all (`historyCapSec` 0, the live edge): the raw tape's quote
|
|
198
204
|
* amounts are priced by no writer rule (a backfill gap is NULL), so its rows are no proven dollars.
|
|
199
205
|
* The ONE rule of a tape's served history: the request builder, the reconcile's served start and the
|