@orangecharts/wrun-chart-host 0.11.1 → 0.15.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 +4 -4
- package/dist/constants/feature-flags.constants.js +38 -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 +69 -3
- package/dist/host-env.js +21 -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 +52 -12
- package/dist/indicators/controls/tpo-session.util.js +113 -16
- 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 +141 -20
- 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 +5 -5
- package/dist/market-data/venues/opra.js +3 -3
- package/dist/market-data/venues/stocks.contract.copy.json +6 -5
- package/dist/market-data/venues/stocks.d.ts +5 -5
- package/dist/market-data/venues/stocks.js +21 -18
- 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 +43 -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 +38 -7
- package/dist/utility/chart/cache-alignment.util.js +50 -13
- 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/footprint-band.util.d.ts +21 -5
- package/dist/utility/chart/footprint-band.util.js +53 -14
- 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/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-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 +38 -13
- package/dist/utility/chart/wrun-run-result.util.js +97 -27
- 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 +46 -23
- package/dist/utility/wrun/wrun-batched-marks.util.js +260 -62
- 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.d.ts +24 -7
- package/dist/utility/wrun/wrun-canvases.util.js +99 -30
- 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-hover.util.d.ts +8 -2
- package/dist/utility/wrun/wrun-hover.util.js +24 -13
- 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 +655 -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-output-words.util.d.ts +14 -0
- package/dist/utility/wrun/wrun-output-words.util.js +51 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +116 -11
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +208 -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-result.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +247 -26
- package/dist/utility/wrun/wrun-overlay-run.util.js +2234 -408
- package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +11 -2
- package/dist/utility/wrun/wrun-panel-mount.util.js +122 -19
- 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 +95 -5
- package/dist/utility/wrun/wrun-run-health.util.js +209 -3
- 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 +38 -11
- package/dist/utility/wrun/wrun-script-inputs.util.js +194 -56
- 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-style-names.util.d.ts +23 -0
- package/dist/utility/wrun/wrun-style-names.util.js +74 -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 +7 -3
- 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 +5 -5
|
@@ -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,32 +2534,39 @@ 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:
|
|
2495
2542
|
* `{{qty:units}}` prints a mark's quantity in the market's own unit, `{{qty:usd}}` in dollars). */
|
|
2496
2543
|
tooltip?: string | null;
|
|
2497
|
-
/** The readout title, 1..40 chars
|
|
2544
|
+
/** The readout title and the Style line's, 1..40 chars, where the sheet's `style_names` table gives the section no
|
|
2545
|
+
* label (absent = the name read as words; wrun-style-names.util wrunStyleTitle). */
|
|
2498
2546
|
label?: string;
|
|
2499
2547
|
panel?: 'overlay';
|
|
2500
2548
|
}
|
|
2549
|
+
/** The size law over a record's quantity (marks, and the marks a flags section points at): `unit` is the Min
|
|
2550
|
+
* size quantity (> 0), `scale` the Bubble size 1..10; on sqrt k = 0.5 + 0.1 * scale, d = round(clamp(11k *
|
|
2551
|
+
* sqrt(qty / unit), 11k, min(64, 50k))), then 6..64 css px. `log` grows the diameter with the quantity's
|
|
2552
|
+
* logarithm, and `min_px` / `max_px` bound the diameter in css px (the dark pool prints: $1M at 5 px, $100M at
|
|
2553
|
+
* 12 px). The engine draws `log` and the bounds from the release that draws `flags`. */
|
|
2554
|
+
export interface WrunMarkSize {
|
|
2555
|
+
law?: 'sqrt' | 'linear' | 'log';
|
|
2556
|
+
unit?: number;
|
|
2557
|
+
scale?: number;
|
|
2558
|
+
min_px?: number;
|
|
2559
|
+
max_px?: number;
|
|
2560
|
+
}
|
|
2501
2561
|
/** One `marks[]` entry (`plot.marks`): per bar, `slots` records of `[price, qty, meta]` with
|
|
2502
2562
|
* `meta = side + 4 * fills + 262144 * offset_ms` (side 0..3: 0 sell, 1 buy; fills 0..65535;
|
|
2503
2563
|
* offset_ms 0..2^30); a NaN price is an empty slot. Look fields take the param-native units
|
|
2504
2564
|
* (round-2 fold 1); the chart derives the pixels exactly as Big Trades 0.3.2 did. */
|
|
2505
2565
|
export interface WrunMarksSection extends WrunBatchedSectionCommon {
|
|
2506
2566
|
stride: 3;
|
|
2507
|
-
/** 0 Bubble, 1 Soft dot, 2 Ring, 3 Square (default 0). */
|
|
2567
|
+
/** 0 Bubble, 1 Soft dot, 2 Ring, 3 Square, 4 Diamond (hollow, a 1 px edge; the word `diamond`) (default 0). */
|
|
2508
2568
|
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
|
-
};
|
|
2569
|
+
size?: WrunMarkSize;
|
|
2517
2570
|
/** 0 Candle center, 1 Trade time (the record's `offset_ms` inside the bar). */
|
|
2518
2571
|
x?: number;
|
|
2519
2572
|
/** Indexed by the record's side: [sell, buy, ...], 2..4 colours (default the theme's down and up). */
|
|
@@ -2569,7 +2622,68 @@ export interface WrunRaysSection extends WrunBatchedSectionCommon {
|
|
|
2569
2622
|
opacity?: number;
|
|
2570
2623
|
words?: string[];
|
|
2571
2624
|
}
|
|
2572
|
-
|
|
2625
|
+
/** The icon a flag's chip leads with, one per word (`icons`). */
|
|
2626
|
+
export type WrunFlagIcon = 'none' | 'dot' | 'diamond' | 'sprout' | 'flame';
|
|
2627
|
+
/** One `flags[]` entry (`plot.flags`, the dark pool round): per bar, `slots` records of `[price, qty, meta]` read and
|
|
2628
|
+
* copied as on marks, with `meta = word + 4 * count + 262144 * offset_ms` (word 0..3 picks the chip's template in
|
|
2629
|
+
* `words`, count 0..65535, offset_ms 0..2^30); a NaN price is an empty slot. The engine places the chips on every
|
|
2630
|
+
* paint (the largest dollars first, a chip above the highest candle under it, one that would touch a placed chip or
|
|
2631
|
+
* has no room dropped, at most `max_in_view`, a 1 px hairline down to the record) and never stretches the price
|
|
2632
|
+
* scale for them. */
|
|
2633
|
+
export interface WrunFlagsSection extends WrunBatchedSectionCommon {
|
|
2634
|
+
stride: 3;
|
|
2635
|
+
/** 1..4 chip templates of at most 32 chars, picked by the record's word: `{{qty}}` (`:compact`, `:usd`, `:int`),
|
|
2636
|
+
* `{{price}}` and `{{count}}`. */
|
|
2637
|
+
words?: string[];
|
|
2638
|
+
/** The icon each word's chip leads with, a word of `WrunFlagIcon` or its index (default none). */
|
|
2639
|
+
icons?: Array<WrunFlagIcon | number>;
|
|
2640
|
+
/** The chips in view at most, 1..16 (default 5). */
|
|
2641
|
+
max_in_view?: number;
|
|
2642
|
+
/** 0 Candle center, 1 Trade time (default 1). */
|
|
2643
|
+
x?: number;
|
|
2644
|
+
/** The size law of the marks the chips point at (as on marks). */
|
|
2645
|
+
size?: WrunMarkSize;
|
|
2646
|
+
/** Up to 3 colours by part: [chip fill, chip edge (the hairline too), text]; a part left out takes its default
|
|
2647
|
+
* ([theme.bg, theme.muted, theme.text]); more than 3 refuses the run. */
|
|
2648
|
+
colors?: WrunBatchedColor[];
|
|
2649
|
+
}
|
|
2650
|
+
export type WrunBatchedSection = WrunMarksSection | WrunSpansSection | WrunRaysSection | WrunFlagsSection;
|
|
2651
|
+
/** The kinds of the sheet's `style_names` table whose entry titles a Style line: the four batched kinds, and a
|
|
2652
|
+
* renderer (any kind). */
|
|
2653
|
+
export type WrunStyleNameTitledKind = WrunBatchedMarksKind | 'renderer';
|
|
2654
|
+
/** The kinds of the table whose entry names colours only: an output and a heatmap keep their title in their own
|
|
2655
|
+
* `label` (one source per title), so the table names their swatches and never their line. */
|
|
2656
|
+
export type WrunStyleNameColorsKind = 'output' | 'heatmap';
|
|
2657
|
+
/** The drawn kinds the sheet's `style_names` table names. */
|
|
2658
|
+
export type WrunStyleNameKind = WrunStyleNameTitledKind | WrunStyleNameColorsKind;
|
|
2659
|
+
interface WrunStyleNameCommon {
|
|
2660
|
+
/** The section's, renderer's, output's or heatmap's own `name`. */
|
|
2661
|
+
name: string;
|
|
2662
|
+
/** One name per colour slot, in slot order, as long as that target's colour list (an output's: its two-tone pair or
|
|
2663
|
+
* its `color_by` ladder, one per rung; a heatmap's: its `palette`; a renderer's: its `colors`, the `color_by`
|
|
2664
|
+
* ladder): each names its swatch. Slots that share a name are one swatch that paints all of them. */
|
|
2665
|
+
colors?: string[];
|
|
2666
|
+
}
|
|
2667
|
+
/** A batched section's or a renderer's entry: the words its Style line is titled by, and its swatches' names. */
|
|
2668
|
+
export interface WrunStyleNameTitled extends WrunStyleNameCommon {
|
|
2669
|
+
kind: WrunStyleNameTitledKind;
|
|
2670
|
+
/** The words its Style line is titled by (absent: the section's own `label`, else its name read as words). */
|
|
2671
|
+
label?: string;
|
|
2672
|
+
}
|
|
2673
|
+
/** An output's or a heatmap's entry: its swatches' names alone (its title is its own `label`; a `label` here is read
|
|
2674
|
+
* as none). */
|
|
2675
|
+
export interface WrunStyleNameColors extends WrunStyleNameCommon {
|
|
2676
|
+
kind: WrunStyleNameColorsKind;
|
|
2677
|
+
label?: never;
|
|
2678
|
+
}
|
|
2679
|
+
/**
|
|
2680
|
+
* One entry of the sheet's `style_names` table (STYLE-PAGE-NAMES, frozen sheet contract, kit scaffold 118): the plain
|
|
2681
|
+
* words the settings box shows for one batched section, renderer, output or heatmap, named by its kind and `name`.
|
|
2682
|
+
* The table is a top-level key, never a section key, so a reader older than it strips it and the sections stay as
|
|
2683
|
+
* every kit wrote them (the sheet lists it in `ignorable` for the hosted extractor). wrun-style-names.util is its one
|
|
2684
|
+
* reader.
|
|
2685
|
+
*/
|
|
2686
|
+
export type WrunStyleName = WrunStyleNameTitled | WrunStyleNameColors;
|
|
2573
2687
|
export interface WrunIndicatorMetadata {
|
|
2574
2688
|
id: string;
|
|
2575
2689
|
name: string;
|
|
@@ -2653,6 +2767,7 @@ export interface WrunIndicatorMetadata {
|
|
|
2653
2767
|
marks?: WrunMarksSection[];
|
|
2654
2768
|
spans?: WrunSpansSection[];
|
|
2655
2769
|
rays?: WrunRaysSection[];
|
|
2770
|
+
flags?: WrunFlagsSection[];
|
|
2656
2771
|
/** g4 DW21: false keeps the author's colours on a light chart (default true). */
|
|
2657
2772
|
contrast_guard?: boolean;
|
|
2658
2773
|
/** The history-independent stamp (kit 0.66.0, scaffold 66): the compiler proved that every bar's
|
|
@@ -2733,6 +2848,12 @@ export interface WrunIndicatorMetadata {
|
|
|
2733
2848
|
/** The dialog layout in source order (absent = today's `group` tabs). */
|
|
2734
2849
|
layout?: WrunLayoutEntry[];
|
|
2735
2850
|
presets?: WrunPreset[];
|
|
2851
|
+
/** The Style page's plain names for batched sections, renderers, outputs and heatmaps (WrunStyleName; absent = the
|
|
2852
|
+
* page titles each line by the section's own label or its name, and each swatch by what it paints or its place). */
|
|
2853
|
+
style_names?: WrunStyleName[];
|
|
2854
|
+
/** The word paths a reader older than them may skip (`inputs[].capacity`, `style_names`): the hosted extractor's
|
|
2855
|
+
* list, which the kit validates. The chart does not read it. */
|
|
2856
|
+
ignorable?: string[];
|
|
2736
2857
|
/** The legend title template ({{name}} placeholders). */
|
|
2737
2858
|
legend_title?: string;
|
|
2738
2859
|
/** `render.legend` / `render.hud` declarations (never renderer kinds:
|
|
@@ -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
|