@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,144 @@
|
|
|
1
|
+
import type { WrunRowLaneHorizon } from './sources/wrun-row-lane.types.js';
|
|
2
|
+
/** The gateway type the class reads, by name (the protocol package names it from its release). */
|
|
3
|
+
export declare const WRUN_OPTION_PRINT_TYPE = "OPTION_PRINT";
|
|
4
|
+
/** f64s per tuple, the `present` mask included. */
|
|
5
|
+
export declare const WRUN_OPTION_PRINTS_WIDTH = 16;
|
|
6
|
+
/** The tuple's columns. */
|
|
7
|
+
export declare const WRUN_OPTION_PRINT_COLUMN: Readonly<{
|
|
8
|
+
readonly offset: 0;
|
|
9
|
+
readonly key: 1;
|
|
10
|
+
readonly root: 2;
|
|
11
|
+
readonly expiry: 3;
|
|
12
|
+
readonly side: 4;
|
|
13
|
+
readonly strike: 5;
|
|
14
|
+
readonly price: 6;
|
|
15
|
+
readonly size: 7;
|
|
16
|
+
readonly premium: 8;
|
|
17
|
+
readonly aggressor: 9;
|
|
18
|
+
readonly outside: 10;
|
|
19
|
+
readonly underlying: 11;
|
|
20
|
+
readonly iv: 12;
|
|
21
|
+
readonly delta: 13;
|
|
22
|
+
readonly venue: 14;
|
|
23
|
+
readonly present: 15;
|
|
24
|
+
}>;
|
|
25
|
+
/** The `present` bits by name (14, the partial bar, is the shared one). */
|
|
26
|
+
export declare const WRUN_OPTION_PRINT_BIT: Readonly<{
|
|
27
|
+
readonly iv: 0;
|
|
28
|
+
readonly delta: 1;
|
|
29
|
+
readonly underlying: 2;
|
|
30
|
+
readonly quote: 3;
|
|
31
|
+
readonly forward: 4;
|
|
32
|
+
}>;
|
|
33
|
+
/** The large-print floors the gateway copies prints into `option_print_large` by (its write and read charts). */
|
|
34
|
+
export declare const WRUN_OPTION_PRINT_LARGE_MIN_PREMIUM = 25000;
|
|
35
|
+
export declare const WRUN_OPTION_PRINT_LARGE_MIN_CONTRACTS = 150;
|
|
36
|
+
/** `option_print` keeps every print 3 days; `option_print_large` the large ones 90. */
|
|
37
|
+
export declare const WRUN_OPTION_PRINT_RAW_RETENTION_MS: number;
|
|
38
|
+
export declare const WRUN_OPTION_PRINT_LARGE_RETENTION_MS: number;
|
|
39
|
+
/** The gateway's bar limit on an unaggregated read (validateKiyoPlusBar: one point a minute, 15,000 on every tier),
|
|
40
|
+
* the trade tape's TRADES_LARGE_BAR_LIMIT_SEC too: a read opening before it is trimmed without a word. */
|
|
41
|
+
export declare const WRUN_OPTION_PRINT_BAR_LIMIT_MS: number;
|
|
42
|
+
/** How far inside a boundary the lane marks a bar whole: the gateway and the worker read their own clocks later than
|
|
43
|
+
* the run's (the queue, the wire), so a bar that opens within this of a boundary reads partial, never short. */
|
|
44
|
+
export declare const WRUN_OPTION_PRINT_CLOCK_MARGIN_MS: number;
|
|
45
|
+
export declare const WRUN_OPTION_PRINTS_HISTORY: readonly ["live", "3d", "90d"];
|
|
46
|
+
export type WrunOptionPrintsHistory = (typeof WRUN_OPTION_PRINTS_HISTORY)[number];
|
|
47
|
+
export declare const WRUN_OPTION_PRINTS_OVERFLOW: readonly ["refuse", "largest"];
|
|
48
|
+
export type WrunOptionPrintsOverflow = (typeof WRUN_OPTION_PRINTS_OVERFLOW)[number];
|
|
49
|
+
/** The acquisition an `option_prints` instance asks with (its payload's facets and identity). */
|
|
50
|
+
export interface WrunOptionPrintsAcquisition {
|
|
51
|
+
coin: string;
|
|
52
|
+
minPremium: number;
|
|
53
|
+
history: WrunOptionPrintsHistory;
|
|
54
|
+
overflow: WrunOptionPrintsOverflow;
|
|
55
|
+
/** "nearest:N" or "0dte"; absent is "all". */
|
|
56
|
+
expiries?: string;
|
|
57
|
+
}
|
|
58
|
+
/** An instance's payload as the acquisition it carries, or undefined when it names no valid floor or history. */
|
|
59
|
+
export declare function wrunOptionPrintsAcquisitionOf(extras: Readonly<Record<string, unknown>> | null | undefined): WrunOptionPrintsAcquisition | undefined;
|
|
60
|
+
/** Whether a payload is an `option_prints` lane ask the K control serves: it names the OPRA plane and an
|
|
61
|
+
* acquisition with a coin (a source asked any other way is declined, fail closed). */
|
|
62
|
+
export declare function isWrunOptionPrintsAsk(payload: Readonly<Record<string, unknown>> | null | undefined): boolean;
|
|
63
|
+
/** Whether the reader serves this floor from the large-print table (and so reaches back as far as it). */
|
|
64
|
+
export declare function wrunOptionPrintsReadsLargeTable(minPremium: number): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The span the backend serves an acquisition at the clock (the row lane's `horizon`): where its prints start (the
|
|
67
|
+
* table the floor and the history reach, never past the gateway's bar limit) and where they are whole (a "90d"
|
|
68
|
+
* floor below the large floor holds only the large prints past the raw table's 3 days).
|
|
69
|
+
*/
|
|
70
|
+
export declare function wrunOptionPrintsHorizon(extras: Readonly<Record<string, unknown>>, nowMs: number): WrunRowLaneHorizon | undefined;
|
|
71
|
+
/** One OPTION_PRINT read of a window `[fromMs, toMs)`: the floors that pick its table and filter its prints. */
|
|
72
|
+
export interface WrunOptionPrintRead {
|
|
73
|
+
fromMs: number;
|
|
74
|
+
toMs: number;
|
|
75
|
+
/** The premium floor, USD (the gateway's `minQuoteAmount`). */
|
|
76
|
+
minQuoteAmount: number;
|
|
77
|
+
/** The contracts floor (the gateway's `minAmount`). */
|
|
78
|
+
minAmount?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The reads a window needs at an acquisition's floor: one read at the floor (the reader picks the table), except a
|
|
82
|
+
* "90d" floor below the large floor, whose part older than the raw table's 3 days reads `option_print_large` twice,
|
|
83
|
+
* the large premiums (`minQuoteAmount` 25,000) and the large sizes at the floor (`minAmount` 150 with the floor), so
|
|
84
|
+
* the two together are every large print at or above the floor (a print in both is merged by its id).
|
|
85
|
+
*/
|
|
86
|
+
export declare function wrunOptionPrintReads(args: {
|
|
87
|
+
fromMs: number;
|
|
88
|
+
toMs: number;
|
|
89
|
+
minPremium: number;
|
|
90
|
+
history: WrunOptionPrintsHistory;
|
|
91
|
+
nowMs: number;
|
|
92
|
+
}): WrunOptionPrintRead[];
|
|
93
|
+
/** The print key of an id: its FNV-1a 64 hash, cut to the low 53 bits (an exact f64). Two 32-bit words, every
|
|
94
|
+
* product below 2^42, so the arithmetic is exact in doubles. */
|
|
95
|
+
export declare function wrunOptionPrintKey(id: string): number;
|
|
96
|
+
/** Why a print was dropped instead of tupled (counted, never a made-up value). */
|
|
97
|
+
export type WrunOptionPrintDrop = 'id' | 'time' | 'contract' | 'root' | 'value';
|
|
98
|
+
/** The prints this thread dropped since load, by reason (the lane's diagnostics: a refused root among them). */
|
|
99
|
+
export declare function wrunOptionPrintDrops(): Readonly<Record<WrunOptionPrintDrop, number>>;
|
|
100
|
+
/** Spec hook: zero the drop counters. */
|
|
101
|
+
export declare function __resetWrunOptionPrintDropsForTest(): void;
|
|
102
|
+
/** The print's time in ms off its Timestamp (whole seconds plus the milliseconds of its nanoseconds). */
|
|
103
|
+
export declare function wrunOptionPrintTimeMs(timestamp: unknown): number;
|
|
104
|
+
/** OptionPrintSide (NONE 0, ASK 1, BID 2, MID 3; a JSON reading names it) as the tuple's aggressor. */
|
|
105
|
+
export declare function wrunOptionPrintAggressor(side: unknown): 1 | -1 | 0 | 2;
|
|
106
|
+
/** A contract's OSI symbol read once (a chain's prints repeat a few thousand symbols): its root's code (undefined
|
|
107
|
+
* for a root the codec refuses) and its side. Bounded: cleared whole past `CONTRACT_CACHE_MAX` symbols. */
|
|
108
|
+
interface WrunOptionContract {
|
|
109
|
+
rootCode: number | undefined;
|
|
110
|
+
side: 'call' | 'put';
|
|
111
|
+
}
|
|
112
|
+
/** The contract an OSI symbol names (its root's code and side), or null for no OPRA contract symbol. */
|
|
113
|
+
export declare function wrunOptionContractOf(symbol: string): WrunOptionContract | null;
|
|
114
|
+
/** One print, tupled: its time and the knob facts the filters read beside the tuple (`offset_ms` 0 until landed). */
|
|
115
|
+
export interface WrunOptionPrint {
|
|
116
|
+
id: string;
|
|
117
|
+
tsMs: number;
|
|
118
|
+
/** The expiry's New York date minus the print's (0 on expiration day; the feed's JSON omits a zero). */
|
|
119
|
+
dteDays: number | undefined;
|
|
120
|
+
premium: number;
|
|
121
|
+
tuple: number[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* One OPRA print as the class's tuple, from the history shape (a reshaped protobuf-es message: int64 as bigint,
|
|
125
|
+
* enums as ids, unset optionals undefined) or the live shape (the feed's JSON: int64 as strings, enums as names,
|
|
126
|
+
* unset optionals omitted), so the two paths build the same tuple for the same print. `series` is the point's
|
|
127
|
+
* series (the contract: its OSI symbol, the underlying as coin, the option type). A print missing its id, time or
|
|
128
|
+
* contract, or whose root the codec refuses, is dropped and counted.
|
|
129
|
+
*/
|
|
130
|
+
export declare function wrunOptionPrintOf(print: Readonly<Record<string, unknown>> | null | undefined, series: Readonly<Record<string, unknown>> | null | undefined): WrunOptionPrint | WrunOptionPrintDrop;
|
|
131
|
+
/** Whether a print passes an acquisition's own filters: its floor, and "0dte" (expiring on the print's trade date). */
|
|
132
|
+
export declare function wrunOptionPrintKept(print: WrunOptionPrint, acquisition: WrunOptionPrintsAcquisition): boolean;
|
|
133
|
+
/** Whether a cell is a print tuple of the class: exactly 16 finite numbers. */
|
|
134
|
+
export declare function isWrunOptionPrintTuple(cell: unknown): cell is number[];
|
|
135
|
+
/** A bar's print tuples in the order they printed: by offset, then by key (two prints in one millisecond). */
|
|
136
|
+
export declare function wrunOptionPrintsInTimeOrder(tuples: ReadonlyArray<ReadonlyArray<number>>): number[][];
|
|
137
|
+
/**
|
|
138
|
+
* `overflow: "largest"` over a bar over its bound (om's packer rule, wrun-host/pack.ts `wrunLargestPremiumBlock`):
|
|
139
|
+
* the `maxCells` prints with the largest premium (an equal premium keeps the earlier print; a non-finite premium
|
|
140
|
+
* ranks last), laid out in the order they printed, bit 14 set on the FIRST kept print's `present` so the module reads
|
|
141
|
+
* the bar as partial. A bar within its bound is returned as it is.
|
|
142
|
+
*/
|
|
143
|
+
export declare function wrunLargestPremiumPrints(tuples: ReadonlyArray<ReadonlyArray<number>>, maxCells: number): ReadonlyArray<ReadonlyArray<number>>;
|
|
144
|
+
export {};
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `option_prints` class (UW-PARITY source contract v2, S3): one 16-value tuple per OPRA print of the chart's
|
|
3
|
+
* underlying at or above `min_premium`, on the bar it printed in, history plus live. Pure and light: the row lane
|
|
4
|
+
* (`sources/row-lanes/option_prints.ts`), its K control (`K_OPTION_PRINT`) and the worker twin read the same rules
|
|
5
|
+
* from here, so history and live build the same tuple for the same print.
|
|
6
|
+
*
|
|
7
|
+
* The tuple: `[offset_ms, print_key, root_code, expiry_ms, side_cp, strike, price, size, premium, aggressor, outside,
|
|
8
|
+
* underlying, iv, delta, venue, present]`.
|
|
9
|
+
* - `offset_ms`: the print's time minus the host bar's open (the landing re-bases it; the worker keys a print by its
|
|
10
|
+
* second, its offset the milliseconds inside it).
|
|
11
|
+
* - `print_key`: the print id's FNV-1a 64 hash cut to its low 53 bits, the same on history and live (the reconcile
|
|
12
|
+
* merges by it). The id is `<publisher>-<ts_event ns>-<symbol>-<price>-<size>-<k>` (the OptionPrint proto).
|
|
13
|
+
* - `root_code`: `encodeSymbol(root)` of the contract's OSI root; a root the codec refuses drops the print and is
|
|
14
|
+
* counted (`wrunOptionPrintDrops`), never a made-up code.
|
|
15
|
+
* - `side_cp` +1 call, -1 put; `aggressor` +1 ask, -1 bid, 0 mid, 2 none (the print against the NBBO midpoint);
|
|
16
|
+
* `outside` +1 above the ask, -1 below the bid, 0 inside (0 with no quote); `venue` the publisher id.
|
|
17
|
+
* - `present` bits: 0 iv, 1 delta, 2 underlying, 3 the quote was valid (bid and ask set, above 0, not crossed: the
|
|
18
|
+
* producer's own rule, so the side is not NONE), 4 the underlying is a forward, 14 the bar is partial.
|
|
19
|
+
*
|
|
20
|
+
* The backend (tsdb-gateway `pkg/tsdb/selects/option_print.go`): OPTION_PRINT is read by underlying (`coin`) from
|
|
21
|
+
* `option_print` (every print, kept 3 days) or, when the read's own floor reaches a large-print floor (premium
|
|
22
|
+
* >= 25,000 USD as `minQuoteAmount`, or size >= 150 contracts as `minAmount`), from `option_print_large` (those
|
|
23
|
+
* prints, kept 90 days). The floors AND. An unaggregated read is held to the gateway's bar limit (one point a minute,
|
|
24
|
+
* 15,000 on every tier: about 10.4 days back), trimmed without a word.
|
|
25
|
+
*
|
|
26
|
+
* `history` (om's words): "live" (the default) the live channel plus the history the run needs for the visible bars,
|
|
27
|
+
* read at the input's floor from whichever table the reader picks for it; "3d" every print of the last three days;
|
|
28
|
+
* "90d" up to 90 days of the large prints (premium 25,000 or size 150 and up): below the large floor an older bar
|
|
29
|
+
* holds only those and is partial.
|
|
30
|
+
*/
|
|
31
|
+
import { parseOptionSymbol } from '../options/option-symbol.util.js';
|
|
32
|
+
import { WRUN_PLANE_PAYLOAD_KEY } from '../chart/opra-read-access.leaf.js';
|
|
33
|
+
import { wrunPresentMaskOf, wrunPresentWithPartial } from './wrun-present-bits.util.js';
|
|
34
|
+
import { encodeSymbol } from './wrun-symbol-code.util.js';
|
|
35
|
+
/** The gateway type the class reads, by name (the protocol package names it from its release). */
|
|
36
|
+
export const WRUN_OPTION_PRINT_TYPE = 'OPTION_PRINT';
|
|
37
|
+
/** f64s per tuple, the `present` mask included. */
|
|
38
|
+
export const WRUN_OPTION_PRINTS_WIDTH = 16;
|
|
39
|
+
/** The tuple's columns. */
|
|
40
|
+
export const WRUN_OPTION_PRINT_COLUMN = Object.freeze({
|
|
41
|
+
offset: 0,
|
|
42
|
+
key: 1,
|
|
43
|
+
root: 2,
|
|
44
|
+
expiry: 3,
|
|
45
|
+
side: 4,
|
|
46
|
+
strike: 5,
|
|
47
|
+
price: 6,
|
|
48
|
+
size: 7,
|
|
49
|
+
premium: 8,
|
|
50
|
+
aggressor: 9,
|
|
51
|
+
outside: 10,
|
|
52
|
+
underlying: 11,
|
|
53
|
+
iv: 12,
|
|
54
|
+
delta: 13,
|
|
55
|
+
venue: 14,
|
|
56
|
+
present: 15,
|
|
57
|
+
});
|
|
58
|
+
/** The `present` bits by name (14, the partial bar, is the shared one). */
|
|
59
|
+
export const WRUN_OPTION_PRINT_BIT = Object.freeze({ iv: 0, delta: 1, underlying: 2, quote: 3, forward: 4 });
|
|
60
|
+
/** The large-print floors the gateway copies prints into `option_print_large` by (its write and read charts). */
|
|
61
|
+
export const WRUN_OPTION_PRINT_LARGE_MIN_PREMIUM = 25_000;
|
|
62
|
+
export const WRUN_OPTION_PRINT_LARGE_MIN_CONTRACTS = 150;
|
|
63
|
+
const DAY_MS = 86_400_000;
|
|
64
|
+
/** `option_print` keeps every print 3 days; `option_print_large` the large ones 90. */
|
|
65
|
+
export const WRUN_OPTION_PRINT_RAW_RETENTION_MS = 3 * DAY_MS;
|
|
66
|
+
export const WRUN_OPTION_PRINT_LARGE_RETENTION_MS = 90 * DAY_MS;
|
|
67
|
+
/** The gateway's bar limit on an unaggregated read (validateKiyoPlusBar: one point a minute, 15,000 on every tier),
|
|
68
|
+
* the trade tape's TRADES_LARGE_BAR_LIMIT_SEC too: a read opening before it is trimmed without a word. */
|
|
69
|
+
export const WRUN_OPTION_PRINT_BAR_LIMIT_MS = 15_000 * 60_000;
|
|
70
|
+
/** How far inside a boundary the lane marks a bar whole: the gateway and the worker read their own clocks later than
|
|
71
|
+
* the run's (the queue, the wire), so a bar that opens within this of a boundary reads partial, never short. */
|
|
72
|
+
export const WRUN_OPTION_PRINT_CLOCK_MARGIN_MS = 10 * 60_000;
|
|
73
|
+
export const WRUN_OPTION_PRINTS_HISTORY = Object.freeze(['live', '3d', '90d']);
|
|
74
|
+
export const WRUN_OPTION_PRINTS_OVERFLOW = Object.freeze(['refuse', 'largest']);
|
|
75
|
+
/** An instance's payload as the acquisition it carries, or undefined when it names no valid floor or history. */
|
|
76
|
+
export function wrunOptionPrintsAcquisitionOf(extras) {
|
|
77
|
+
if (!extras)
|
|
78
|
+
return undefined;
|
|
79
|
+
const minPremium = extras.minPremium;
|
|
80
|
+
const history = extras.history ?? 'live';
|
|
81
|
+
const overflow = extras.overflow ?? 'refuse';
|
|
82
|
+
if (typeof minPremium !== 'number' || !(Number.isFinite(minPremium) && minPremium > 0))
|
|
83
|
+
return undefined;
|
|
84
|
+
if (!WRUN_OPTION_PRINTS_HISTORY.includes(history))
|
|
85
|
+
return undefined;
|
|
86
|
+
if (!WRUN_OPTION_PRINTS_OVERFLOW.includes(overflow))
|
|
87
|
+
return undefined;
|
|
88
|
+
const coin = typeof extras.coin === 'string' ? extras.coin : '';
|
|
89
|
+
return {
|
|
90
|
+
coin,
|
|
91
|
+
minPremium,
|
|
92
|
+
history: history,
|
|
93
|
+
overflow: overflow,
|
|
94
|
+
...(typeof extras.expiries === 'string' ? { expiries: extras.expiries } : {}),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** Whether a payload is an `option_prints` lane ask the K control serves: it names the OPRA plane and an
|
|
98
|
+
* acquisition with a coin (a source asked any other way is declined, fail closed). */
|
|
99
|
+
export function isWrunOptionPrintsAsk(payload) {
|
|
100
|
+
const acquisition = wrunOptionPrintsAcquisitionOf(payload);
|
|
101
|
+
return payload?.[WRUN_PLANE_PAYLOAD_KEY] === 'opra' && acquisition !== undefined && acquisition.coin !== '';
|
|
102
|
+
}
|
|
103
|
+
/** Whether the reader serves this floor from the large-print table (and so reaches back as far as it). */
|
|
104
|
+
export function wrunOptionPrintsReadsLargeTable(minPremium) {
|
|
105
|
+
return minPremium >= WRUN_OPTION_PRINT_LARGE_MIN_PREMIUM;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The span the backend serves an acquisition at the clock (the row lane's `horizon`): where its prints start (the
|
|
109
|
+
* table the floor and the history reach, never past the gateway's bar limit) and where they are whole (a "90d"
|
|
110
|
+
* floor below the large floor holds only the large prints past the raw table's 3 days).
|
|
111
|
+
*/
|
|
112
|
+
export function wrunOptionPrintsHorizon(extras, nowMs) {
|
|
113
|
+
const acquisition = wrunOptionPrintsAcquisitionOf(extras);
|
|
114
|
+
if (acquisition === undefined || !Number.isFinite(nowMs))
|
|
115
|
+
return undefined;
|
|
116
|
+
const barLimitFrom = nowMs - WRUN_OPTION_PRINT_BAR_LIMIT_MS + WRUN_OPTION_PRINT_CLOCK_MARGIN_MS;
|
|
117
|
+
const large = wrunOptionPrintsReadsLargeTable(acquisition.minPremium);
|
|
118
|
+
const reachesLarge = acquisition.history === '90d' || (acquisition.history === 'live' && large);
|
|
119
|
+
const historyFrom = nowMs - (reachesLarge ? WRUN_OPTION_PRINT_LARGE_RETENTION_MS : WRUN_OPTION_PRINT_RAW_RETENTION_MS);
|
|
120
|
+
const servedFromMs = Math.max(historyFrom, barLimitFrom);
|
|
121
|
+
const wholeFrom = acquisition.history === '90d' && !large
|
|
122
|
+
? nowMs - WRUN_OPTION_PRINT_RAW_RETENTION_MS + WRUN_OPTION_PRINT_CLOCK_MARGIN_MS
|
|
123
|
+
: historyFrom + WRUN_OPTION_PRINT_CLOCK_MARGIN_MS;
|
|
124
|
+
return { servedFromMs, completeFromMs: Math.max(wholeFrom, barLimitFrom) };
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The reads a window needs at an acquisition's floor: one read at the floor (the reader picks the table), except a
|
|
128
|
+
* "90d" floor below the large floor, whose part older than the raw table's 3 days reads `option_print_large` twice,
|
|
129
|
+
* the large premiums (`minQuoteAmount` 25,000) and the large sizes at the floor (`minAmount` 150 with the floor), so
|
|
130
|
+
* the two together are every large print at or above the floor (a print in both is merged by its id).
|
|
131
|
+
*/
|
|
132
|
+
export function wrunOptionPrintReads(args) {
|
|
133
|
+
const { fromMs, toMs, minPremium } = args;
|
|
134
|
+
if (!(toMs > fromMs))
|
|
135
|
+
return [];
|
|
136
|
+
if (args.history !== '90d' || wrunOptionPrintsReadsLargeTable(minPremium)) {
|
|
137
|
+
return [{ fromMs, toMs, minQuoteAmount: minPremium }];
|
|
138
|
+
}
|
|
139
|
+
const rawFrom = args.nowMs - WRUN_OPTION_PRINT_RAW_RETENTION_MS;
|
|
140
|
+
const reads = [];
|
|
141
|
+
if (fromMs < rawFrom) {
|
|
142
|
+
const end = Math.min(toMs, rawFrom);
|
|
143
|
+
reads.push({ fromMs, toMs: end, minQuoteAmount: WRUN_OPTION_PRINT_LARGE_MIN_PREMIUM });
|
|
144
|
+
reads.push({ fromMs, toMs: end, minQuoteAmount: minPremium, minAmount: WRUN_OPTION_PRINT_LARGE_MIN_CONTRACTS });
|
|
145
|
+
}
|
|
146
|
+
if (toMs > rawFrom)
|
|
147
|
+
reads.push({ fromMs: Math.max(fromMs, rawFrom), toMs, minQuoteAmount: minPremium });
|
|
148
|
+
return reads;
|
|
149
|
+
}
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
// The print key: FNV-1a 64 over the id's UTF-8 bytes, cut to its low 53 bits.
|
|
152
|
+
// ---------------------------------------------------------------------------
|
|
153
|
+
const FNV64_OFFSET_HI = 0xcbf29ce4;
|
|
154
|
+
const FNV64_OFFSET_LO = 0x84222325;
|
|
155
|
+
/** The FNV-1a 64 prime, 2^40 + 0x1b3: its low word is 0x1b3, its high word 0x100. */
|
|
156
|
+
const FNV64_PRIME_LO = 0x1b3;
|
|
157
|
+
const FNV64_PRIME_HI = 0x100;
|
|
158
|
+
const TWO_POW_32 = 4_294_967_296;
|
|
159
|
+
const UTF8 = new TextEncoder();
|
|
160
|
+
/** The print key of an id: its FNV-1a 64 hash, cut to the low 53 bits (an exact f64). Two 32-bit words, every
|
|
161
|
+
* product below 2^42, so the arithmetic is exact in doubles. */
|
|
162
|
+
export function wrunOptionPrintKey(id) {
|
|
163
|
+
let hi = FNV64_OFFSET_HI;
|
|
164
|
+
let lo = FNV64_OFFSET_LO;
|
|
165
|
+
for (const byte of UTF8.encode(id)) {
|
|
166
|
+
lo = (lo ^ byte) >>> 0;
|
|
167
|
+
const loProduct = lo * FNV64_PRIME_LO;
|
|
168
|
+
const carry = Math.floor(loProduct / TWO_POW_32);
|
|
169
|
+
hi = (hi * FNV64_PRIME_LO + carry + lo * FNV64_PRIME_HI) % TWO_POW_32;
|
|
170
|
+
lo = loProduct % TWO_POW_32;
|
|
171
|
+
}
|
|
172
|
+
return (hi % 2 ** 21) * TWO_POW_32 + lo;
|
|
173
|
+
}
|
|
174
|
+
const drops = { id: 0, time: 0, contract: 0, root: 0, value: 0 };
|
|
175
|
+
/** The prints this thread dropped since load, by reason (the lane's diagnostics: a refused root among them). */
|
|
176
|
+
export function wrunOptionPrintDrops() {
|
|
177
|
+
return { ...drops };
|
|
178
|
+
}
|
|
179
|
+
/** Spec hook: zero the drop counters. */
|
|
180
|
+
export function __resetWrunOptionPrintDropsForTest() {
|
|
181
|
+
for (const reason of Object.keys(drops))
|
|
182
|
+
drops[reason] = 0;
|
|
183
|
+
}
|
|
184
|
+
/** A number off either wire shape (a protobuf-es int64 is a bigint, a JSON one a string), NaN when none. */
|
|
185
|
+
function numberOf(value) {
|
|
186
|
+
if (typeof value === 'number')
|
|
187
|
+
return value;
|
|
188
|
+
if (typeof value === 'bigint')
|
|
189
|
+
return Number(value);
|
|
190
|
+
if (typeof value === 'string' && value.trim() !== '')
|
|
191
|
+
return Number(value);
|
|
192
|
+
return Number.NaN;
|
|
193
|
+
}
|
|
194
|
+
/** An optional field: undefined when unset (or not a finite number). */
|
|
195
|
+
function optionalNumberOf(value) {
|
|
196
|
+
if (value === undefined || value === null)
|
|
197
|
+
return undefined;
|
|
198
|
+
const number = numberOf(value);
|
|
199
|
+
return Number.isFinite(number) ? number : undefined;
|
|
200
|
+
}
|
|
201
|
+
/** The print's time in ms off its Timestamp (whole seconds plus the milliseconds of its nanoseconds). */
|
|
202
|
+
export function wrunOptionPrintTimeMs(timestamp) {
|
|
203
|
+
if (timestamp === null || typeof timestamp !== 'object')
|
|
204
|
+
return Number.NaN;
|
|
205
|
+
const stamp = timestamp;
|
|
206
|
+
const seconds = numberOf(stamp.signedSeconds ?? stamp.signed_seconds ?? stamp.seconds ?? stamp.s);
|
|
207
|
+
const nanos = optionalNumberOf(stamp.nanoseconds) ?? 0;
|
|
208
|
+
return seconds * 1000 + Math.floor(nanos / 1_000_000);
|
|
209
|
+
}
|
|
210
|
+
/** OptionPrintSide (NONE 0, ASK 1, BID 2, MID 3; a JSON reading names it) as the tuple's aggressor. */
|
|
211
|
+
export function wrunOptionPrintAggressor(side) {
|
|
212
|
+
const word = typeof side === 'string' ? side : '';
|
|
213
|
+
if (side === 1 || word === 'OPTION_PRINT_SIDE_ASK')
|
|
214
|
+
return 1;
|
|
215
|
+
if (side === 2 || word === 'OPTION_PRINT_SIDE_BID')
|
|
216
|
+
return -1;
|
|
217
|
+
if (side === 3 || word === 'OPTION_PRINT_SIDE_MID')
|
|
218
|
+
return 0;
|
|
219
|
+
return 2;
|
|
220
|
+
}
|
|
221
|
+
/** The option type (a series' `optionType`: a name, or the enum id PUT 1, CALL 2) as +1 call, -1 put, 0 unknown. */
|
|
222
|
+
function sideOf(optionType, osiSide) {
|
|
223
|
+
if (optionType === 'CALL' || optionType === 2)
|
|
224
|
+
return 1;
|
|
225
|
+
if (optionType === 'PUT' || optionType === 1)
|
|
226
|
+
return -1;
|
|
227
|
+
return osiSide === 'call' ? 1 : osiSide === 'put' ? -1 : 0;
|
|
228
|
+
}
|
|
229
|
+
const CONTRACT_CACHE_MAX = 50_000;
|
|
230
|
+
const contracts = new Map();
|
|
231
|
+
/** The contract an OSI symbol names (its root's code and side), or null for no OPRA contract symbol. */
|
|
232
|
+
export function wrunOptionContractOf(symbol) {
|
|
233
|
+
const cached = contracts.get(symbol);
|
|
234
|
+
if (cached !== undefined)
|
|
235
|
+
return cached;
|
|
236
|
+
const parsed = parseOptionSymbol('opra', symbol);
|
|
237
|
+
const contract = parsed === null ? null : { rootCode: encodeSymbol(parsed.root), side: parsed.side };
|
|
238
|
+
if (contracts.size >= CONTRACT_CACHE_MAX)
|
|
239
|
+
contracts.clear();
|
|
240
|
+
contracts.set(symbol, contract);
|
|
241
|
+
return contract;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* One OPRA print as the class's tuple, from the history shape (a reshaped protobuf-es message: int64 as bigint,
|
|
245
|
+
* enums as ids, unset optionals undefined) or the live shape (the feed's JSON: int64 as strings, enums as names,
|
|
246
|
+
* unset optionals omitted), so the two paths build the same tuple for the same print. `series` is the point's
|
|
247
|
+
* series (the contract: its OSI symbol, the underlying as coin, the option type). A print missing its id, time or
|
|
248
|
+
* contract, or whose root the codec refuses, is dropped and counted.
|
|
249
|
+
*/
|
|
250
|
+
export function wrunOptionPrintOf(print, series) {
|
|
251
|
+
const drop = (reason) => {
|
|
252
|
+
drops[reason] += 1;
|
|
253
|
+
return reason;
|
|
254
|
+
};
|
|
255
|
+
if (!print)
|
|
256
|
+
return drop('value');
|
|
257
|
+
const id = typeof print.id === 'string' ? print.id : '';
|
|
258
|
+
if (id === '')
|
|
259
|
+
return drop('id');
|
|
260
|
+
const tsMs = wrunOptionPrintTimeMs(print.timestamp);
|
|
261
|
+
if (!Number.isFinite(tsMs))
|
|
262
|
+
return drop('time');
|
|
263
|
+
const symbol = typeof series?.symbol === 'string' ? series.symbol : '';
|
|
264
|
+
const contract = symbol === '' ? null : wrunOptionContractOf(symbol);
|
|
265
|
+
if (contract === null)
|
|
266
|
+
return drop('contract');
|
|
267
|
+
if (contract.rootCode === undefined)
|
|
268
|
+
return drop('root');
|
|
269
|
+
const rootCode = contract.rootCode;
|
|
270
|
+
const sideCp = sideOf(series?.optionType, contract.side);
|
|
271
|
+
const expiryMs = numberOf(print.expiryMs);
|
|
272
|
+
const strike = numberOf(print.strike);
|
|
273
|
+
const price = numberOf(print.price);
|
|
274
|
+
const size = numberOf(print.size);
|
|
275
|
+
const premium = numberOf(print.premiumUsd);
|
|
276
|
+
const venue = numberOf(print.venue ?? 0);
|
|
277
|
+
if (![expiryMs, strike, price, size, premium, venue].every(Number.isFinite) || sideCp === 0)
|
|
278
|
+
return drop('value');
|
|
279
|
+
const aggressor = wrunOptionPrintAggressor(print.side);
|
|
280
|
+
const iv = optionalNumberOf(print.iv);
|
|
281
|
+
const delta = optionalNumberOf(print.delta);
|
|
282
|
+
const underlying = optionalNumberOf(print.underlyingPrice);
|
|
283
|
+
const bits = [];
|
|
284
|
+
if (iv !== undefined)
|
|
285
|
+
bits.push(WRUN_OPTION_PRINT_BIT.iv);
|
|
286
|
+
if (delta !== undefined)
|
|
287
|
+
bits.push(WRUN_OPTION_PRINT_BIT.delta);
|
|
288
|
+
if (underlying !== undefined)
|
|
289
|
+
bits.push(WRUN_OPTION_PRINT_BIT.underlying);
|
|
290
|
+
if (aggressor !== 2)
|
|
291
|
+
bits.push(WRUN_OPTION_PRINT_BIT.quote);
|
|
292
|
+
if (print.underlyingIsForward === true || print.underlyingIsForward === 'true')
|
|
293
|
+
bits.push(WRUN_OPTION_PRINT_BIT.forward);
|
|
294
|
+
const tuple = [
|
|
295
|
+
0,
|
|
296
|
+
wrunOptionPrintKey(id),
|
|
297
|
+
rootCode,
|
|
298
|
+
expiryMs,
|
|
299
|
+
sideCp,
|
|
300
|
+
strike,
|
|
301
|
+
price,
|
|
302
|
+
size,
|
|
303
|
+
premium,
|
|
304
|
+
aggressor,
|
|
305
|
+
aggressor === 2 ? 0 : (optionalNumberOf(print.outsideQuote) ?? 0),
|
|
306
|
+
underlying ?? 0,
|
|
307
|
+
iv ?? 0,
|
|
308
|
+
delta ?? 0,
|
|
309
|
+
venue,
|
|
310
|
+
wrunPresentMaskOf(bits),
|
|
311
|
+
];
|
|
312
|
+
// dte_days is a plain int32: the feed's JSON leaves out a zero (expiration day), so an absent one reads 0.
|
|
313
|
+
const dteDays = numberOf(print.dteDays ?? 0);
|
|
314
|
+
return { id, tsMs, dteDays: Number.isFinite(dteDays) ? dteDays : undefined, premium, tuple };
|
|
315
|
+
}
|
|
316
|
+
/** Whether a print passes an acquisition's own filters: its floor, and "0dte" (expiring on the print's trade date). */
|
|
317
|
+
export function wrunOptionPrintKept(print, acquisition) {
|
|
318
|
+
if (!(print.premium >= acquisition.minPremium))
|
|
319
|
+
return false;
|
|
320
|
+
return acquisition.expiries !== '0dte' || print.dteDays === 0;
|
|
321
|
+
}
|
|
322
|
+
/** Whether a cell is a print tuple of the class: exactly 16 finite numbers. */
|
|
323
|
+
export function isWrunOptionPrintTuple(cell) {
|
|
324
|
+
return (Array.isArray(cell) &&
|
|
325
|
+
cell.length === WRUN_OPTION_PRINTS_WIDTH &&
|
|
326
|
+
cell.every((value) => typeof value === 'number' && Number.isFinite(value)));
|
|
327
|
+
}
|
|
328
|
+
/** A bar's print tuples in the order they printed: by offset, then by key (two prints in one millisecond). */
|
|
329
|
+
export function wrunOptionPrintsInTimeOrder(tuples) {
|
|
330
|
+
return tuples
|
|
331
|
+
.map((tuple) => [...tuple])
|
|
332
|
+
.sort((a, b) => a[WRUN_OPTION_PRINT_COLUMN.offset] - b[WRUN_OPTION_PRINT_COLUMN.offset] ||
|
|
333
|
+
a[WRUN_OPTION_PRINT_COLUMN.key] - b[WRUN_OPTION_PRINT_COLUMN.key]);
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* `overflow: "largest"` over a bar over its bound (om's packer rule, wrun-host/pack.ts `wrunLargestPremiumBlock`):
|
|
337
|
+
* the `maxCells` prints with the largest premium (an equal premium keeps the earlier print; a non-finite premium
|
|
338
|
+
* ranks last), laid out in the order they printed, bit 14 set on the FIRST kept print's `present` so the module reads
|
|
339
|
+
* the bar as partial. A bar within its bound is returned as it is.
|
|
340
|
+
*/
|
|
341
|
+
export function wrunLargestPremiumPrints(tuples, maxCells) {
|
|
342
|
+
const bound = Math.max(0, Math.floor(maxCells));
|
|
343
|
+
if (tuples.length <= bound)
|
|
344
|
+
return tuples;
|
|
345
|
+
const premium = (at) => {
|
|
346
|
+
const value = tuples[at][WRUN_OPTION_PRINT_COLUMN.premium];
|
|
347
|
+
return Number.isFinite(value) ? value : Number.NEGATIVE_INFINITY;
|
|
348
|
+
};
|
|
349
|
+
const ranked = tuples.map((_, at) => at).sort((a, b) => premium(b) - premium(a) || a - b);
|
|
350
|
+
const kept = ranked.slice(0, bound).sort((a, b) => a - b);
|
|
351
|
+
const out = kept.map((at) => [...tuples[at]]);
|
|
352
|
+
if (out.length > 0) {
|
|
353
|
+
out[0][WRUN_OPTION_PRINT_COLUMN.present] = wrunPresentWithPartial(out[0][WRUN_OPTION_PRINT_COLUMN.present]);
|
|
354
|
+
}
|
|
355
|
+
return out;
|
|
356
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Deribit option-summary classes on the browser lane: `implied_volatility` (field
|
|
3
|
+
* `implied_volatility`) and `skew` (field `skew`), each with a REQUIRED `tenor`, read off the
|
|
4
|
+
* chart's K_DERIBIT_IMPLIED_VOLATILITY and K_SKEW lanes for the chart's coin.
|
|
5
|
+
*
|
|
6
|
+
* The column plan (`planWrunOptionSummaryLane`), decided from the sheet alone BEFORE any fetch:
|
|
7
|
+
* - lane rows are `[ts, <one column per distinct declared tenor>]` in declaration order. The run
|
|
8
|
+
* pass sends exactly those tenors in the K payload (`tenors`), the K control forwards them
|
|
9
|
+
* (a kScript source names none and keeps its three, ONE_W / ONE_M / THREE_M) and the worker
|
|
10
|
+
* lays one column per requested tenor in the requested order, so the lane fetches what the
|
|
11
|
+
* package reads and nothing else.
|
|
12
|
+
* - served tenors (`WRUN_OPTION_SUMMARY_TENORS`): ONE_W, ONE_M, TWO_M, THREE_M, SIX_M, the five
|
|
13
|
+
* the gateway holds a series for (the live census of 2026-10-02 on BTC and ETH, both classes:
|
|
14
|
+
* these five carry data, the other three read no bar at all). ONE_D, THREE_D and ONE_Y are kit
|
|
15
|
+
* words the gateway has no series for: each refuses by name here, naming the five served, like
|
|
16
|
+
* a missing or misspelled tenor, a wrong field and a celled input. Passing the plan and then
|
|
17
|
+
* answering nothing would stop the run with the generic "data is unavailable" instead. The
|
|
18
|
+
* kit keeps accepting all eight; the list is hand-copied until a kit re-vendor exports the
|
|
19
|
+
* served set.
|
|
20
|
+
* - `skew` is quoted per delta: the `delta` knob (`WRUN_SKEW_DELTAS`, the kit's 5, 15, 25 and 35
|
|
21
|
+
* mirrored; absent reads the standard 25, `wrunSkewDeltaOf`) picks the quote, any other value
|
|
22
|
+
* refuses by name before the fetch. A column is a (delta, tenor) pair and `asks` holds ONE
|
|
23
|
+
* K_SKEW ask per distinct delta with that delta's tenors (the K control keys the request by
|
|
24
|
+
* `<coin>_<delta>`), which `zipWrunOptionSummaryRows` joins by timestamp into the lane rows; two
|
|
25
|
+
* inputs on one (delta, tenor) share a column, inputs on two deltas fetch two asks. The ask at
|
|
26
|
+
* the standard delta keeps the lane's own fetch key, another delta's ask suffixes it.
|
|
27
|
+
*
|
|
28
|
+
* - served coins (`WRUN_OPTION_SUMMARY_COINS`): BTC and ETH, the two coins the gateway holds an
|
|
29
|
+
* option summary for (the same census). The plan is the sheet's alone, so the coin is judged
|
|
30
|
+
* against the chart in the run pass, before any fetch, through the capability table
|
|
31
|
+
* (`wrunLaneServiceOnMarket` in index-mode-admission.util): on any other coin the lanes are
|
|
32
|
+
* never asked, a reader that needs them refuses by name ("Only BTC, ETH charts have implied
|
|
33
|
+
* volatility") with the switch-market way out, and a NaN-only reader draws beside a note.
|
|
34
|
+
*
|
|
35
|
+
* The run pass (`wrun-overlay-run.util`) and the live reconcile (`wrun-live-tick.util`) issue
|
|
36
|
+
* the plan's asks through the same helpers below (fetch key, payload extras, zip), so the two
|
|
37
|
+
* cannot drift; the row builder (`wrun-source-rows.util`) reads each input's column from the
|
|
38
|
+
* same plan. Both classes stay fail-loud on an empty answer whatever the `missing` policy.
|
|
39
|
+
*/
|
|
40
|
+
import type { WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
|
|
41
|
+
export type WrunOptionSummaryClass = 'implied_volatility' | 'skew';
|
|
42
|
+
/** The tenors the chart serves on both classes, in the kit's own order (`KNOWN_TENORS`): the
|
|
43
|
+
* five the gateway holds a series for. */
|
|
44
|
+
export declare const WRUN_OPTION_SUMMARY_TENORS: readonly string[];
|
|
45
|
+
/** The coins the chart serves both classes for (the gateway's option-summary census): every other
|
|
46
|
+
* coin's chart is refused before the fetch by the capability table. */
|
|
47
|
+
export declare const WRUN_OPTION_SUMMARY_COINS: readonly string[];
|
|
48
|
+
/** The deltas the skew is quoted at (the kit's WRUN_SKEW_DELTAS, in its order; the main thread
|
|
49
|
+
* never loads the kit bundle, so wrun-source-words.kit-mirror.spec.ts pins the copy). */
|
|
50
|
+
export declare const WRUN_SKEW_DELTAS: readonly number[];
|
|
51
|
+
/** The standard quoted skew: what a skew input without a `delta` knob reads. */
|
|
52
|
+
export declare const WRUN_SKEW_DEFAULT_DELTA = 25;
|
|
53
|
+
/** The K lane each class rides: the source type, the fetch-key stem and the label of the
|
|
54
|
+
* "data is unavailable" refusal. */
|
|
55
|
+
export declare const WRUN_OPTION_SUMMARY_LANES: Readonly<Record<WrunOptionSummaryClass, {
|
|
56
|
+
type: string;
|
|
57
|
+
key: string;
|
|
58
|
+
label: string;
|
|
59
|
+
}>>;
|
|
60
|
+
export interface WrunOptionSummaryColumn {
|
|
61
|
+
tenor: string;
|
|
62
|
+
/** `skew` only: the delta the column is quoted at. */
|
|
63
|
+
delta?: number;
|
|
64
|
+
/** The lane row column (column 0 is the ts). */
|
|
65
|
+
column: number;
|
|
66
|
+
/** The inputs reading this column, by index, in declaration order. */
|
|
67
|
+
inputIndexes: number[];
|
|
68
|
+
}
|
|
69
|
+
/** One K ask: every tenor one delta reads (`implied_volatility` has no delta and one ask). */
|
|
70
|
+
export interface WrunOptionSummaryAsk {
|
|
71
|
+
delta?: number;
|
|
72
|
+
/** In declaration order: the ask's answer is `[ts, ...tenors]`. */
|
|
73
|
+
tenors: string[];
|
|
74
|
+
}
|
|
75
|
+
export interface WrunOptionSummaryPlan {
|
|
76
|
+
/** One per distinct (delta, tenor), in declaration order. */
|
|
77
|
+
columns: WrunOptionSummaryColumn[];
|
|
78
|
+
/** One per distinct delta, in first-use order; empty when no input reads the class. */
|
|
79
|
+
asks: WrunOptionSummaryAsk[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The column plan of one option-summary class: the distinct tenors (per delta) the sheet
|
|
83
|
+
* declares, each with its lane column and the inputs reading it, and the K asks that fetch
|
|
84
|
+
* them. Refused by name, before any fetch: a celled input, a field other than the class's own,
|
|
85
|
+
* a missing or unknown tenor, ONE_D, THREE_D and ONE_Y (kit words the gateway holds no series
|
|
86
|
+
* for), and a skew delta outside the served four.
|
|
87
|
+
*/
|
|
88
|
+
export declare function planWrunOptionSummaryLane(metadata: WrunIndicatorMetadata, sourceClass: WrunOptionSummaryClass): WrunOptionSummaryPlan;
|
|
89
|
+
/** The fetch-key suffix of one ask: the class stem, the delta appended once it is not the
|
|
90
|
+
* standard one (the 25-delta ask keeps the lane's own key). */
|
|
91
|
+
export declare function wrunOptionSummaryAskKey(sourceClass: WrunOptionSummaryClass, ask: WrunOptionSummaryAsk): string;
|
|
92
|
+
/** The payload fields of one ask beyond the current-market placeholders: the chart's coin, the
|
|
93
|
+
* delta (skew) and the tenors the answer's columns are, in order. */
|
|
94
|
+
export declare function wrunOptionSummaryAskExtras(ask: WrunOptionSummaryAsk): Record<string, unknown>;
|
|
95
|
+
/**
|
|
96
|
+
* The lane rows `[ts, ...columns]` from the per-ask K answers `[ts, ...the ask's tenors]`
|
|
97
|
+
* (`rowsByAsk[i]` answers `plan.asks[i]`), ascending by ts. One ask is its own answer, returned
|
|
98
|
+
* as it came (every `implied_volatility` plan, a `skew` plan on one delta). Several asks join
|
|
99
|
+
* on the timestamp: a column reads its delta's answer at its tenor, NaN where that delta has no
|
|
100
|
+
* row at the stamp.
|
|
101
|
+
*/
|
|
102
|
+
export declare function zipWrunOptionSummaryRows(plan: WrunOptionSummaryPlan, rowsByAsk: ReadonlyArray<ReadonlyArray<ArrayLike<number>> | undefined>): ArrayLike<number>[];
|