@orangecharts/wrun-chart-host 0.2.0 → 0.4.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 +22 -8
- package/dist/constants/common.constants.d.ts +15 -0
- package/dist/constants/common.constants.js +23 -0
- package/dist/constants/data-source.constants.d.ts +1 -0
- package/dist/constants/data-source.constants.js +1 -0
- package/dist/constants/economic.constants.d.ts +39 -0
- package/dist/constants/economic.constants.js +77 -0
- package/dist/constants/etf-covered-coins.constants.d.ts +1 -0
- package/dist/constants/etf-covered-coins.constants.js +9 -0
- package/dist/constants/feature-flags.constants.d.ts +60 -0
- package/dist/constants/feature-flags.constants.js +308 -0
- package/dist/constants/feature-limits.constants.d.ts +134 -0
- package/dist/constants/feature-limits.constants.js +155 -0
- package/dist/constants/marketCapabilities.constants.d.ts +87 -0
- package/dist/constants/marketCapabilities.constants.js +213 -0
- package/dist/constants/option-venues.constants.d.ts +100 -0
- package/dist/constants/option-venues.constants.js +167 -0
- package/dist/constants/overlay-data.constants.d.ts +53 -0
- package/dist/constants/overlay-data.constants.js +80 -0
- package/dist/constants/pane-grid.constants.d.ts +15 -0
- package/dist/constants/pane-grid.constants.js +17 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +133 -0
- package/dist/constants/scriptEditor/builtin-script-snippets.js +451 -0
- package/dist/constants/venue-presets.constants.d.ts +10 -0
- package/dist/constants/venue-presets.constants.js +22 -0
- package/dist/enums/chart.enum.d.ts +68 -0
- package/dist/enums/chart.enum.js +70 -0
- package/dist/helpers/data.helpers.d.ts +2 -0
- package/dist/helpers/data.helpers.js +14 -0
- package/dist/host-env.d.ts +163 -5
- package/dist/host-ports.types.d.ts +431 -0
- package/dist/host-ports.types.js +1 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +138 -0
- package/dist/indicators/controls/technical-script/technical-script-input-rendering.d.ts +86 -0
- package/dist/indicators/controls/technical-script/technical-script-input-rendering.js +179 -0
- package/dist/interfaces/asset-venue.interface.d.ts +91 -0
- package/dist/interfaces/asset-venue.interface.js +1 -0
- package/dist/interfaces/cancel-reason.interface.d.ts +24 -0
- package/dist/interfaces/cancel-reason.interface.js +2 -0
- package/dist/interfaces/catalog-display.interface.d.ts +3 -0
- package/dist/interfaces/catalog-display.interface.js +1 -0
- package/dist/interfaces/cme-realtime.interface.d.ts +251 -0
- package/dist/interfaces/cme-realtime.interface.js +46 -0
- package/dist/interfaces/feed.interface.d.ts +80 -0
- package/dist/interfaces/feed.interface.js +7 -0
- package/dist/interfaces/market-kind.interface.d.ts +8 -0
- package/dist/interfaces/market-kind.interface.js +1 -0
- package/dist/interfaces/opra-realtime.interface.d.ts +224 -0
- package/dist/interfaces/opra-realtime.interface.js +105 -0
- package/dist/interfaces/option-instrument.interface.d.ts +32 -0
- package/dist/interfaces/option-instrument.interface.js +1 -0
- package/dist/interfaces/options-chain-scope.interface.d.ts +29 -0
- package/dist/interfaces/options-chain-scope.interface.js +7 -0
- package/dist/interfaces/prediction-market.interface.d.ts +88 -0
- package/dist/interfaces/prediction-market.interface.js +8 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +5 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +185 -0
- package/dist/kscript-data/controls/live-trades-merge.util.js +357 -0
- package/dist/settings-templates/frvp-fields.d.ts +27 -0
- package/dist/settings-templates/frvp-fields.js +108 -0
- package/dist/settings-templates/index.d.ts +119 -0
- package/dist/settings-templates/index.js +442 -0
- package/dist/settings-templates/indicator-fields.d.ts +56 -0
- package/dist/settings-templates/indicator-fields.js +793 -0
- package/dist/settings-templates/tool-rules.d.ts +59 -0
- package/dist/settings-templates/tool-rules.js +49 -0
- package/dist/settings-templates/tool-tables.generated.d.ts +2 -0
- package/dist/settings-templates/tool-tables.generated.js +1668 -0
- package/dist/utility/blk-market.util.d.ts +5 -0
- package/dist/utility/blk-market.util.js +12 -0
- package/dist/utility/chart/chart-load-phase.util.d.ts +32 -0
- package/dist/utility/chart/chart-load-phase.util.js +78 -0
- package/dist/utility/chart/cme-cache-context.util.d.ts +108 -0
- package/dist/utility/chart/cme-cache-context.util.js +166 -0
- package/dist/utility/chart/cme-session-bucket.util.d.ts +82 -0
- package/dist/utility/chart/cme-session-bucket.util.js +343 -0
- package/dist/utility/chart/cme-trade-calendar.util.d.ts +26 -0
- package/dist/utility/chart/cme-trade-calendar.util.js +147 -0
- package/dist/utility/chart/continuous-contracts.util.d.ts +138 -0
- package/dist/utility/chart/continuous-contracts.util.js +374 -0
- package/dist/utility/chart/date-labelled-interval.leaf.d.ts +15 -0
- package/dist/utility/chart/date-labelled-interval.leaf.js +19 -0
- package/dist/utility/chart/feed-interval.util.d.ts +119 -0
- package/dist/utility/chart/feed-interval.util.js +321 -0
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +110 -0
- package/dist/utility/chart/fetch-dedupe-policy.util.js +407 -0
- package/dist/utility/chart/footprint-band.util.d.ts +76 -0
- package/dist/utility/chart/footprint-band.util.js +205 -0
- package/dist/utility/chart/footprint-cell-identity.util.d.ts +82 -0
- package/dist/utility/chart/footprint-cell-identity.util.js +346 -0
- package/dist/utility/chart/formula-calendar.util.d.ts +27 -0
- package/dist/utility/chart/formula-calendar.util.js +59 -0
- package/dist/utility/chart/history-wall.util.d.ts +67 -0
- package/dist/utility/chart/history-wall.util.js +87 -0
- package/dist/utility/chart/index-mode.util.d.ts +66 -0
- package/dist/utility/chart/index-mode.util.js +360 -0
- package/dist/utility/chart/indicator-coverage-planner.util.d.ts +217 -0
- package/dist/utility/chart/indicator-coverage-planner.util.js +443 -0
- package/dist/utility/chart/indicator-coverage-state.util.d.ts +33 -0
- package/dist/utility/chart/indicator-coverage-state.util.js +110 -0
- package/dist/utility/chart/indicator-gap-detector.util.d.ts +127 -0
- package/dist/utility/chart/indicator-gap-detector.util.js +260 -0
- package/dist/utility/chart/indicator-gap-repair.util.d.ts +88 -0
- package/dist/utility/chart/indicator-gap-repair.util.js +177 -0
- package/dist/utility/chart/indicator-inflight-registry.util.d.ts +26 -0
- package/dist/utility/chart/indicator-inflight-registry.util.js +254 -0
- package/dist/utility/chart/indicator-run-interval.util.d.ts +130 -0
- package/dist/utility/chart/indicator-run-interval.util.js +268 -0
- package/dist/utility/chart/interval-registry.util.d.ts +23 -0
- package/dist/utility/chart/interval-registry.util.js +83 -0
- package/dist/utility/chart/kscript-main-grid-stages.util.d.ts +21 -0
- package/dist/utility/chart/kscript-main-grid-stages.util.js +332 -0
- package/dist/utility/chart/legacy-exchange.leaf.d.ts +11 -0
- package/dist/utility/chart/legacy-exchange.leaf.js +43 -0
- package/dist/utility/chart/live-bucket.util.d.ts +66 -0
- package/dist/utility/chart/live-bucket.util.js +165 -0
- package/dist/utility/chart/market-session-schedule.util.d.ts +91 -0
- package/dist/utility/chart/market-session-schedule.util.js +337 -0
- package/dist/utility/chart/marketKind.util.d.ts +181 -0
- package/dist/utility/chart/marketKind.util.js +371 -0
- package/dist/utility/chart/opra-read-access.leaf.d.ts +26 -0
- package/dist/utility/chart/opra-read-access.leaf.js +25 -0
- package/dist/utility/chart/prediction-identity.util.d.ts +159 -0
- package/dist/utility/chart/prediction-identity.util.js +236 -0
- package/dist/utility/chart/rth-session.util.d.ts +352 -0
- package/dist/utility/chart/rth-session.util.js +926 -0
- package/dist/utility/chart/titan-constants.pin.d.ts +43 -0
- package/dist/utility/chart/titan-constants.pin.js +50 -0
- package/dist/utility/chart/us-equities-session.util.d.ts +127 -0
- package/dist/utility/chart/us-equities-session.util.js +251 -0
- package/dist/utility/chart/window-geometry.leaf.d.ts +119 -0
- package/dist/utility/chart/window-geometry.leaf.js +391 -0
- package/dist/utility/chart/window-owner.leaf.d.ts +19 -0
- package/dist/utility/chart/window-owner.leaf.js +24 -0
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +100 -0
- package/dist/utility/chart/wrun-bar-session-facts.util.js +354 -0
- package/dist/utility/chart/wrun-wire-ref.util.d.ts +23 -0
- package/dist/utility/chart/wrun-wire-ref.util.js +16 -0
- package/dist/utility/common/safe-math-eval.d.ts +18 -0
- package/dist/utility/common/safe-math-eval.js +160 -0
- package/dist/utility/common/time.util.d.ts +134 -0
- package/dist/utility/common/time.util.js +428 -0
- package/dist/utility/common/transformations.util.d.ts +126 -0
- package/dist/utility/common/transformations.util.js +711 -0
- package/dist/utility/common/visible-timeout.util.d.ts +17 -0
- package/dist/utility/common/visible-timeout.util.js +75 -0
- package/dist/utility/exchange-normalization.util.d.ts +8 -0
- package/dist/utility/exchange-normalization.util.js +32 -0
- package/dist/utility/html-escape.leaf.d.ts +11 -0
- package/dist/utility/html-escape.leaf.js +20 -0
- package/dist/utility/intl-locale.util.d.ts +2 -0
- package/dist/utility/intl-locale.util.js +28 -0
- package/dist/utility/number-format.util.d.ts +14 -1
- package/dist/utility/number-format.util.js +50 -19
- package/dist/utility/options/option-symbol.util.d.ts +28 -0
- package/dist/utility/options/option-symbol.util.js +176 -0
- package/dist/utility/options/option-trade-units.util.d.ts +190 -0
- package/dist/utility/options/option-trade-units.util.js +283 -0
- package/dist/utility/options/option-venue.util.d.ts +75 -0
- package/dist/utility/options/option-venue.util.js +85 -0
- package/dist/utility/pool-symbol.leaf.d.ts +34 -0
- package/dist/utility/pool-symbol.leaf.js +95 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +109 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +302 -0
- package/dist/utility/symbol-selection/contract-expiry.util.d.ts +39 -0
- package/dist/utility/symbol-selection/contract-expiry.util.js +111 -0
- package/dist/utility/v2/gate-plane.util.d.ts +58 -0
- package/dist/utility/v2/gate-plane.util.js +99 -0
- package/dist/utility/v2/gate-session-latch.util.d.ts +22 -0
- package/dist/utility/v2/gate-session-latch.util.js +34 -0
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +76 -0
- package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +221 -0
- package/dist/utility/wrun/sources/host-grid-landing.d.ts +15 -0
- package/dist/utility/wrun/sources/host-grid-landing.js +26 -0
- package/dist/utility/wrun/sources/lanes/bitfinex_funding.d.ts +27 -0
- package/dist/utility/wrun/sources/lanes/bitfinex_funding.js +85 -0
- package/dist/utility/wrun/sources/lanes/economic.d.ts +27 -0
- package/dist/utility/wrun/sources/lanes/economic.js +79 -0
- package/dist/utility/wrun/sources/lanes/etf_holdings.d.ts +35 -0
- package/dist/utility/wrun/sources/lanes/etf_holdings.js +165 -0
- package/dist/utility/wrun/sources/lanes/etf_premium.d.ts +19 -0
- package/dist/utility/wrun/sources/lanes/etf_premium.js +114 -0
- package/dist/utility/wrun/sources/lanes/ethena_positions.d.ts +30 -0
- package/dist/utility/wrun/sources/lanes/ethena_positions.js +51 -0
- package/dist/utility/wrun/sources/lanes/index.d.ts +2 -0
- package/dist/utility/wrun/sources/lanes/index.js +32 -0
- package/dist/utility/wrun/sources/lanes/long_short_ratio.d.ts +17 -0
- package/dist/utility/wrun/sources/lanes/long_short_ratio.js +47 -0
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +58 -0
- package/dist/utility/wrun/sources/lanes/option_daily.js +111 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +27 -0
- package/dist/utility/wrun/sources/lanes/option_stats_10m.js +21 -0
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +50 -0
- package/dist/utility/wrun/sources/lanes/options_flow.js +155 -0
- package/dist/utility/wrun/sources/lanes/options_oi.d.ts +29 -0
- package/dist/utility/wrun/sources/lanes/options_oi.js +59 -0
- package/dist/utility/wrun/sources/lanes/options_volume.d.ts +38 -0
- package/dist/utility/wrun/sources/lanes/options_volume.js +63 -0
- package/dist/utility/wrun/sources/lanes/series.d.ts +67 -0
- package/dist/utility/wrun/sources/lanes/series.js +321 -0
- package/dist/utility/wrun/sources/lanes/token_supply.d.ts +30 -0
- package/dist/utility/wrun/sources/lanes/token_supply.js +145 -0
- package/dist/utility/wrun/sources/lanes/treasury_balance.d.ts +25 -0
- package/dist/utility/wrun/sources/lanes/treasury_balance.js +47 -0
- package/dist/utility/wrun/sources/lanes/volatility_index.d.ts +21 -0
- package/dist/utility/wrun/sources/lanes/volatility_index.js +11 -0
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +215 -0
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +477 -0
- package/dist/utility/wrun/sources/registry.d.ts +21 -0
- package/dist/utility/wrun/sources/registry.js +237 -0
- package/dist/utility/wrun/sources/row-lane-registry.d.ts +28 -0
- package/dist/utility/wrun/sources/row-lane-registry.js +230 -0
- package/dist/utility/wrun/sources/row-lanes/index.d.ts +2 -0
- package/dist/utility/wrun/sources/row-lanes/index.js +12 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +2 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +38 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +55 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +126 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +4 -0
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +191 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +62 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +147 -0
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +70 -0
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +144 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +309 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.js +26 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +350 -0
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +576 -0
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +275 -0
- package/dist/utility/wrun/sources/wrun-row-lane.types.js +16 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +207 -0
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +450 -0
- package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +28 -0
- package/dist/utility/wrun/wrun-browser-sources.leaf.js +66 -0
- package/dist/utility/wrun/wrun-cloud-record.util.d.ts +65 -0
- package/dist/utility/wrun/wrun-cloud-record.util.js +121 -0
- package/dist/utility/wrun/wrun-daily-lane.util.d.ts +95 -0
- package/dist/utility/wrun/wrun-daily-lane.util.js +297 -0
- package/dist/utility/wrun/wrun-deadline.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-deadline.util.js +82 -0
- package/dist/utility/wrun/wrun-etf-flow-lane.util.d.ts +94 -0
- package/dist/utility/wrun/wrun-etf-flow-lane.util.js +224 -0
- package/dist/utility/wrun/wrun-etf-funds.util.d.ts +82 -0
- package/dist/utility/wrun/wrun-etf-funds.util.js +242 -0
- package/dist/utility/wrun/wrun-frames.d.ts +20 -1
- package/dist/utility/wrun/wrun-frames.js +103 -49
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +27 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +22 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +32 -0
- package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-lane-warmup.util.js +112 -0
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +57 -0
- package/dist/utility/wrun/wrun-leg-close.util.js +187 -0
- package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +144 -0
- package/dist/utility/wrun/wrun-leg-fetch.util.js +212 -0
- package/dist/utility/wrun/wrun-leg-stream-classes.d.ts +73 -0
- package/dist/utility/wrun/wrun-leg-stream-classes.js +86 -0
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +101 -6
- package/dist/utility/wrun/wrun-levels-child.util.js +335 -157
- package/dist/utility/wrun/wrun-memory-clamp.util.d.ts +33 -0
- package/dist/utility/wrun/wrun-memory-clamp.util.js +146 -0
- package/dist/utility/wrun/wrun-odds-template-market.util.d.ts +51 -0
- package/dist/utility/wrun/wrun-odds-template-market.util.js +251 -0
- package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +65 -0
- package/dist/utility/wrun/wrun-opra-flow.leaf.js +94 -0
- package/dist/utility/wrun/wrun-opra-lane.util.d.ts +47 -0
- package/dist/utility/wrun/wrun-opra-lane.util.js +58 -0
- package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +49 -0
- package/dist/utility/wrun/wrun-opra-stats.leaf.js +115 -0
- package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +12 -0
- package/dist/utility/wrun/wrun-opra-underlying.util.js +1 -0
- package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +142 -0
- package/dist/utility/wrun/wrun-option-contract-flow.util.js +451 -0
- package/dist/utility/wrun/wrun-option-knobs.util.d.ts +43 -0
- package/dist/utility/wrun/wrun-option-knobs.util.js +81 -0
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +144 -0
- package/dist/utility/wrun/wrun-option-prints.util.js +356 -0
- package/dist/utility/wrun/wrun-option-summary-lane.util.d.ts +102 -0
- package/dist/utility/wrun/wrun-option-summary-lane.util.js +143 -0
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +308 -0
- package/dist/utility/wrun/wrun-options-chain.util.js +502 -0
- package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +9 -4
- package/dist/utility/wrun/wrun-overlay-identity.util.js +16 -6
- package/dist/utility/wrun/wrun-panel-mount.lazy.d.ts +10 -0
- package/dist/utility/wrun/wrun-panel-mount.lazy.js +68 -0
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +377 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +2251 -0
- package/dist/utility/wrun/wrun-param-map.util.d.ts +298 -0
- package/dist/utility/wrun/wrun-param-map.util.js +581 -0
- package/dist/utility/wrun/wrun-pause-dim.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-pause-dim.util.js +153 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +149 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +523 -0
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-pin-venues.util.js +320 -0
- package/dist/utility/wrun/wrun-pinned-interval.util.d.ts +20 -0
- package/dist/utility/wrun/wrun-pinned-interval.util.js +47 -0
- package/dist/utility/wrun/wrun-plot-gate.types.d.ts +23 -0
- package/dist/utility/wrun/wrun-plot-gate.types.js +7 -0
- package/dist/utility/wrun/wrun-present-bits.util.d.ts +37 -0
- package/dist/utility/wrun/wrun-present-bits.util.js +73 -0
- package/dist/utility/wrun/wrun-protocol-pending.util.d.ts +33 -0
- package/dist/utility/wrun/wrun-protocol-pending.util.js +57 -0
- package/dist/utility/wrun/wrun-refusal.util.d.ts +41 -1
- package/dist/utility/wrun/wrun-refusal.util.js +69 -2
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +1 -14
- package/dist/utility/wrun/wrun-registry-errors.util.js +0 -16
- package/dist/utility/wrun/wrun-row-source.d.ts +158 -0
- package/dist/utility/wrun/wrun-row-source.js +75 -0
- package/dist/utility/wrun/wrun-run-health.util.d.ts +155 -0
- package/dist/utility/wrun/wrun-run-health.util.js +273 -0
- package/dist/utility/wrun/wrun-run-interval-projection.types.d.ts +14 -0
- package/dist/utility/wrun/wrun-run-interval-projection.types.js +1 -0
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +439 -0
- package/dist/utility/wrun/wrun-socket-row-source.js +1689 -0
- package/dist/utility/wrun/wrun-socket-session-losses.util.d.ts +18 -0
- package/dist/utility/wrun/wrun-socket-session-losses.util.js +25 -0
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +911 -0
- package/dist/utility/wrun/wrun-source-rows.util.js +2597 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +82 -0
- package/dist/utility/wrun/wrun-tape-source.util.js +151 -0
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +137 -0
- package/dist/utility/wrun/wrun-tier-grid.util.js +279 -0
- package/dist/utility/wrun/wrun-trades-lane.util.d.ts +52 -0
- package/dist/utility/wrun/wrun-trades-lane.util.js +58 -0
- package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +41 -0
- package/dist/utility/wrun/wrun-volume-profile-lane.util.js +66 -0
- package/dist/utility/wrun-display-name.util.d.ts +33 -0
- package/dist/utility/wrun-display-name.util.js +64 -0
- package/dist/workers/constants/kscript-transport-codes.d.ts +15 -0
- package/dist/workers/constants/kscript-transport-codes.js +15 -0
- package/dist/workers/constants/socket-slots.d.ts +574 -0
- package/dist/workers/constants/socket-slots.js +539 -0
- package/dist/workers/utils/number.worker.util.d.ts +5 -0
- package/dist/workers/utils/number.worker.util.js +10 -0
- package/dist/workers/utils/time.worker.util.d.ts +12 -0
- package/dist/workers/utils/time.worker.util.js +24 -0
- package/dist/workers/utils/volume-profile.worker.util.d.ts +200 -0
- package/dist/workers/utils/volume-profile.worker.util.js +631 -0
- package/package.json +10 -4
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `token_supply` on the browser lane: one token's daily supply and valuation facts (market cap,
|
|
3
|
+
* circulating / total / max supply, TVL, FDV, CoinGecko rank, volume, USD price), as the gateway's
|
|
4
|
+
* `TOKEN_SUPPLY_AGG` series serves them, off the `K_TOKEN_SUPPLY` control
|
|
5
|
+
* (`k-token-supply.control.ts` and its worker twin, new with this lane: no legacy control).
|
|
6
|
+
*
|
|
7
|
+
* Eleven fields, in the kit's member order, each on its own lane row column. One knob, `token`,
|
|
8
|
+
* REQUIRED by the kit: the gateway's case-sensitive display name ("Bitcoin", "Ethereum"). The
|
|
9
|
+
* chart resolves the coin by REVERSE lookup in the kit's `WRUN_TOKEN_NAMES` (ticker to display
|
|
10
|
+
* name, about 62 coins) and refuses a name the table does not list by name, before any fetch; a
|
|
11
|
+
* name spelled in another case is refused with the table's spelling. The answer is the control's
|
|
12
|
+
* ask, `{ coin, tokenName }`, so two inputs on one token share ONE fetch and two tokens fetch
|
|
13
|
+
* separately. The chart's own coin plays no part: the knob names the token.
|
|
14
|
+
*
|
|
15
|
+
* Gateway facts (measured by om, `runner/metrics-supply.ts`, pinned in the contract):
|
|
16
|
+
* - the series is served on the DAY and HOUR grids only: the lane rides the daily join with
|
|
17
|
+
* landing `last` and asks `1d` on every chart (the control honors `settings.interval`), and a
|
|
18
|
+
* bar reads the newest day at or before its own under `carry`;
|
|
19
|
+
* - the gateway answers NO rows to an ask whose `from` lies inside the last 80 days (and failed
|
|
20
|
+
* every ask opening at exactly 81 days back): the full run and every live reconcile open
|
|
21
|
+
* their window 90 days before the first day of the window they serve (`lookbackDays`), and
|
|
22
|
+
* the WORKER twin opens any later window at the same 90-day floor on the wire and cuts the
|
|
23
|
+
* answer back to the window asked (`k-token-supply.worker.ts`), so a row-cache composition
|
|
24
|
+
* suffix is covered too and the lane reads the tail of a window that always opens far enough
|
|
25
|
+
* back;
|
|
26
|
+
* - a row carries only the fields the gateway has for the token (a Bitcoin row carries ten of
|
|
27
|
+
* the eleven, `total_value_locked` alone unset, measured 2026-10-02): the control lays `null`
|
|
28
|
+
* on an absent field, which the row builder reads as no observation. Under `nan` or `zero`
|
|
29
|
+
* the input reads that fill; under the default `carry` a field no row of the answer carries
|
|
30
|
+
* refuses the run by name (the seam's valueless-field rule), instead of reading NaN forever.
|
|
31
|
+
*
|
|
32
|
+
* Units are the gateway's: USD for the valuations, volume and price, coins for the supplies,
|
|
33
|
+
* percent for the dominance, a plain rank; documented, never converted.
|
|
34
|
+
*
|
|
35
|
+
* The kit table is read through the kit seam (`wrun-kit.ts`), imported lazily inside `plan`:
|
|
36
|
+
* the bundle is heavy and this file sits on the row builder's import graph, and by the time a
|
|
37
|
+
* run plans its lanes the host's compile step has loaded the kit already, so the import
|
|
38
|
+
* resolves at once (the `assertWrunBrowserSources` pattern).
|
|
39
|
+
*/
|
|
40
|
+
import { wrunChartHostEnv } from '../../../../host-env.js';
|
|
41
|
+
import { refuseWrunPollInput, } from '../wrun-poll-lane.types.js';
|
|
42
|
+
export const WRUN_TOKEN_SUPPLY_SOURCE_CLASS = 'token_supply';
|
|
43
|
+
/** The fields in the kit's declaration order, each at its lane row column (column 0 is the
|
|
44
|
+
* ts): the row shape the control emits. */
|
|
45
|
+
export const WRUN_TOKEN_SUPPLY_FIELDS = Object.freeze({
|
|
46
|
+
marketcap: 1,
|
|
47
|
+
first_marketcap: 2,
|
|
48
|
+
marketcap_dominance_percent: 3,
|
|
49
|
+
circulating_supply: 4,
|
|
50
|
+
total_supply: 5,
|
|
51
|
+
max_supply: 6,
|
|
52
|
+
total_value_locked: 7,
|
|
53
|
+
fully_diluted_valuation: 8,
|
|
54
|
+
cg_marketcap_rank: 9,
|
|
55
|
+
total_volume: 10,
|
|
56
|
+
usd_price: 11,
|
|
57
|
+
});
|
|
58
|
+
/** The full run and every live reconcile open their ask this many days before the first day of
|
|
59
|
+
* the window they serve: past the gateway's 80-day blackout (an ask opening inside it answers
|
|
60
|
+
* no rows) and the 81-day edge that failed, with a margin. The worker twin's wire floor is the
|
|
61
|
+
* same number (`TOKEN_SUPPLY_FROM_FLOOR_DAYS`). */
|
|
62
|
+
export const WRUN_TOKEN_SUPPLY_LOOKBACK_DAYS = 90;
|
|
63
|
+
/** The names a refusal quotes as examples, when the table lists them; the table's first names
|
|
64
|
+
* fill in for any it does not. */
|
|
65
|
+
const EXAMPLE_TOKEN_NAMES = ['Bitcoin', 'Ethereum', 'Solana'];
|
|
66
|
+
const EXAMPLE_COUNT = 3;
|
|
67
|
+
function isWrunTokenNamesTable(value) {
|
|
68
|
+
if (value === null || typeof value !== 'object')
|
|
69
|
+
return false;
|
|
70
|
+
const entries = Object.entries(value);
|
|
71
|
+
return entries.length > 0 && entries.every(([coin, name]) => coin !== '' && typeof name === 'string' && name !== '');
|
|
72
|
+
}
|
|
73
|
+
/** A few display names of the table, for a refusal: the well-known ones it lists first. */
|
|
74
|
+
export function wrunTokenSupplyExampleNames(table) {
|
|
75
|
+
const names = Object.values(table);
|
|
76
|
+
const examples = EXAMPLE_TOKEN_NAMES.filter((name) => names.includes(name));
|
|
77
|
+
for (const name of names) {
|
|
78
|
+
if (examples.length >= EXAMPLE_COUNT)
|
|
79
|
+
break;
|
|
80
|
+
if (!examples.includes(name))
|
|
81
|
+
examples.push(name);
|
|
82
|
+
}
|
|
83
|
+
return examples.slice(0, EXAMPLE_COUNT);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The coin an input's `token` knob names, by reverse lookup in the table (the display name,
|
|
87
|
+
* matched exactly), and the name as the table spells it: the control's ask. Refused by name:
|
|
88
|
+
* no token, a token spelled in another case (the refusal names the table's spelling), a token
|
|
89
|
+
* the table does not list (the refusal says the chart serves the tokens the table lists and
|
|
90
|
+
* names a few).
|
|
91
|
+
*/
|
|
92
|
+
export function wrunTokenSupplyCoinOf(source, ctx, table) {
|
|
93
|
+
const examples = `${wrunTokenSupplyExampleNames(table).join(', ')}, ...`;
|
|
94
|
+
const token = source.token;
|
|
95
|
+
if (typeof token !== 'string' || token === '') {
|
|
96
|
+
return refuseWrunPollInput(ctx, `names no token: declare token, the token's display name as the chart's table spells it (${examples})`);
|
|
97
|
+
}
|
|
98
|
+
for (const [coin, name] of Object.entries(table)) {
|
|
99
|
+
if (name === token)
|
|
100
|
+
return { coin, tokenName: name };
|
|
101
|
+
}
|
|
102
|
+
const folded = token.trim().toLowerCase();
|
|
103
|
+
const spelled = Object.values(table).find((name) => name.toLowerCase() === folded);
|
|
104
|
+
if (spelled !== undefined) {
|
|
105
|
+
return refuseWrunPollInput(ctx, `declares token '${token}': the table spells it '${spelled}' (display names match exactly, case included)`);
|
|
106
|
+
}
|
|
107
|
+
const count = Object.keys(table).length;
|
|
108
|
+
return refuseWrunPollInput(ctx, `declares token '${token}': the chart serves the ${count} tokens its table lists, by display name (${examples})`);
|
|
109
|
+
}
|
|
110
|
+
let tokenNamesLoad;
|
|
111
|
+
/** The kit's table, loaded once through the kit seam; undefined when the vendored kit exports
|
|
112
|
+
* none (a re-vendor that dropped it). A failed load is retried on the next plan. */
|
|
113
|
+
function loadWrunTokenNames() {
|
|
114
|
+
tokenNamesLoad ??= wrunChartHostEnv()
|
|
115
|
+
.transport.loadWrunKit()
|
|
116
|
+
.then(({ wrunIndicatorKit }) => {
|
|
117
|
+
const table = wrunIndicatorKit.WRUN_TOKEN_NAMES;
|
|
118
|
+
return isWrunTokenNamesTable(table) ? table : undefined;
|
|
119
|
+
}, (error) => {
|
|
120
|
+
tokenNamesLoad = undefined;
|
|
121
|
+
throw error;
|
|
122
|
+
});
|
|
123
|
+
return tokenNamesLoad;
|
|
124
|
+
}
|
|
125
|
+
/** One input against the kit's table, before any fetch: the control's ask `{ coin, tokenName }`
|
|
126
|
+
* or a refusal by name. */
|
|
127
|
+
async function planWrunTokenSupply(source, ctx) {
|
|
128
|
+
const table = await loadWrunTokenNames();
|
|
129
|
+
if (table === undefined) {
|
|
130
|
+
return refuseWrunPollInput(ctx, 'cannot be planned: the vendored indicator kit exports no WRUN_TOKEN_NAMES table');
|
|
131
|
+
}
|
|
132
|
+
return wrunTokenSupplyCoinOf({ token: source.token }, ctx, table);
|
|
133
|
+
}
|
|
134
|
+
export const lane = {
|
|
135
|
+
sourceClass: WRUN_TOKEN_SUPPLY_SOURCE_CLASS,
|
|
136
|
+
laneKey: 'token_supply',
|
|
137
|
+
kType: 'token_supply',
|
|
138
|
+
fields: WRUN_TOKEN_SUPPLY_FIELDS,
|
|
139
|
+
plan: planWrunTokenSupply,
|
|
140
|
+
join: { kind: 'daily', landing: 'last', lookbackDays: WRUN_TOKEN_SUPPLY_LOOKBACK_DAYS },
|
|
141
|
+
interval: '1d',
|
|
142
|
+
label: 'Token supply',
|
|
143
|
+
// The token is named by the knob, never by the chart's market: served on every chart.
|
|
144
|
+
global: true,
|
|
145
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `treasury_balance` on the browser lane: Binance's own balance of one asset, in coins of that
|
|
3
|
+
* asset (its liability minus its customer liability, the number the legacy
|
|
4
|
+
* `K_BINANCE_TREASURY_BALANCE` control emits off `BINANCE_PROOF_OF_RESERVES_AGG`). Binance today.
|
|
5
|
+
*
|
|
6
|
+
* One field, `balance`. One knob, `asset`: an upper-case ticker (the kit validates its spelling);
|
|
7
|
+
* absent, the input reads the chart's coin. Two inputs naming different assets fetch separately;
|
|
8
|
+
* an input naming the chart's own coin and one naming none share the fetch.
|
|
9
|
+
*
|
|
10
|
+
* The series is published MONTHLY, so it rides the daily join with landing `last`: the lane asks
|
|
11
|
+
* `1d` on every chart (the restriction table refuses the type at intraday intervals, so the ask
|
|
12
|
+
* names the day and the control honors `settings.interval`), and a bar reads the newest
|
|
13
|
+
* observation at or before its day under `carry`. The lookback reaches 400 days before the
|
|
14
|
+
* window so a monthly observation stands at the window's head even on a short intraday chart.
|
|
15
|
+
*/
|
|
16
|
+
import { type WrunPollLane, type WrunPollLaneContext } from '../wrun-poll-lane.types.js';
|
|
17
|
+
export declare const WRUN_TREASURY_BALANCE_SOURCE_CLASS = "treasury_balance";
|
|
18
|
+
/** The series is published monthly: the window head needs the observation standing before it,
|
|
19
|
+
* and a window opening a day after a publication waits a month for the next one. */
|
|
20
|
+
export declare const WRUN_TREASURY_BALANCE_LOOKBACK_DAYS = 400;
|
|
21
|
+
/** The asset the input reads: its `asset` knob (off the declaration's knobs, as the lane sees
|
|
22
|
+
* them), else the chart's coin; refused by name when neither is available (a chart with no
|
|
23
|
+
* coin, such as an unresolved market). */
|
|
24
|
+
export declare function wrunTreasuryBalanceAsset(source: Readonly<Record<string, unknown>>, ctx: Pick<WrunPollLaneContext, 'inputName' | 'sourceClass' | 'coin' | 'indexMode'>): string;
|
|
25
|
+
export declare const lane: WrunPollLane;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `treasury_balance` on the browser lane: Binance's own balance of one asset, in coins of that
|
|
3
|
+
* asset (its liability minus its customer liability, the number the legacy
|
|
4
|
+
* `K_BINANCE_TREASURY_BALANCE` control emits off `BINANCE_PROOF_OF_RESERVES_AGG`). Binance today.
|
|
5
|
+
*
|
|
6
|
+
* One field, `balance`. One knob, `asset`: an upper-case ticker (the kit validates its spelling);
|
|
7
|
+
* absent, the input reads the chart's coin. Two inputs naming different assets fetch separately;
|
|
8
|
+
* an input naming the chart's own coin and one naming none share the fetch.
|
|
9
|
+
*
|
|
10
|
+
* The series is published MONTHLY, so it rides the daily join with landing `last`: the lane asks
|
|
11
|
+
* `1d` on every chart (the restriction table refuses the type at intraday intervals, so the ask
|
|
12
|
+
* names the day and the control honors `settings.interval`), and a bar reads the newest
|
|
13
|
+
* observation at or before its day under `carry`. The lookback reaches 400 days before the
|
|
14
|
+
* window so a monthly observation stands at the window's head even on a short intraday chart.
|
|
15
|
+
*/
|
|
16
|
+
import { refuseWrunPollInput } from '../wrun-poll-lane.types.js';
|
|
17
|
+
export const WRUN_TREASURY_BALANCE_SOURCE_CLASS = 'treasury_balance';
|
|
18
|
+
/** The series is published monthly: the window head needs the observation standing before it,
|
|
19
|
+
* and a window opening a day after a publication waits a month for the next one. */
|
|
20
|
+
export const WRUN_TREASURY_BALANCE_LOOKBACK_DAYS = 400;
|
|
21
|
+
/** The asset the input reads: its `asset` knob (off the declaration's knobs, as the lane sees
|
|
22
|
+
* them), else the chart's coin; refused by name when neither is available (a chart with no
|
|
23
|
+
* coin, such as an unresolved market). */
|
|
24
|
+
export function wrunTreasuryBalanceAsset(source, ctx) {
|
|
25
|
+
const declared = typeof source.asset === 'string' && source.asset !== '' ? source.asset : undefined;
|
|
26
|
+
if (declared === undefined && ctx.indexMode) {
|
|
27
|
+
// A stock, forex, commodity or DEX chart names no coin the venue holds.
|
|
28
|
+
return refuseWrunPollInput(ctx, "names no asset, and this chart's market is no coin of the venue's treasury: declare asset (an upper-case ticker such as BTC)");
|
|
29
|
+
}
|
|
30
|
+
const asset = declared ?? ctx.coin;
|
|
31
|
+
if (!asset) {
|
|
32
|
+
return refuseWrunPollInput(ctx, "names no asset and this chart's market has no coin: declare asset (an upper-case ticker such as BTC)");
|
|
33
|
+
}
|
|
34
|
+
return asset;
|
|
35
|
+
}
|
|
36
|
+
export const lane = {
|
|
37
|
+
sourceClass: WRUN_TREASURY_BALANCE_SOURCE_CLASS,
|
|
38
|
+
laneKey: 'treasury_balance',
|
|
39
|
+
kType: 'binance_treasury_balance',
|
|
40
|
+
fields: { balance: 1 },
|
|
41
|
+
plan: (source, ctx) => ({ asset: wrunTreasuryBalanceAsset(source, ctx) }),
|
|
42
|
+
join: { kind: 'daily', landing: 'last', lookbackDays: WRUN_TREASURY_BALANCE_LOOKBACK_DAYS },
|
|
43
|
+
interval: '1d',
|
|
44
|
+
label: 'Treasury balance',
|
|
45
|
+
// The asset is a knob (or the chart's coin where it has one): served on every chart.
|
|
46
|
+
global: true,
|
|
47
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `volatility_index` poll lane: the Deribit volatility index (DVOL) of the chart's coin, in
|
|
3
|
+
* index points, served off the chart's `K_DERIBIT_VOLATILITY_INDEX` control (the fetch rides
|
|
4
|
+
* `kType` `deribit_volatility_index`). The control asks `VOLATILITY_INDEX_AGG` as
|
|
5
|
+
* `DERIBIT|<coin>_usd` from the coin the payload carries and answers one dense row per chart bar,
|
|
6
|
+
* `[ts, open, high, low, close]`, so the four fields exact-join the chart's bar opens.
|
|
7
|
+
*
|
|
8
|
+
* The ask carries `coin: 'currentCoin'` (a placeholder the chart's fetch resolves to the chart's
|
|
9
|
+
* own coin before the control reads `settings.coin`); every input of the class answers the same
|
|
10
|
+
* extras, so they share ONE fetch and one buffer. No knobs, and no pre-fetch refusal: DVOL has
|
|
11
|
+
* data on BTC and ETH, and another coin's ask answers empty, which the host's empty-answer rule
|
|
12
|
+
* turns into the labeled "data is unavailable" refusal unless every input reading the lane
|
|
13
|
+
* declares `missing: "nan"` or `"zero"`. A 1s chart is refused the same way, by the chart's fetch
|
|
14
|
+
* gate (an answer of nothing).
|
|
15
|
+
*/
|
|
16
|
+
import type { WrunPollLane } from '../wrun-poll-lane.types.js';
|
|
17
|
+
/** The payload fields every `volatility_index` ask carries beyond the market placeholders. */
|
|
18
|
+
export declare const WRUN_VOLATILITY_INDEX_EXTRAS: Readonly<{
|
|
19
|
+
coin: "currentCoin";
|
|
20
|
+
}>;
|
|
21
|
+
export declare const lane: WrunPollLane;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** The payload fields every `volatility_index` ask carries beyond the market placeholders. */
|
|
2
|
+
export const WRUN_VOLATILITY_INDEX_EXTRAS = Object.freeze({ coin: 'currentCoin' });
|
|
3
|
+
export const lane = {
|
|
4
|
+
sourceClass: 'volatility_index',
|
|
5
|
+
laneKey: 'volatility_index',
|
|
6
|
+
kType: 'deribit_volatility_index',
|
|
7
|
+
fields: { open: 1, high: 2, low: 3, close: 4 },
|
|
8
|
+
plan: () => WRUN_VOLATILITY_INDEX_EXTRAS,
|
|
9
|
+
join: 'bar',
|
|
10
|
+
label: 'Volatility index',
|
|
11
|
+
};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import type { GateProvider } from '../../../workers/constants/socket-slots.js';
|
|
2
|
+
import { type WrunPollLaneContext } from './wrun-poll-lane.types.js';
|
|
3
|
+
import { wrunLaneChainPlaneOf, type WrunLaneChainPlane } from './wrun-row-lane.types.js';
|
|
4
|
+
import { type WrunOptionsChainCryptoVenues, type WrunOptionsChainDecision, type WrunOptionsChainRefusal, type WrunOptionsChartSource } from '../wrun-options-chain.util.js';
|
|
5
|
+
import { type WrunRefusalSeed } from '../wrun-refusal.util.js';
|
|
6
|
+
import type { OpraOptionPlaneStop } from '../../../host-ports.types.js';
|
|
7
|
+
type LaneCtx = Pick<WrunPollLaneContext, 'inputName' | 'sourceClass' | 'coin' | 'exchange' | 'symbol'>;
|
|
8
|
+
/** The chart market a lane resolves its chain for, keyed (one resolution per chart per run). */
|
|
9
|
+
export declare function wrunLaneChartKey(ctx: Pick<WrunPollLaneContext, 'exchange' | 'symbol' | 'coin'>): string;
|
|
10
|
+
/** The chart's options chain as the chart's own options controls resolve it (`resolveOptionsChartSource`), or the
|
|
11
|
+
* plane whose chain directory itself failed (the run's own rule for the options chain: a CME futures chart, or a
|
|
12
|
+
* chart on the OPRA plane; any other resolver failure fails the run). */
|
|
13
|
+
export interface WrunLaneChartChain {
|
|
14
|
+
chartSource?: WrunOptionsChartSource;
|
|
15
|
+
directoryFailed?: GateProvider;
|
|
16
|
+
/** The chart's options list on OPRA but ride no plane for this known reason (opra-options-gate.util
|
|
17
|
+
* `opraOptionPlaneStop`: the `opra` flag dark, an index chart): every chain decision over this chart says it. */
|
|
18
|
+
opraStop?: OpraOptionPlaneStop;
|
|
19
|
+
/** The plane the chart's chain lists on while another screen holds its one session (gate-session-latch.util): no
|
|
20
|
+
* directory read was sent (its reader dials nothing until the take-back, so the read would wait out its budget),
|
|
21
|
+
* and every chain decision over the chart stops with `session-elsewhere` on that plane. */
|
|
22
|
+
heldElsewhere?: GateProvider;
|
|
23
|
+
}
|
|
24
|
+
/** The chart's metadata as the chain resolution reads it: its market and category (pb-common `Category`). */
|
|
25
|
+
export interface WrunChainChartMetadata {
|
|
26
|
+
exchange?: unknown;
|
|
27
|
+
symbol?: unknown;
|
|
28
|
+
coin?: unknown;
|
|
29
|
+
category?: unknown;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the chart's chain (lazy imports: the resolver reaches the chain directory service): the ONE resolution every
|
|
33
|
+
* chain class reads, the options chain lane's (over the chart's own metadata) and each row lane's
|
|
34
|
+
* (`resolveWrunLaneChartChain`, over its context's market and category). The chart's options controls' resolver
|
|
35
|
+
* (`resolveOptionsChartSource`: an option contract chart on a crypto venue reads its own contract's chain), and a chain
|
|
36
|
+
* directory's own failure on a chart its plane governs (a CME futures chart, a chart on the OPRA plane) as that plane's
|
|
37
|
+
* evidence; any other resolver failure fails the run. Off every plane, the chart's stop reason rides along
|
|
38
|
+
* (`opraStop`, opra-options-gate.util `opraOptionPlaneStop`: the `opra` flag dark, an index chart), so every chain
|
|
39
|
+
* decision over the chart says why it reads no US chain. On a plane another screen holds the session of, nothing is
|
|
40
|
+
* read (`heldElsewhere`): the chain stops by that name at once.
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveWrunChartChain(metadata: WrunChainChartMetadata | undefined): Promise<WrunLaneChartChain>;
|
|
43
|
+
/** Resolve the chart's chain for a lane: `resolveWrunChartChain` over the lane context's market and category. */
|
|
44
|
+
export declare function resolveWrunLaneChartChain(ctx: Pick<WrunPollLaneContext, 'exchange' | 'symbol' | 'coin' | 'category'>): Promise<WrunLaneChartChain>;
|
|
45
|
+
/**
|
|
46
|
+
* The OPRA chain an OPRA-only lane reads on this chart (`option_contract_state`: admitted only where the chart's
|
|
47
|
+
* options ride the OPRA plane): its exchange and underlying, or a refusal by name with the options chain's own seeds
|
|
48
|
+
* (the directory did not answer: a service that did not answer; no chain: no options here). A wrapper over the chart's
|
|
49
|
+
* chain resolution, its words unchanged, for the OPRA-only lanes that still import it.
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveWrunLaneOpraChain(ctx: LaneCtx): Promise<{
|
|
52
|
+
exchange: string;
|
|
53
|
+
underlying: string;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* The underlying the OPRA plane keys an OPRA-only lane's series by (`option_prints`, `option_contract_flow`: a US
|
|
57
|
+
* stock or ETF chart's ticker, an OPRA contract chart's underlying, upper case), or a refusal by name before any
|
|
58
|
+
* fetch: any failure of the chart's chain resolution is the US directory that did not answer (`service-no-answer` /
|
|
59
|
+
* `opra-directory`, Retry), and a chart OPRA lists no options for is `no-options` / `chain`. A wrapper over the
|
|
60
|
+
* chart's chain resolution, its words unchanged (wrun-opra-underlying.util re-exports it for its importers).
|
|
61
|
+
*/
|
|
62
|
+
export declare function resolveWrunOpraLaneUnderlying(ctx: LaneCtx): Promise<string>;
|
|
63
|
+
/** The crypto venue words a chain decision reads on this chart: on the OPRA plane no crypto venue lists a US
|
|
64
|
+
* stock's options (the words refuse by the flag alone, no listing asked); anywhere else the run's own resolver
|
|
65
|
+
* over every crypto word (the listing is asked once per coin, and only with the crypto-options gate on). */
|
|
66
|
+
export declare function resolveWrunLaneCryptoVenues(chain: WrunLaneChartChain, chartCoin: string): Promise<WrunOptionsChainCryptoVenues>;
|
|
67
|
+
export { wrunLaneChainPlaneOf, type WrunLaneChainPlane };
|
|
68
|
+
/** The `book` knob's default word: the series named after the chain's coin, else the first series in series order,
|
|
69
|
+
* resolved to that one series when the run plans (`decideWrunLaneChain`), never per answer. */
|
|
70
|
+
export declare const WRUN_LANE_CHAIN_BOOK_AUTO = "auto";
|
|
71
|
+
/**
|
|
72
|
+
* The series (the book) a listed option belongs to, as the data plane names it: tsdb-gateway optionstats `SeriesKey`,
|
|
73
|
+
* ported. The segments of the symbol before its first expiry token, joined by '-' (Deribit `BTC_USDC-16OCT26-...` is
|
|
74
|
+
* BTC_USDC, OKX `BTC-USD_UM-260926-...` BTC-USD_UM, Bullish `BTC-USDC-20260926-...` BTC-USDC); the coin itself for a
|
|
75
|
+
* symbol that spells no expiry (CME `ESH7 C10000`, OPRA's OSI symbols) or leads with it. Upper case.
|
|
76
|
+
*/
|
|
77
|
+
export declare function wrunOptionSeriesOf(coin: string, rawSymbol: string): string;
|
|
78
|
+
/**
|
|
79
|
+
* The default book over a chain's series (D11): the series named after the chain's underlying (the coin the surface
|
|
80
|
+
* job files the chain under: a crypto venue's root coin, the CME futures contract, the OPRA ticker), else the first
|
|
81
|
+
* series in byte order (the job's own order). A chain listing none reads the underlying's own series. Upper case.
|
|
82
|
+
*/
|
|
83
|
+
export declare function wrunLaneChainDefaultBook(series: Iterable<string>, underlying: string): string;
|
|
84
|
+
/** The chain one input of a chain lane reads (the one resolver's answer, `decideWrunLaneChain`). */
|
|
85
|
+
export interface WrunLaneChain {
|
|
86
|
+
plane: WrunLaneChainPlane;
|
|
87
|
+
/** The pb-common exchange name the chain lists on (the venue table's, or the governed chain directory's). */
|
|
88
|
+
exchange: string;
|
|
89
|
+
/** The key the chain's plane files its series under: the OPRA ticker, the CME futures contract (a continuous
|
|
90
|
+
* alias resolved to the contract leading it now), the crypto venue's root coin (never its trade key). */
|
|
91
|
+
underlying: string;
|
|
92
|
+
/** The chain's coin as the chart and the refusals name it: a crypto chain's root coin, the OPRA ticker, the CME
|
|
93
|
+
* chart's coin (its root) or, when the chart names none, the contract. */
|
|
94
|
+
coin: string;
|
|
95
|
+
/** The ONE book read, a series name upper case, decided when the run plans: the input's pinned series, or for
|
|
96
|
+
* `auto` the chain's default book (`WrunLaneChainChart.autoBook`). Never `auto`, never picked per answer. */
|
|
97
|
+
book: string;
|
|
98
|
+
/** A CME chain read off a continuous chart: the alias (`ES1!`) whose lead `underlying` is. */
|
|
99
|
+
continuous?: string;
|
|
100
|
+
}
|
|
101
|
+
/** A decided chain before its book: what the default book is resolved for. */
|
|
102
|
+
export type WrunLaneChainOfBook = Omit<WrunLaneChain, 'book'>;
|
|
103
|
+
/** What the one resolver reads for a chart, resolved ONCE per run before any input's knobs are decided
|
|
104
|
+
* (`resolveWrunLaneChainChart`): the chart's chain, the crypto venue words on it, the Deribit listing, each venue
|
|
105
|
+
* word's exchange, a continuous CME chart's lead contract, and each decided chain's default book. */
|
|
106
|
+
export interface WrunLaneChainChart {
|
|
107
|
+
chain: WrunLaneChartChain;
|
|
108
|
+
cryptoVenues: WrunOptionsChainCryptoVenues;
|
|
109
|
+
deribitListed: (coin: string) => boolean;
|
|
110
|
+
/** The exchange a plain venue word's chain lists on (the venue table's first exchange of its row). */
|
|
111
|
+
venueExchange: (word: string) => string | undefined;
|
|
112
|
+
/** A CME chart whose chain underlies a continuous alias: the alias and the contract leading it now (null: the
|
|
113
|
+
* lead could not be resolved). */
|
|
114
|
+
cmeLead?: {
|
|
115
|
+
alias: string;
|
|
116
|
+
contract: string | null;
|
|
117
|
+
};
|
|
118
|
+
/** The book `auto` reads on a decided chain (`resolveWrunLaneChainAutoBook`), asked once per chain per run. */
|
|
119
|
+
autoBook: (chain: WrunLaneChainOfBook) => Promise<string>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The book `auto` reads on a decided chain (D11), resolved when the run plans, from the chain's own listing and never
|
|
123
|
+
* from the rows an answer holds, so every ask of one instance (each tier segment, the coarser tier's fallback, each
|
|
124
|
+
* live reconcile) reads the same book:
|
|
125
|
+
* - a CME or OPRA chain: the underlying's own series. Their symbols spell no series (`ESH7 C10000`, OPRA's OSI
|
|
126
|
+
* symbols), so `SeriesKey` files every contract of the chain under the underlying itself: the chain has that one
|
|
127
|
+
* book, and no directory is asked.
|
|
128
|
+
* - a crypto chain: the default book (`wrunLaneChainDefaultBook`) over the series the chain directory lists (the
|
|
129
|
+
* option chain service of the chain's exchange, `optionChainServiceForExchange`: its expiries, then each expiry's
|
|
130
|
+
* instruments, the registry rows the surface job measures), each raw symbol's series by `wrunOptionSeriesOf`. The
|
|
131
|
+
* nearest expiry is read first, and listing the underlying's own series there ends the read (the rule over every
|
|
132
|
+
* expiry picks that series too); otherwise every expiry is read.
|
|
133
|
+
* - a crypto chain whose directory lists no instrument or does not answer: the underlying's own series, the default
|
|
134
|
+
* rule's first choice and the one series name every chain spells without its directory (the job writes it with no
|
|
135
|
+
* series tail). A chain listing no such series (OKX's BTC-USD and BTC-USD_UM) then reads that book empty, until a
|
|
136
|
+
* run whose directory read answers.
|
|
137
|
+
*/
|
|
138
|
+
export declare function resolveWrunLaneChainAutoBook(chain: WrunLaneChainOfBook): Promise<string>;
|
|
139
|
+
/**
|
|
140
|
+
* Resolve the chart for the one chain resolver (lazy imports: the chain directory, the venue listing and table, the
|
|
141
|
+
* continuous lead resolver): the chart's chain (`resolveWrunLaneChartChain`, the options chain lane's own, or the
|
|
142
|
+
* chain the caller already holds, `held`: the OPRA plane's own by coin, `wrunLaneOpraPlaneChain`), the crypto venue
|
|
143
|
+
* words (`resolveWrunLaneCryptoVenues`), for a CME chain on a continuous alias the contract leading it now
|
|
144
|
+
* (option-chain.service `resolveChainContract`, the roll rule the terminal identity admits the alias by), and each
|
|
145
|
+
* decided chain's default book (`resolveWrunLaneChainAutoBook`, asked once per chain for this chart).
|
|
146
|
+
*/
|
|
147
|
+
export declare function resolveWrunLaneChainChart(ctx: Pick<WrunPollLaneContext, 'exchange' | 'symbol' | 'coin' | 'category'>, held?: WrunLaneChartChain): Promise<WrunLaneChainChart>;
|
|
148
|
+
/**
|
|
149
|
+
* The chart's chain on the OPRA plane, read off the plane itself: OPRA's chain of the chart's own underlying (its coin,
|
|
150
|
+
* upper case: a stock or ETF chart's ticker, an OPRA contract chart's underlying), on the plane's one exchange (the
|
|
151
|
+
* governed set's, never a literal). For a lane that reads by coin there (`option_daily`, `option_stats_10m`: their OPRA
|
|
152
|
+
* reads went by coin before the chain resolver, and stay byte-identical), handed to `resolveWrunLaneChainChart` in
|
|
153
|
+
* place of the chain directory's answer: no directory is read, so a stock listing no options, or a directory slow or
|
|
154
|
+
* failing, refuses nothing before the read (an empty answer, and the empty-answer rule speaks). The venue and book words
|
|
155
|
+
* are still decided over it (`decideWrunLaneChain`), with no read either.
|
|
156
|
+
*/
|
|
157
|
+
export declare function wrunLaneOpraPlaneChain(coin: string): WrunLaneChartChain;
|
|
158
|
+
/** Who a venue decision is for: the input, the chart market (and the label a refusal names it by, `EXCHANGE/SYMBOL`
|
|
159
|
+
* by default) and the run's OPRA facts. */
|
|
160
|
+
export interface WrunLaneChainDecider {
|
|
161
|
+
inputName: string;
|
|
162
|
+
exchange: string;
|
|
163
|
+
symbol: string;
|
|
164
|
+
coin: string;
|
|
165
|
+
official?: boolean;
|
|
166
|
+
opraUserScripts?: boolean;
|
|
167
|
+
marketLabel?: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* The ONE venue decision of every chain class (the options chain lane, `option_surface`): one input's `venue` word
|
|
171
|
+
* against the chart's resolved chain, by the options chain decision (`decideWrunOptionsChainIdentity`: `auto` reads
|
|
172
|
+
* the chart's own options market, a CME future's, a US stock's or a crypto option contract's, else the coin's Deribit
|
|
173
|
+
* chain, else the first venue whose listing names the coin; a pinned word that venue's chain; the `crypto-options`
|
|
174
|
+
* flag, the listing, the directory and the OPRA wall by name). A refusal comes back as the decision's own.
|
|
175
|
+
*/
|
|
176
|
+
export declare function decideWrunLaneChainIdentity(chart: Pick<WrunLaneChainChart, 'chain' | 'cryptoVenues' | 'deribitListed'>, venue: unknown, who: WrunLaneChainDecider): WrunOptionsChainDecision;
|
|
177
|
+
/** The input's `book`, validated: `auto` (absent too) or one series name upper case, else a refusal by name
|
|
178
|
+
* (`wrun_option_knob_invalid`, om's one name for an options knob outside its words). */
|
|
179
|
+
export declare function wrunLaneChainBook(value: unknown, ctx: {
|
|
180
|
+
inputName: string;
|
|
181
|
+
sourceClass: string;
|
|
182
|
+
}): string;
|
|
183
|
+
/**
|
|
184
|
+
* The ONE chain resolver's decision for one input, over the chart `resolveWrunLaneChainChart` resolved: its `venue`
|
|
185
|
+
* word decided by the venue decision every chain class shares (`decideWrunLaneChainIdentity`, so `auto` reads exactly
|
|
186
|
+
* the chain `options_chain`'s `auto` reads on the same chart), then its `book`, ONE series decided here (a pinned
|
|
187
|
+
* series, or for `auto` the chain's default book, `WrunLaneChainChart.autoBook`). The answer names the plane, the
|
|
188
|
+
* exchange, the underlying the plane files the series under (a CME continuous alias read as the contract leading it
|
|
189
|
+
* now), the coin and the book. Refuses by name with the options chain's own reasons and seeds (a coin no venue lists:
|
|
190
|
+
* `no-chain`), a continuous CME chart whose lead cannot be resolved (`cme-unresolved`, Retry), and a book outside its
|
|
191
|
+
* words.
|
|
192
|
+
*/
|
|
193
|
+
export declare function decideWrunLaneChain(chart: WrunLaneChainChart, knobs: {
|
|
194
|
+
venue?: unknown;
|
|
195
|
+
book?: unknown;
|
|
196
|
+
}, ctx: LaneCtx & Pick<WrunPollLaneContext, 'official' | 'opraUserScripts'>): Promise<WrunLaneChain>;
|
|
197
|
+
/**
|
|
198
|
+
* The record seed of a refused chain decision: the run's own mapping for the options chain
|
|
199
|
+
* (wrun-overlay-run.util `wrunOptionsChainRefusalSeed`, which this light module cannot import; a spec pins the two
|
|
200
|
+
* equal for every reason).
|
|
201
|
+
*/
|
|
202
|
+
export declare function wrunLaneChainRefusalSeed(refusal: Pick<WrunOptionsChainRefusal, 'reason' | 'venueName' | 'coin' | 'stop' | 'plane'>): WrunRefusalSeed;
|
|
203
|
+
/** A refused chain decision as the error a lane refuses with: the decision's technical words with the input's class
|
|
204
|
+
* in place of `options_chain` (om names the class it reads), and its record's seed. */
|
|
205
|
+
export declare function wrunLaneChainRefusalError(refusal: WrunOptionsChainRefusal, sourceClass: string): Error;
|
|
206
|
+
/**
|
|
207
|
+
* Whether a chain read off a continuous alias no longer names the contract leading it (D12): the lead resolver's last
|
|
208
|
+
* answer (`peekRegisteredContinuousLead`) for the alias on the chain's exchange names another contract than the one
|
|
209
|
+
* the run planned. A chain lane's `acquisitionMoved` reads it over its own acquisition fields, so a live session
|
|
210
|
+
* holding the old contract's rows rebuilds instead of joining the next contract's tail to them. A read off no alias,
|
|
211
|
+
* and a lead not resolved yet, moved nothing.
|
|
212
|
+
*/
|
|
213
|
+
export declare function wrunLaneChainLeadMoved(exchange: unknown, alias: unknown, planned: unknown): boolean;
|
|
214
|
+
/** Refuse a knob the class does not take, by name (om's sheet refusal for a stray knob). */
|
|
215
|
+
export declare function refuseWrunLaneStrayKnob(ctx: Pick<WrunPollLaneContext, 'inputName' | 'sourceClass'>, knob: string, owners: string): never;
|