@orangecharts/wrun-chart-host 0.7.1 → 0.9.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 +27 -4
- package/dist/constants/feature-flags.constants.d.ts +5 -0
- package/dist/constants/feature-flags.constants.js +32 -0
- package/dist/constants/marketCapabilities.constants.d.ts +14 -9
- package/dist/constants/marketCapabilities.constants.js +36 -13
- package/dist/constants/opra-compliance.constants.d.ts +14 -0
- package/dist/constants/opra-compliance.constants.js +14 -0
- package/dist/constants/option-venues.constants.d.ts +29 -6
- package/dist/constants/option-venues.constants.js +19 -2
- package/dist/constants/venue-presets.constants.d.ts +17 -3
- package/dist/constants/venue-presets.constants.js +17 -3
- package/dist/host-env.d.ts +34 -4
- package/dist/host-env.js +21 -0
- package/dist/host-ports.types.d.ts +51 -3
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +40 -11
- package/dist/indicators/controls/tpo-session.util.js +138 -14
- package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
- package/dist/interfaces/opra-realtime.interface.js +10 -10
- package/dist/interfaces/option-instrument.interface.d.ts +6 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +34 -13
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +57 -10
- package/dist/kscript-data/controls/live-trades-merge.util.js +85 -16
- package/dist/market-data/billing.interface.d.ts +138 -17
- package/dist/market-data/billing.interface.js +25 -8
- package/dist/market-data/venues/index.d.ts +3 -3
- package/dist/market-data/venues/opra.contract.copy.json +5 -3
- package/dist/market-data/venues/opra.d.ts +3 -3
- package/dist/market-data/venues/opra.js +5 -4
- package/dist/replay/replayLadder.js +3 -1
- package/dist/settings-templates/footprint-rows.d.ts +25 -0
- package/dist/settings-templates/footprint-rows.js +127 -0
- package/dist/settings-templates/form-rows.d.ts +56 -0
- package/dist/settings-templates/form-rows.js +19 -0
- package/dist/settings-templates/frvp-fields.js +14 -0
- package/dist/settings-templates/index.d.ts +10 -1
- package/dist/settings-templates/index.js +11 -2
- package/dist/settings-templates/indicator-fields.js +78 -0
- package/dist/settings-templates/tool-rules.d.ts +35 -9
- package/dist/settings-templates/tool-rules.js +42 -8
- package/dist/settings-templates/tool-tables.generated.js +13 -2
- package/dist/utility/chart/candle-volume-unit.leaf.d.ts +16 -0
- package/dist/utility/chart/candle-volume-unit.leaf.js +61 -0
- package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
- package/dist/utility/chart/crypto-index.leaf.js +2 -2
- package/dist/utility/chart/footprint-columns.util.d.ts +74 -0
- package/dist/utility/chart/footprint-columns.util.js +106 -0
- package/dist/utility/chart/footprint-display-mode.util.d.ts +40 -0
- package/dist/utility/chart/footprint-display-mode.util.js +62 -0
- package/dist/utility/chart/footprint-sierra-look.util.d.ts +2 -0
- package/dist/utility/chart/footprint-sierra-look.util.js +37 -0
- package/dist/utility/chart/index-mode-admission.util.js +9 -1
- package/dist/utility/chart/index-mode.util.d.ts +5 -2
- package/dist/utility/chart/index-mode.util.js +23 -13
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +28 -21
- package/dist/utility/chart/kscript-venue-policy.util.js +34 -26
- package/dist/utility/chart/marketKind.util.d.ts +12 -10
- package/dist/utility/chart/marketKind.util.js +17 -7
- package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
- package/dist/utility/chart/om-panel-push-style.util.js +17 -15
- package/dist/utility/chart/om-panel.util.d.ts +11 -0
- package/dist/utility/chart/om-panel.util.js +65 -6
- package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
- package/dist/utility/chart/profile-block-size.util.js +7 -0
- package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
- package/dist/utility/chart/quote-perp.leaf.js +20 -0
- package/dist/utility/chart/window-geometry.leaf.d.ts +23 -1
- package/dist/utility/chart/window-geometry.leaf.js +78 -6
- package/dist/utility/chart/window-owner.leaf.d.ts +13 -0
- package/dist/utility/chart/window-owner.leaf.js +5 -0
- package/dist/utility/chart/wrun-run-result.util.d.ts +5 -0
- package/dist/utility/chart/wrun-run-result.util.js +4 -1
- package/dist/utility/common/transformations.util.d.ts +7 -0
- package/dist/utility/common/transformations.util.js +11 -0
- package/dist/utility/options/cme-options-root.util.d.ts +25 -0
- package/dist/utility/options/cme-options-root.util.js +40 -0
- package/dist/utility/options/option-book.util.d.ts +27 -0
- package/dist/utility/options/option-book.util.js +76 -0
- package/dist/utility/options/option-trade-date.util.d.ts +50 -0
- package/dist/utility/options/option-trade-date.util.js +120 -0
- package/dist/utility/options/option-venue.util.d.ts +3 -3
- package/dist/utility/options/option-venue.util.js +3 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +1 -1
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
- package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
- package/dist/utility/wrun/sources/host-grid-landing.d.ts +4 -2
- package/dist/utility/wrun/sources/host-grid-landing.js +8 -0
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +40 -4
- package/dist/utility/wrun/sources/lanes/options_flow.js +115 -18
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +12 -9
- package/dist/utility/wrun/sources/opra-option-lanes.util.js +10 -7
- package/dist/utility/wrun/sources/row-lane-registry.js +10 -5
- package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +3 -2
- package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +30 -5
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
- package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +13 -5
- package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +25 -1
- package/dist/utility/wrun/sources/row-lanes/option_prints.js +161 -30
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.d.ts +4 -0
- package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +65 -0
- package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -1
- package/dist/utility/wrun/sources/row-lanes/option_strikes.js +83 -2
- package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +17 -1
- package/dist/utility/wrun/sources/row-lanes/option_surface.js +33 -2
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +7 -1
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +51 -5
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +136 -3
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +42 -0
- package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +146 -0
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +25 -5
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +111 -20
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +291 -48
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
- package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
- package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
- package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +147 -9
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +345 -11
- package/dist/utility/wrun/wrun-cloud-record.leaf.d.ts +27 -0
- package/dist/utility/wrun/wrun-cloud-record.leaf.js +71 -0
- package/dist/utility/wrun/wrun-cloud-record.util.d.ts +4 -21
- package/dist/utility/wrun/wrun-cloud-record.util.js +5 -65
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
- package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +22 -9
- package/dist/utility/wrun/wrun-color-settings.util.js +57 -23
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
- package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
- package/dist/utility/wrun/wrun-download-meter.util.d.ts +92 -0
- package/dist/utility/wrun/wrun-download-meter.util.js +122 -0
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +10 -3
- package/dist/utility/wrun/wrun-draft-overlay.util.js +63 -6
- package/dist/utility/wrun/wrun-frames.js +5 -5
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +11 -0
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +33 -17
- package/dist/utility/wrun/wrun-hud-looks.util.js +30 -16
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +29 -3
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +33 -3
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
- package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +6 -2
- package/dist/utility/wrun/wrun-live-intake.util.js +136 -21
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -1
- package/dist/utility/wrun/wrun-live-tick.util.js +130 -44
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
- package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +224 -0
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +342 -0
- package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +88 -0
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +471 -0
- package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +43 -8
- package/dist/utility/wrun/wrun-opra-flow.leaf.js +37 -6
- package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +51 -10
- package/dist/utility/wrun/wrun-option-contract-flow.util.js +85 -33
- package/dist/utility/wrun/wrun-option-prints.util.d.ts +172 -3
- package/dist/utility/wrun/wrun-option-prints.util.js +394 -17
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +99 -0
- package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +218 -0
- package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +365 -0
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +797 -0
- package/dist/utility/wrun/wrun-option-views.util.d.ts +231 -7
- package/dist/utility/wrun/wrun-option-views.util.js +643 -23
- package/dist/utility/wrun/wrun-options-chain.util.d.ts +6 -4
- package/dist/utility/wrun/wrun-options-chain.util.js +8 -5
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
- package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +32 -3
- package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
- package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +34 -6
- package/dist/utility/wrun/wrun-overlay-run.util.js +527 -180
- package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +15 -0
- package/dist/utility/wrun/wrun-pack-widths.leaf.js +22 -0
- package/dist/utility/wrun/wrun-pack.util.d.ts +13 -8
- package/dist/utility/wrun/wrun-pack.util.js +38 -21
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-panel-mount.util.js +62 -22
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +41 -14
- package/dist/utility/wrun/wrun-panel-style.util.js +86 -26
- package/dist/utility/wrun/wrun-param-map.util.d.ts +7 -6
- package/dist/utility/wrun/wrun-param-map.util.js +8 -5
- package/dist/utility/wrun/wrun-param-values.util.d.ts +10 -2
- package/dist/utility/wrun/wrun-param-values.util.js +2 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +19 -10
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
- package/dist/utility/wrun/wrun-refusal.util.js +17 -2
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +20 -0
- package/dist/utility/wrun/wrun-script-inputs.util.js +43 -0
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-source-rows.util.js +92 -40
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +133 -48
- package/dist/utility/wrun/wrun-tape-source.util.js +205 -62
- package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
- package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
- package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
- package/dist/workers/utils/volume-profile.worker.util.js +5 -2
- package/dist/workers/wrun/wrun-abi-host.js +3 -2
- package/package.json +11 -11
|
@@ -54,6 +54,64 @@ export declare const WRUN_OPTION_PRINTS_HISTORY: readonly ["live", "3d", "90d"];
|
|
|
54
54
|
export type WrunOptionPrintsHistory = (typeof WRUN_OPTION_PRINTS_HISTORY)[number];
|
|
55
55
|
export declare const WRUN_OPTION_PRINTS_OVERFLOW: readonly ["refuse", "largest"];
|
|
56
56
|
export type WrunOptionPrintsOverflow = (typeof WRUN_OPTION_PRINTS_OVERFLOW)[number];
|
|
57
|
+
/** `newest` (om `WRUN_OPTION_PRINTS_NEWEST_MAX`): also keep the window's N newest prints, 0 to 20,000 (0 or absent: no
|
|
58
|
+
* newest cut). */
|
|
59
|
+
export declare const WRUN_OPTION_PRINTS_NEWEST_MAX = 20000;
|
|
60
|
+
/** `newest_tail_ms` (om `WRUN_OPTION_PRINTS_NEWEST_TAIL_MAX_MS`, with `newest` only): also every print up to this many
|
|
61
|
+
* ms before the oldest newest print, 0 to 60,000 (the legs of an order the cut would split). */
|
|
62
|
+
export declare const WRUN_OPTION_PRINTS_NEWEST_TAIL_MAX_MS = 60000;
|
|
63
|
+
/** `types` (om `WRUN_OPTION_PRINTS_TYPES`): "both" (absent too), "calls" or "puts". */
|
|
64
|
+
export declare const WRUN_OPTION_PRINTS_TYPES: readonly ["both", "calls", "puts"];
|
|
65
|
+
export type WrunOptionPrintsTypes = Exclude<(typeof WRUN_OPTION_PRINTS_TYPES)[number], 'both'>;
|
|
66
|
+
/** `sides` (om `WRUN_OPTION_PRINT_SIDES`), in om's order: the side of the quote a print is kept on (the aggressor
|
|
67
|
+
* against the NBBO on OPRA, "none" a print with no quote to side it; off OPRA the taker's side, "ask" or "bid"). */
|
|
68
|
+
export declare const WRUN_OPTION_PRINT_SIDES: readonly ["ask", "bid", "mid", "none"];
|
|
69
|
+
export type WrunOptionPrintSide = (typeof WRUN_OPTION_PRINT_SIDES)[number];
|
|
70
|
+
/** `moneyness` (om `WRUN_OPTIONS_FLOW_MONEYNESS`): "all" (absent too), "otm" or "itm". */
|
|
71
|
+
export declare const WRUN_OPTION_PRINTS_MONEYNESS: readonly ["all", "otm", "itm"];
|
|
72
|
+
export type WrunOptionPrintsMoneyness = Exclude<(typeof WRUN_OPTION_PRINTS_MONEYNESS)[number], 'all'>;
|
|
73
|
+
/** `max_dte` (om `WRUN_OPTION_MAX_DTE_DAYS`): keep the prints at most this many days to expiry, 0 to 3,650 (0 or
|
|
74
|
+
* absent: every expiry). */
|
|
75
|
+
export declare const WRUN_OPTION_MAX_DTE_DAYS = 3650;
|
|
76
|
+
/** The words a word or list knob of the print classes takes (om `wrunOptionKnobWords`); none for any other knob. The
|
|
77
|
+
* planners read a knob naming a setting by them (wrun-poll-lanes.util `resolveWrunOptionSettingKnobs`, whose one table
|
|
78
|
+
* `WRUN_OPTION_SETTING_KNOBS` holds the print class's row of om's `WRUN_OPTION_PARAM_KNOBS`). */
|
|
79
|
+
export declare function wrunOptionPrintKnobWords(knob: string): readonly string[];
|
|
80
|
+
/**
|
|
81
|
+
* The payload fields an acquisition carries its cuts and filters in (OPTLOAD G4), each absent at its default, so a
|
|
82
|
+
* sheet declaring none asks exactly as before. Where the gateway applies each:
|
|
83
|
+
* - `wire`: the cut ask's `optionRead` field (the worker twin's `optionPrintReadShape`), wherever the gateway's answer is
|
|
84
|
+
* the lane's own cut;
|
|
85
|
+
* - `request`: the request's own DataRequest field (`types` as `optionType`, the reader's type filter), on every read,
|
|
86
|
+
* so the gateway's cut is the lane's own when one type is asked (it filters before it cuts).
|
|
87
|
+
* The worker twin keeps every filter over the prints it read too (`wrunOptionPrintKept`), so today's ask paints alike.
|
|
88
|
+
* ONE table: the acquisition reads exactly these fields, and the class spec
|
|
89
|
+
* (tests/workers/indicators/controls/k-option-print.worker.class.spec.ts) fails on a field the asks leave out.
|
|
90
|
+
*/
|
|
91
|
+
export declare const WRUN_OPTION_PRINTS_CUT_FIELDS: Readonly<{
|
|
92
|
+
readonly newest: {
|
|
93
|
+
readonly wire: "newest";
|
|
94
|
+
};
|
|
95
|
+
readonly newestTailMs: {
|
|
96
|
+
readonly wire: "newestTailMs";
|
|
97
|
+
};
|
|
98
|
+
readonly largestPerBar: {
|
|
99
|
+
readonly wire: "largestPerBar";
|
|
100
|
+
};
|
|
101
|
+
readonly sides: {
|
|
102
|
+
readonly wire: "sides";
|
|
103
|
+
};
|
|
104
|
+
readonly maxDte: {
|
|
105
|
+
readonly wire: "maxDteDays";
|
|
106
|
+
};
|
|
107
|
+
readonly moneyness: {
|
|
108
|
+
readonly wire: "moneyness";
|
|
109
|
+
};
|
|
110
|
+
readonly types: {
|
|
111
|
+
readonly request: "optionType";
|
|
112
|
+
};
|
|
113
|
+
}>;
|
|
114
|
+
export type WrunOptionPrintsCutField = keyof typeof WRUN_OPTION_PRINTS_CUT_FIELDS;
|
|
57
115
|
/** The acquisition an `option_prints` instance asks with (its payload's facets and its chain). */
|
|
58
116
|
export interface WrunOptionPrintsAcquisition {
|
|
59
117
|
/** The chain's underlying, upper case: the key its plane files the prints under (the OPRA ticker, a crypto venue's
|
|
@@ -68,9 +126,27 @@ export interface WrunOptionPrintsAcquisition {
|
|
|
68
126
|
overflow: WrunOptionPrintsOverflow;
|
|
69
127
|
/** "nearest:N" or "0dte"; absent is "all". */
|
|
70
128
|
expiries?: string;
|
|
129
|
+
/** The window's N newest prints (1 to 20,000), with `newestTailMs` (1 to 60,000) the prints that many ms before. */
|
|
130
|
+
newest?: number;
|
|
131
|
+
newestTailMs?: number;
|
|
132
|
+
/** The largest premiums each chart bar keeps on the gateway: the inputs' `max_cells` + 1 (2 and up). */
|
|
133
|
+
largestPerBar?: number;
|
|
134
|
+
types?: WrunOptionPrintsTypes;
|
|
135
|
+
/** The sides kept, in om's order (one to three of them: none or all four is every side, no field). */
|
|
136
|
+
sides?: readonly WrunOptionPrintSide[];
|
|
137
|
+
/** The most days to expiry a print has (1 to 3,650). */
|
|
138
|
+
maxDte?: number;
|
|
139
|
+
moneyness?: WrunOptionPrintsMoneyness;
|
|
71
140
|
}
|
|
72
|
-
/**
|
|
141
|
+
/** The sides a payload's `sides` field names ("ask,bid": om's facet spelling, the words in om's order, one to three
|
|
142
|
+
* of them), or undefined for anything else. */
|
|
143
|
+
export declare function wrunOptionPrintSidesOf(value: unknown): WrunOptionPrintSide[] | undefined;
|
|
144
|
+
/** An instance's payload as the acquisition it carries, or undefined when it names no valid floor or history, or a
|
|
145
|
+
* cut or filter outside its words. */
|
|
73
146
|
export declare function wrunOptionPrintsAcquisitionOf(extras: Readonly<Record<string, unknown>> | null | undefined): WrunOptionPrintsAcquisition | undefined;
|
|
147
|
+
/** An acquisition's cut and filter fields as the payload carries them (`sides` in om's facet spelling), each absent at
|
|
148
|
+
* its default: what the K control forwards to the worker twin. */
|
|
149
|
+
export declare function wrunOptionPrintsCutPayloadOf(acquisition: Pick<WrunOptionPrintsAcquisition, WrunOptionPrintsCutField>): Record<string, unknown>;
|
|
74
150
|
/**
|
|
75
151
|
* Whether a payload's OPRA stamp agrees with the chain it names, the print classes' one rule for a K control: the
|
|
76
152
|
* payload names its chain's exchange, and it carries the stamp (`wrunPlane: 'opra'`, which Door C judged) exactly when
|
|
@@ -164,16 +240,71 @@ export interface WrunOptionPrint {
|
|
|
164
240
|
* counted.
|
|
165
241
|
*/
|
|
166
242
|
export declare function wrunOptionPrintOf(print: Readonly<Record<string, unknown>> | null | undefined, series: Readonly<Record<string, unknown>> | null | undefined): WrunOptionPrint | WrunOptionPrintDrop;
|
|
243
|
+
/** The at-the-money band of the print rule (tsdb-gateway `optionPrintAtTheMoneyBand`, OptionPrint.moneyness): a
|
|
244
|
+
* strike within half a percent of the underlying counts as out of the money. */
|
|
245
|
+
export declare const WRUN_OPTION_PRINT_AT_THE_MONEY_BAND = 0.005;
|
|
246
|
+
/**
|
|
247
|
+
* A print's moneyness by the producer's rule (OptionPrint.moneyness, the gateway's option print job): -1 in the money
|
|
248
|
+
* (a call struck below the underlying less the band, a put struck above it plus the band), +1 otherwise, undefined
|
|
249
|
+
* without an underlying price (the tuple's bit 2 clear). Read off the tuple, so history (whose columns carry no
|
|
250
|
+
* moneyness) and live judge one print alike.
|
|
251
|
+
*/
|
|
252
|
+
export declare function wrunOptionPrintMoneyness(tuple: ArrayLike<number>, at?: number): 1 | -1 | undefined;
|
|
253
|
+
/** The side word of a tuple's aggressor (+1 ask, -1 bid, 0 mid, 2 none). */
|
|
254
|
+
export declare function wrunOptionPrintSideWord(aggressor: number): WrunOptionPrintSide;
|
|
167
255
|
/**
|
|
168
256
|
* Whether a print passes an acquisition's own filters, on history and live alike: its chain (the print's exchange is
|
|
169
257
|
* the chain's, and its book, the series its raw symbol spells, is the ONE book the acquisition reads: two books of one
|
|
170
|
-
* coin never merge), its floor,
|
|
258
|
+
* coin never merge), its floor, "0dte" (expiring on the print's trade date, the producer's `dte_days`), and the OPTLOAD
|
|
259
|
+
* filters: `types` (the tuple's call or put), `sides` (its aggressor's side word), `maxDte` (the producer's
|
|
260
|
+
* `dte_days`, at most) and `moneyness` (`wrunOptionPrintMoneyness`; a print without an underlying price has none).
|
|
171
261
|
*/
|
|
172
|
-
export declare function wrunOptionPrintKept(print: WrunOptionPrint, acquisition: Pick<WrunOptionPrintsAcquisition, 'coin' | 'exchange' | 'book' | 'minPremium' | 'expiries'>): boolean;
|
|
262
|
+
export declare function wrunOptionPrintKept(print: WrunOptionPrint, acquisition: Pick<WrunOptionPrintsAcquisition, 'coin' | 'exchange' | 'book' | 'minPremium' | 'expiries'> & Partial<Pick<WrunOptionPrintsAcquisition, 'types' | 'sides' | 'maxDte' | 'moneyness'>>): boolean;
|
|
173
263
|
/** Whether a cell is a print tuple of the class: exactly 16 finite numbers. */
|
|
174
264
|
export declare function isWrunOptionPrintTuple(cell: unknown): cell is number[];
|
|
265
|
+
/** The order prints happened in: by offset, then by key (two prints in one millisecond). */
|
|
266
|
+
export declare function compareWrunOptionPrintsInTimeOrder(a: ArrayLike<number>, b: ArrayLike<number>): number;
|
|
175
267
|
/** A bar's print tuples in the order they printed: by offset, then by key (two prints in one millisecond). */
|
|
176
268
|
export declare function wrunOptionPrintsInTimeOrder(tuples: ReadonlyArray<ReadonlyArray<number>>): number[][];
|
|
269
|
+
/**
|
|
270
|
+
* The newest cut over a window's prints, the gateway's rule (OPTLOAD-READ-CONTRACT 7.2: `ORDER BY "timestamp" DESC,
|
|
271
|
+
* original_id DESC LIMIT newest`, then every print up to `tailMs` before the oldest kept one): every print stamped at
|
|
272
|
+
* or after the `newest`-th newest print's millisecond less the tail, in the order given. Inclusive at that millisecond:
|
|
273
|
+
* the stamps here are whole ms, so prints the gateway told apart below the ms (or by their id) stay together, and
|
|
274
|
+
* cutting a cut answer again keeps it whole (the worker cuts the union of several reads, each cut on the gateway, to
|
|
275
|
+
* the window's one cut). Fewer prints than `newest`: every print.
|
|
276
|
+
*/
|
|
277
|
+
export declare function wrunNewestOptionPrints<T extends {
|
|
278
|
+
tsMs: number;
|
|
279
|
+
}>(prints: readonly T[], newest: number, tailMs?: number): T[];
|
|
280
|
+
/** Whether a tuple is a partial bar's marker (every value 0 but `present`, bit 14 alone set), never a print. */
|
|
281
|
+
export declare function isWrunOptionPrintMarker(tuple: ArrayLike<number>): boolean;
|
|
282
|
+
/**
|
|
283
|
+
* An instance's host-bar rows `[barOpen, ...tuples]` cut to its acquisition's newest cut over the whole window they
|
|
284
|
+
* hold, the gateway's rule (`wrunNewestOptionPrints`: every print stamped at or after the `newest`-th newest print's
|
|
285
|
+
* millisecond less `newestTailMs`, a print's time its bar's open plus its offset): what a history read of the window
|
|
286
|
+
* answers. The live fold applies it after every drain, so a live bar never outgrows the cut its history was read under
|
|
287
|
+
* (Flow Tape's day bar held the newest 3,000 prints from history, then every live print of the day on top, past its
|
|
288
|
+
* `max_cells`). A bar the cut empties keeps its row, empty or, when it was partial, the marker; a marker is no print.
|
|
289
|
+
* No newest cut, or `overflow: "largest"` (the projection makes the cut there, each bar's largest unioned with the
|
|
290
|
+
* window's newest over every print the rows hold, `wrunLargestOrNewestOptionPrints`, again on every run): the rows as
|
|
291
|
+
* they are (copied).
|
|
292
|
+
*/
|
|
293
|
+
export declare function wrunNewestOptionPrintRows(rows: ReadonlyArray<ReadonlyArray<unknown>>, acquisition: Pick<WrunOptionPrintsAcquisition, 'newest' | 'newestTailMs' | 'overflow'>): unknown[][];
|
|
294
|
+
/**
|
|
295
|
+
* A window's rows `[secondMs, tuples]` as they cross to the page: every tuple packed back to back in ONE Float64Array
|
|
296
|
+
* (16 values each), each row `[secondMs, block]` with the block a view of its second's tuples. The worker posts them
|
|
297
|
+
* BY TRANSFER (comm.worker.util `sendV2RowsTransferringCellsToMainThread`: the one buffer moves, no structured clone
|
|
298
|
+
* walks it) and the lane reads the blocks in place (`forEachWrunOptionPrintTuple`).
|
|
299
|
+
*/
|
|
300
|
+
export declare function packWrunOptionPrintRows(rows: ReadonlyArray<readonly [number, ReadonlyArray<ReadonlyArray<number>>]>): Array<[number, Float64Array]>;
|
|
301
|
+
/**
|
|
302
|
+
* Every print tuple a row's cells hold (from cell 1: cell 0 is the row's stamp), in order, read in place as
|
|
303
|
+
* (source, offset): a packed block's tuples back to back (a Float64Array holding a whole number of them, the worker's
|
|
304
|
+
* answer), a plain tuple (the live fold's, a spec's) at offset 0. A cell of any other shape, and a tuple holding a value
|
|
305
|
+
* that is not finite, is skipped.
|
|
306
|
+
*/
|
|
307
|
+
export declare function forEachWrunOptionPrintTuple(row: ReadonlyArray<unknown>, visit: (source: ArrayLike<number>, offset: number) => void): void;
|
|
177
308
|
/**
|
|
178
309
|
* `overflow: "largest"` over a bar over its bound (om's packer rule, wrun-host/pack.ts `wrunLargestPremiumBlock`):
|
|
179
310
|
* the `maxCells` prints with the largest premium (an equal premium keeps the earlier print; a non-finite premium
|
|
@@ -181,4 +312,42 @@ export declare function wrunOptionPrintsInTimeOrder(tuples: ReadonlyArray<Readon
|
|
|
181
312
|
* the bar as partial. A bar within its bound is returned as it is.
|
|
182
313
|
*/
|
|
183
314
|
export declare function wrunLargestPremiumPrints(tuples: ReadonlyArray<ReadonlyArray<number>>, maxCells: number): ReadonlyArray<ReadonlyArray<number>>;
|
|
315
|
+
/**
|
|
316
|
+
* Where the window's newest cut ends under `overflow: "largest"` (the union, the SDK's frozen contract): the window's
|
|
317
|
+
* `newest` newest prints ranked by time, then print key, newest first, exactly `newest` of them (a print's time its
|
|
318
|
+
* bar's open plus its offset; the gateway keeps every print sharing the last one's millisecond, the key cuts them here),
|
|
319
|
+
* read as the last of them: its time, its key and its bar's open. A print is inside the cut when its time, then its
|
|
320
|
+
* key, is at or after the bound's.
|
|
321
|
+
*/
|
|
322
|
+
export interface WrunNewestOptionPrintBound {
|
|
323
|
+
atMs: number;
|
|
324
|
+
key: number;
|
|
325
|
+
barOpenMs: number;
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* The bound of the window's newest cut over every bar an instance holds (`WrunNewestOptionPrintBound`), or undefined
|
|
329
|
+
* when they hold fewer than `newest` prints (every print is inside the cut). A partial bar's marker is no print. The
|
|
330
|
+
* bound is the same over the gateway's union answer, today's whole download and either one merged with live prints: each
|
|
331
|
+
* holds the window's `newest` newest prints whole.
|
|
332
|
+
*/
|
|
333
|
+
export declare function wrunNewestOptionPrintBound(bars: ReadonlyArray<{
|
|
334
|
+
readonly openMs: number;
|
|
335
|
+
readonly tuples: ReadonlyArray<ReadonlyArray<number>>;
|
|
336
|
+
}>, newest: number): WrunNewestOptionPrintBound | undefined;
|
|
337
|
+
/**
|
|
338
|
+
* One bar's prints under `overflow: "largest"` beside the window's newest cut (the union, the SDK's frozen contract):
|
|
339
|
+
* its `maxCells` largest (`wrunLargestPremiumPrints`' order) and every print inside the cut (`bound`, from
|
|
340
|
+
* `wrunNewestOptionPrintBound`), each once, in the order given. So a block holds at most `maxCells` plus the cut's
|
|
341
|
+
* count, the read's capacity for the input (wrun-cell-capacity.leaf `wrunCellReadCapacity`), which a module holds whole
|
|
342
|
+
* only when its sheet's `capacity` does (`wrunCellBlockTuples`).
|
|
343
|
+
*
|
|
344
|
+
* Bit 14 on the first kept print, by a rule every answer reads alike (the gateway's union answer, today's whole
|
|
345
|
+
* download, either one merged with live prints), so the cells never depend on the path: a bar older than the bar
|
|
346
|
+
* holding the bound, past `maxCells` prints (none of its prints is newest: its largest alone, as without the cut); and
|
|
347
|
+
* the bar holding the bound, past `maxCells` prints, even when nothing it holds is left out (the gateway answers its
|
|
348
|
+
* largest and its prints inside the cut, so whether an older and smaller print was left out cannot be told there). A bar
|
|
349
|
+
* newer than that one holds only prints inside the cut, and with no bound (fewer than `newest` prints in the window)
|
|
350
|
+
* every bar holds every print, unmarked.
|
|
351
|
+
*/
|
|
352
|
+
export declare function wrunLargestOrNewestOptionPrints(tuples: ReadonlyArray<ReadonlyArray<number>>, barOpenMs: number, maxCells: number, bound: WrunNewestOptionPrintBound | undefined): ReadonlyArray<ReadonlyArray<number>>;
|
|
184
353
|
export {};
|