@orangecharts/wrun-chart-host 0.8.0 → 0.10.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.
Files changed (246) hide show
  1. package/README.md +3 -1
  2. package/dist/constants/feature-flags.constants.d.ts +9 -0
  3. package/dist/constants/feature-flags.constants.js +86 -16
  4. package/dist/constants/marketCapabilities.constants.d.ts +14 -9
  5. package/dist/constants/marketCapabilities.constants.js +36 -13
  6. package/dist/constants/opra-compliance.constants.d.ts +15 -0
  7. package/dist/constants/opra-compliance.constants.js +15 -0
  8. package/dist/constants/option-venues.constants.d.ts +11 -6
  9. package/dist/constants/option-venues.constants.js +5 -2
  10. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
  11. package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
  12. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
  13. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
  14. package/dist/constants/venue-presets.constants.d.ts +20 -20
  15. package/dist/constants/venue-presets.constants.js +24 -26
  16. package/dist/host-env.d.ts +39 -9
  17. package/dist/host-env.js +6 -0
  18. package/dist/host-ports.types.d.ts +108 -18
  19. package/dist/index.d.ts +14 -0
  20. package/dist/index.js +14 -0
  21. package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
  22. package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
  23. package/dist/interfaces/opra-realtime.interface.js +10 -10
  24. package/dist/interfaces/replay.interface.d.ts +8 -0
  25. package/dist/interfaces/wrun-runtime.interface.d.ts +52 -15
  26. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +94 -14
  27. package/dist/kscript-data/controls/live-trades-merge.util.js +132 -22
  28. package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
  29. package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
  30. package/dist/market-data/billing.interface.d.ts +227 -42
  31. package/dist/market-data/billing.interface.js +60 -12
  32. package/dist/market-data/venue.d.ts +88 -6
  33. package/dist/market-data/venues/cme.contract.copy.json +66 -0
  34. package/dist/market-data/venues/cme.d.ts +126 -0
  35. package/dist/market-data/venues/cme.js +133 -0
  36. package/dist/market-data/venues/index.d.ts +165 -8
  37. package/dist/market-data/venues/index.js +48 -6
  38. package/dist/market-data/venues/opra.contract.copy.json +5 -3
  39. package/dist/market-data/venues/opra.d.ts +3 -3
  40. package/dist/market-data/venues/opra.js +5 -4
  41. package/dist/replay/replayLadder.js +3 -1
  42. package/dist/settings-templates/index.js +7 -3
  43. package/dist/settings-templates/indicator-fields.d.ts +5 -4
  44. package/dist/settings-templates/indicator-fields.js +45 -6
  45. package/dist/settings-templates/tool-rules.d.ts +27 -17
  46. package/dist/settings-templates/tool-rules.js +27 -11
  47. package/dist/settings-templates/tool-tables.generated.js +91 -31
  48. package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
  49. package/dist/utility/chart/book-live-bucket.util.js +47 -0
  50. package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
  51. package/dist/utility/chart/crypto-index.leaf.js +2 -2
  52. package/dist/utility/chart/index-mode-admission.util.js +24 -3
  53. package/dist/utility/chart/index-mode.util.d.ts +5 -2
  54. package/dist/utility/chart/index-mode.util.js +23 -13
  55. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
  56. package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
  57. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
  58. package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
  59. package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
  60. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
  61. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
  62. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
  63. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -27
  64. package/dist/utility/chart/kscript-venue-policy.util.js +74 -32
  65. package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
  66. package/dist/utility/chart/market-session-schedule.util.js +16 -0
  67. package/dist/utility/chart/marketKind.util.d.ts +12 -10
  68. package/dist/utility/chart/marketKind.util.js +17 -7
  69. package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
  70. package/dist/utility/chart/om-panel-push-style.util.js +17 -15
  71. package/dist/utility/chart/om-panel.util.js +6 -6
  72. package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
  73. package/dist/utility/chart/opra-read-access.leaf.js +5 -3
  74. package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
  75. package/dist/utility/chart/profile-block-size.util.js +7 -0
  76. package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
  77. package/dist/utility/chart/quote-perp.leaf.js +20 -0
  78. package/dist/utility/chart/rth-session.util.d.ts +3 -2
  79. package/dist/utility/chart/rth-session.util.js +2 -1
  80. package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
  81. package/dist/utility/chart/window-geometry.leaf.js +22 -6
  82. package/dist/utility/chart/wrun-run-result.util.d.ts +17 -0
  83. package/dist/utility/chart/wrun-run-result.util.js +145 -7
  84. package/dist/utility/common/transformations.util.d.ts +7 -0
  85. package/dist/utility/common/transformations.util.js +11 -0
  86. package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
  87. package/dist/utility/options/option-bar-anchor.util.js +340 -0
  88. package/dist/utility/options/option-venue.util.d.ts +21 -3
  89. package/dist/utility/options/option-venue.util.js +30 -3
  90. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
  91. package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
  92. package/dist/utility/wrun/derived-roots.util.js +471 -0
  93. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
  94. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
  95. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
  96. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
  97. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +5 -3
  98. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +6 -4
  99. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
  100. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
  101. package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
  102. package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
  103. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
  104. package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
  105. package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
  106. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
  107. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
  108. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +15 -6
  109. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +14 -0
  110. package/dist/utility/wrun/sources/row-lanes/option_prints.js +82 -13
  111. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
  112. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -8
  113. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +95 -14
  114. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
  115. package/dist/utility/wrun/sources/row-lanes/option_surface.js +7 -3
  116. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
  117. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +35 -14
  118. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +70 -20
  119. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
  120. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
  121. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +45 -1
  122. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +114 -6
  123. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +56 -5
  124. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +224 -26
  125. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +822 -58
  126. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
  127. package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
  128. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
  129. package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
  130. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
  131. package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
  132. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
  133. package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
  134. package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
  135. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +192 -13
  136. package/dist/utility/wrun/wrun-chart-market-facts.util.js +437 -55
  137. package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
  138. package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
  139. package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
  140. package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
  141. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
  142. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
  143. package/dist/utility/wrun/wrun-download-meter.util.d.ts +107 -0
  144. package/dist/utility/wrun/wrun-download-meter.util.js +134 -0
  145. package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
  146. package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
  147. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
  148. package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
  149. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
  150. package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
  151. package/dist/utility/wrun/wrun-frames.d.ts +27 -6
  152. package/dist/utility/wrun/wrun-frames.js +78 -15
  153. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  154. package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
  155. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
  156. package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
  157. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +51 -21
  158. package/dist/utility/wrun/wrun-hud-looks.util.js +74 -28
  159. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
  160. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
  161. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
  162. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
  163. package/dist/utility/wrun/wrun-live-intake.util.d.ts +19 -9
  164. package/dist/utility/wrun/wrun-live-intake.util.js +213 -45
  165. package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
  166. package/dist/utility/wrun/wrun-live-tick.util.js +246 -49
  167. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
  168. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
  169. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +205 -48
  170. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +277 -34
  171. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
  172. package/dist/utility/wrun/wrun-market-size-defaults.util.js +340 -56
  173. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
  174. package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
  175. package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
  176. package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
  177. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
  178. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
  179. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +26 -6
  180. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +50 -11
  181. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +109 -19
  182. package/dist/utility/wrun/wrun-option-strike-flow.util.js +222 -61
  183. package/dist/utility/wrun/wrun-option-views.util.d.ts +96 -18
  184. package/dist/utility/wrun/wrun-option-views.util.js +246 -51
  185. package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
  186. package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
  187. package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
  188. package/dist/utility/wrun/wrun-output-style.util.js +20 -2
  189. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +20 -0
  190. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
  191. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
  192. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
  193. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
  194. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
  195. package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
  196. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
  197. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  198. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +134 -37
  199. package/dist/utility/wrun/wrun-overlay-run.util.js +1118 -254
  200. package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
  201. package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
  202. package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
  203. package/dist/utility/wrun/wrun-pack.util.js +20 -9
  204. package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
  205. package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
  206. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
  207. package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
  208. package/dist/utility/wrun/wrun-panel-style.util.d.ts +37 -24
  209. package/dist/utility/wrun/wrun-panel-style.util.js +100 -29
  210. package/dist/utility/wrun/wrun-param-map.util.d.ts +15 -11
  211. package/dist/utility/wrun/wrun-param-map.util.js +13 -5
  212. package/dist/utility/wrun/wrun-param-values.util.d.ts +21 -3
  213. package/dist/utility/wrun/wrun-param-values.util.js +6 -0
  214. package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
  215. package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
  216. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
  217. package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
  218. package/dist/utility/wrun/wrun-refusal.util.js +10 -1
  219. package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
  220. package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
  221. package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
  222. package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
  223. package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
  224. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +52 -1
  225. package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
  226. package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
  227. package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
  228. package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
  229. package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
  230. package/dist/utility/wrun/wrun-source-rows.util.d.ts +9 -1
  231. package/dist/utility/wrun/wrun-source-rows.util.js +108 -43
  232. package/dist/utility/wrun/wrun-style-words.util.js +6 -4
  233. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
  234. package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
  235. package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
  236. package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
  237. package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
  238. package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
  239. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
  240. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
  241. package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
  242. package/dist/utils/replay/replay-buffer-math.js +227 -20
  243. package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
  244. package/dist/workers/utils/volume-profile.worker.util.js +5 -2
  245. package/dist/workers/wrun/wrun-abi-host.js +3 -2
  246. package/package.json +5 -5
@@ -46,8 +46,15 @@
46
46
  * Beside the five the host fill carries `market.option_multiplier()` (kit 0.87.0,
47
47
  * om WRUN_OPTION_FACT_FILLS, which only the chart's browser lane fills): the US
48
48
  * dollars one price unit times one size unit of an option on the chart's options
49
- * chain is worth, 100 on OPRA, the CME root's point value, 1 on a crypto chart,
50
- * else 0 (wrunChartOptionMultiplier).
49
+ * chain is worth, 100 on OPRA (a stock twin reading its stock's OPRA chain too:
50
+ * the `optionsExchange` fact), the CME root's point value, 1 on a crypto chart,
51
+ * else 0 (wrunChartOptionMultiplier); `market.dollar_multiplier()` (kit 0.95.0):
52
+ * the US dollars one size unit of the market's own trades at one price unit is
53
+ * worth, the market's proven dollar unit (wrunMarketDollarUnit: the CME
54
+ * registry's point value, NQ 20; 1 on a market quoted in dollars), else 0; and
55
+ * `market.option_contract()` (C5, a kit word by 0.102.0): 1 when the chart's
56
+ * market is one option contract (an OPRA contract, a CME or crypto option), else
57
+ * 0 (wrunChartOptionContract), so no recipe guesses it from price distance.
51
58
  *
52
59
  * The 0 rule: a fact the chart does not know is 0, never a guess. Main thread
53
60
  * only (the directory read goes through the markets service); the hosted lanes
@@ -55,6 +62,7 @@
55
62
  */
56
63
  import type { WrunMarketKind, WrunMarketQuoteIsUsd } from '@orangecharts/indicator-kit';
57
64
  import type { WrunVenueLegsResult } from '../../host-ports.types.js';
65
+ import type { CmeExchangeDto } from '../../interfaces/cme-realtime.interface.js';
58
66
  import type { WrunIndicatorMetadata } from '../../interfaces/wrun-runtime.interface.js';
59
67
  /** The five facts one run reads, as the codes the module sees. */
60
68
  export interface WrunMarketFacts {
@@ -69,10 +77,18 @@ export interface WrunMarketFacts {
69
77
  /** The minute on the market's clock its trade day opens (0 midnight). */
70
78
  sessionOpen: number;
71
79
  }
72
- /** The option fact the host fill carries beside the five (om WRUN_OPTION_FACT_FILLS, kit 0.87.0). */
80
+ /** The option facts the host fill carries beside the five: the option multiplier (om WRUN_OPTION_FACT_FILLS, kit
81
+ * 0.87.0) and whether the chart is one option contract (C5, `market.option_contract()`). */
73
82
  export interface WrunOptionFacts {
74
83
  /** The US dollars one price unit times one size unit of an option on the chart's options chain is worth (0 none). */
75
84
  optionMultiplier: number;
85
+ /** 1 when the chart's market is one option contract, else 0 (wrunChartOptionContract). */
86
+ optionContract: number;
87
+ }
88
+ /** The trade value fact the host fill carries beside the five (kit 0.95.0, `market.dollar_multiplier()`). */
89
+ export interface WrunDollarFacts {
90
+ /** The US dollars one size unit of the market's own trades at one price unit is worth (0 while not proven). */
91
+ dollarMultiplier: number;
76
92
  }
77
93
  /** The chart market the facts are of: the chart metadata's own fields. */
78
94
  export interface WrunFactsMarket {
@@ -80,6 +96,12 @@ export interface WrunFactsMarket {
80
96
  symbol?: unknown;
81
97
  normalizedSymbol?: unknown;
82
98
  category?: unknown;
99
+ /** A continuous CME chart's lead contract as the chart stamped it (`ESZ6` under `ES1!`), when it did. */
100
+ resolvedContract?: unknown;
101
+ /** The exchange of the market whose options the chart reads, as the options seam names it (web:
102
+ * opra-options-gate.util `chartOptionsMarket`): a stock twin's US stock venue (POLYGON) while the opra flag is lit.
103
+ * Absent: the chart's own exchange (every other market answers itself). Read by `wrunChartOptionMultiplier` alone. */
104
+ optionsExchange?: unknown;
83
105
  }
84
106
  /** The directory row fields the facts read, duck-typed like om's (the wire
85
107
  * carries `assetClass` and `quoteAssetId` beside the declared type). */
@@ -96,9 +118,13 @@ export interface CmeRootSpec {
96
118
  pointValue: number;
97
119
  /** The quotation currency of the price the chart draws. */
98
120
  quote: WrunMarketQuoteIsUsd;
121
+ /** The CME Group exchange the root lists on (its contracts and its options). */
122
+ exchange: CmeExchangeDto;
99
123
  }
100
124
  /** Read-only outside this module: the paper venue reads each contract's point value from it. */
101
125
  export declare const CME_ROOT_SPECS: Readonly<Record<string, Readonly<CmeRootSpec>>>;
126
+ /** The CME Group exchange a futures root lists on (`CME_ROOT_SPECS`), or undefined for a root off the table. */
127
+ export declare function wrunCmeRootExchange(root: string): CmeExchangeDto | undefined;
102
128
  /**
103
129
  * The five facts the chart fills for `market` (the module doc): om's rules
104
130
  * over the directory `row` (undefined when the chart has none: not read, not
@@ -106,6 +132,11 @@ export declare const CME_ROOT_SPECS: Readonly<Record<string, Readonly<CmeRootSpe
106
132
  * knowledge where om's answer is unknown. Pure.
107
133
  */
108
134
  export declare function wrunChartMarketFacts(market: WrunFactsMarket | undefined, row?: WrunMarketDirectoryRow): WrunMarketFacts;
135
+ /** The host_fill word of `market.dollar_multiplier()` (kit 0.95.0). */
136
+ export declare const WRUN_DOLLAR_MULTIPLIER_FILL = "dollar_multiplier";
137
+ /** A sheet reading `market.dollar_multiplier()` on a market whose dollar unit is not proven (wrunMarketDollarUnit):
138
+ * the run head's refusal by name, before any fetch (no trade could be valued). */
139
+ export declare const WRUN_DOLLAR_MULTIPLIER_UNPROVEN_CODE = "wrun_dollar_multiplier_unproven";
109
140
  /**
110
141
  * `market.option_multiplier()` of the chart market `market` (kit 0.87.0): the US dollars one price unit times one
111
142
  * size unit of an option on the chart's options chain is worth, so a package's premium is size x price x the fact.
@@ -116,8 +147,9 @@ export declare function wrunChartMarketFacts(market: WrunFactsMarket | undefined
116
147
  * CME a CME-governed chart reads the chain of its own root: the root's point value (CME_ROOT_SPECS, ES 50,
117
148
  * NQ 20) when the root is quoted in US dollars; a root off the table, or quoted in another unit (a CBOT
118
149
  * grain quotes US cents), is 0.
119
- * OPRA a chart whose options list on OPRA (the venue table: an OPRA contract chart, a US stock or ETF chart):
120
- * 100.
150
+ * OPRA a chart whose options list on OPRA (the venue table over the options seam's market, `optionsExchange`
151
+ * else the chart's own: an OPRA contract chart, a US stock or ETF chart, a stock twin while the opra flag
152
+ * is lit): 100.
121
153
  * crypto a chart on a crypto exchange, whichever venue and category (isCryptoChartVenue): its chain, when it has
122
154
  * one, is a crypto chain (its own option venue's, the coin's Deribit chain, or another crypto venue's that
123
155
  * lists the coin), priced in dollars per coin on every venue: 1. A crypto chart with no chain serves no
@@ -131,12 +163,41 @@ export declare function wrunChartMarketFacts(market: WrunFactsMarket | undefined
131
163
  * multiply). Pure.
132
164
  */
133
165
  export declare function wrunChartOptionMultiplier(market: WrunFactsMarket | undefined): number;
166
+ /** The host_fill word of `market.option_contract()` (C5), a WrunParamHostFill word of the kit the chart pins
167
+ * (0.102.0). The host fills the hidden param `market_option_contract` by this word, never by a slot, so a package
168
+ * compiled without the word keeps every init slot and no scaffold bump is needed. */
169
+ export declare const WRUN_OPTION_CONTRACT_FILL = "option_contract";
170
+ /**
171
+ * `market.option_contract()` of the chart market `market` (C5): 1 when the chart is one option contract, else 0. A
172
+ * recipe that marks the underlying's prices (Option Prints) reads it to draw no marks on a contract's own price axis,
173
+ * instead of guessing from price distance. The add door's identity (cme-option-indicator-availability.util
174
+ * isOptionContractChart, which the option-contract indicator refusals read), widened to the crypto option venues:
175
+ *
176
+ * OPRA every chart on the OPRA venue is one contract, a document saved without its category included.
177
+ * CME a chart whose category is OPTION (`ESZ6 C6000`): the category tells the contract from the future on the
178
+ * same venue (ESZ6, ES1!).
179
+ * crypto a chart whose category is OPTION, or one on a plain option venue whose symbol the venue's grammar parses
180
+ * (isPlainOptionContract: Deribit `BTC-25DEC26-100000-C`), so a contract saved without its category still
181
+ * reads 1 and the venue's perpetual (`BTC-PERPETUAL`) reads 0.
182
+ * else 0: a stock or ETF (SPY/USD, an options underlying), a future, a perpetual, spot, forex, an index, an
183
+ * economic series, a prediction market, an unknown venue, no market.
184
+ *
185
+ * The chart metadata alone decides, synchronously and with no read, like the option multiplier. Pure.
186
+ */
187
+ export declare function wrunChartOptionContract(market: WrunFactsMarket | undefined): number;
134
188
  /** True when the sheet declares one of the market's facts (a host-filled
135
- * param on `kind`, `point_value`, `zone`, `quote_is_usd`, `session_open` or
136
- * `option_multiplier`): the runs whose host fill carries the market's facts.
137
- * Only a sheet that declares a directory fact waits for the read
138
- * (wrunMarketFactsNeedDirectory). */
189
+ * param on `kind`, `point_value`, `zone`, `quote_is_usd`, `session_open`,
190
+ * `option_multiplier`, `dollar_multiplier` or `option_contract`): the runs
191
+ * whose host fill carries the market's facts. Only a sheet that declares a
192
+ * directory fact waits for the read (wrunMarketFactsNeedDirectory). */
139
193
  export declare function wrunReadsMarketFacts(metadata: Pick<WrunIndicatorMetadata, 'params'> | undefined): boolean;
194
+ /** True when the sheet reads the market's dollar multiplier (a host-filled param on `dollar_multiplier`, kit
195
+ * 0.95.0): its run proves the market's dollar unit at its head before any fetch (wrun-overlay-run.util), so its
196
+ * module, its batched captions and its dollar tape read one number. */
197
+ export declare function wrunReadsDollarMultiplier(metadata: Pick<WrunIndicatorMetadata, 'params'> | undefined): boolean;
198
+ /** wrunReadsDollarMultiplier over an overlay's declared inputs (`settings.scriptInputs`), for a lane that holds no
199
+ * sheet (the cloud payload): a row under the fact's generated name. */
200
+ export declare function wrunDeclaresDollarMultiplier(declarations: unknown): boolean;
140
201
  /** True when the sheet declares a fact the directory row answers (`kind`,
141
202
  * `quote_is_usd`), or a `visible_by` list on a setting or an output, or a
142
203
  * `needed_by` list on an input source (wrunLaneDemandNeedsDirectory), that
@@ -245,9 +306,127 @@ export declare function warmWrunMarketFacts(market: WrunFactsMarket | undefined)
245
306
  * directory answered, failed recently, or is never asked for its venue. */
246
307
  export declare function wrunMarketFactsSettled(market: WrunFactsMarket | undefined): boolean;
247
308
  /** The facts the chart fills for `market` now (synchronous): the five over the
248
- * directory row once warmWrunMarketFacts settled it, else without one, and
249
- * the option multiplier of its options chain (wrunChartOptionMultiplier: the
250
- * venue tables alone, no read). */
251
- export declare function wrunMarketFactsFor(market: WrunFactsMarket | undefined): WrunMarketFacts & WrunOptionFacts;
309
+ * directory row once warmWrunMarketFacts settled it, else without one, the
310
+ * option multiplier of its options chain (wrunChartOptionMultiplier: the
311
+ * venue tables alone, no read), whether it is one option contract
312
+ * (wrunChartOptionContract: its metadata alone, no read) and the dollar
313
+ * multiplier of its own trades (wrunMarketDollarUnit over the reads
314
+ * warmWrunMarketDollarFacts settled; 0 while it is not proven). Every word is
315
+ * written on every market, 0 included, so the block keeps one shape. */
316
+ export declare function wrunMarketFactsFor(market: WrunFactsMarket | undefined): WrunMarketFacts & WrunOptionFacts & WrunDollarFacts;
317
+ /**
318
+ * What the instrument registry (StreamRegistryMetadatas, the metadata service's `getSymbolMetadata`) proves about one
319
+ * market's prices on every wire it rides, so the chart prices a print by the server's own facts, never by a table of
320
+ * ours or a venue list:
321
+ *
322
+ * pointValue the US dollars one whole point of price is worth on one contract of a point-valued product: every CME
323
+ * Group future (ES 50, 6A 100,000, ZN 1,000, and per US cent on the cents-quoted grains: ZC 50, ZL
324
+ * 600), the number the large-print writer prices the table's copies with; null elsewhere. A
325
+ * point-valued product's stored amount is contracts and live-feed never multiplies it, so its COIN arm
326
+ * is contracts too.
327
+ * quote the quote asset its normalized symbol names (`BTC-USDT` quotes USDT).
328
+ *
329
+ * Never the record's `contractMultiplier` or `inverse`: a session that reads the catalog over /v3 (the production
330
+ * route, `METHOD.STREAM_REGISTRY_METADATAS` in workers/constants/gateway-routes.ts) gets a crypto row with no unit
331
+ * field at all (workers/v3/v3-instruments.ts `CRYPTO_CATALOG_TO_V2`: the /v3 CryptoInstrument carries none), so their
332
+ * absence proves nothing; measured 2026-10-22 on a logged-in page, where gate.io futures BTC_USDT read no multiplier
333
+ * that a guest's v2 read gives as 0.0001. The CME translation keeps the point value (`cmeRegistryV2`). A stored unit's
334
+ * dollars are the writer's own rows instead (`warmWrunMarketStoredUnit`). A continuous CME chart (`ES1!`) reads its
335
+ * lead contract's record: the continuous record carries the root's raw multiplier and no point value. Recorded in
336
+ * tests/fixtures/wrun/tape-dollar-units.json: every CME Group root the large-print table floors, its registry point
337
+ * value equal to the writer's quote amount per contract and point.
338
+ */
339
+ export interface WrunMarketTradeUnits {
340
+ pointValue: number | null;
341
+ quote: string | undefined;
342
+ }
343
+ /** The trade units of one registry record (a `getSymbolMetadata` answer), null for no record. Pure. */
344
+ export declare function wrunMarketTradeUnitsOf(record: Record<string, unknown> | null | undefined): WrunMarketTradeUnits | null;
345
+ /**
346
+ * Ask the instrument registry for `market`'s trade units: once per market for the session, a definite answer (the
347
+ * record's units, or none) kept; concurrent callers share one read; a failed read, or a continuous chart whose lead is
348
+ * not known yet, is asked again a minute later. A host whose metadata service reads no registry record
349
+ * (`getSymbolMetadata` unbound) settles none. Never rejects. The read is fresh (`{ fresh: true }`, as the option units
350
+ * read is): a cached record can predate the registry's point value fill.
351
+ */
352
+ export declare function warmWrunMarketTradeUnits(market: WrunFactsMarket | undefined): Promise<void>;
353
+ /** The registry's units of `market` once a read settled them: the units, null for no record, undefined while the
354
+ * registry can still answer (not asked yet, in flight, or a failed read that is retried). Synchronous. */
355
+ export declare function wrunMarketTradeUnitsNow(market: WrunFactsMarket | undefined): WrunMarketTradeUnits | null | undefined;
356
+ /** Warm everything a market's dollar unit and stored unit read (C-DOLLAR): the directory row (a crypto market's quote)
357
+ * and the instrument registry's units. Never rejects. */
358
+ export declare function warmWrunMarketDollarFacts(market: WrunFactsMarket | undefined): Promise<void>;
359
+ /** True when a read of `market`'s dollar unit now would wait on nothing (warmWrunMarketDollarFacts): the directory row
360
+ * (wrunMarketFactsSettled) and the registry's units each answered, failed recently, or are never asked. */
361
+ export declare function wrunMarketDollarFactsSettled(market: WrunFactsMarket | undefined): boolean;
362
+ /** What one price unit times one size unit is worth in US dollars on a market (`unit`), or why that cannot be proven:
363
+ * `point-value` (no point value: ICE, PLATTS, an option contract, a CME contract the registry holds none for) or
364
+ * `quote` (the market is quoted in something other than dollars, or its quote is not known), `transient` while a read
365
+ * can still answer it (the directory row, the registry record). */
366
+ export type WrunMarketDollarUnit = {
367
+ kind: 'dollars';
368
+ unit: number;
369
+ } | {
370
+ kind: 'unproven';
371
+ reason: 'point-value' | 'quote';
372
+ transient: boolean;
373
+ };
374
+ /**
375
+ * The US dollars one price unit times one live-feed COIN-arm size unit is worth on `market` (C-DOLLAR's unit value).
376
+ * ONE rule for every market, read off the server's facts and never off a venue list or a table of ours:
377
+ *
378
+ * - A CME Group contract counts contracts on the COIN arm (live-feed never multiplies a point-valued product), so its
379
+ * unit is the instrument registry's point value, in US dollars per point (`warmWrunMarketTradeUnits`: ES 50, 6A
380
+ * 100,000, a cents-quoted grain per cent, ZC 50 and ZL 600), the number the large-print writer prices the table's
381
+ * copies with. An option contract, or a contract the registry holds no point value for, cannot be priced.
382
+ * - Every other market counts its base asset on the COIN arm (live-feed applied each instrument's contract multiplier
383
+ * and its inverse flag), so its unit is the market facts' point value (1, `market.point_value()`; 0 on ICE and
384
+ * PLATTS, whose multipliers no one serves) on a market quoted in dollars (`wrunMarketQuoteInDollars`).
385
+ *
386
+ * A candle's volume times its close times the unit is that candle's dollar volume (the dollar default,
387
+ * wrun-market-size-defaults), and a live print's price times its COIN-arm size times the unit is the print's dollar
388
+ * value (the tape's live fold). A fact that cannot be proven is a named reason, never a guess; `transient` while a read
389
+ * can still answer it. Synchronous: the reads are taken once `warmWrunMarketDollarFacts` settled them.
390
+ */
391
+ export declare function wrunMarketDollarUnit(market: WrunFactsMarket | undefined): WrunMarketDollarUnit;
392
+ /** What one unit of a market's STORED trade amount is worth in US dollars (`perUnit`, at the price of the large print
393
+ * it was read off), or why that cannot be proven: the dollar unit's reasons, `rows` (no large print to read it off:
394
+ * none in the read's windows, or a host that reads no series). */
395
+ export type WrunMarketStoredUnitDollars = {
396
+ kind: 'dollars';
397
+ perUnit: number;
398
+ } | {
399
+ kind: 'unproven';
400
+ reason: 'point-value' | 'quote' | 'rows';
401
+ transient: boolean;
402
+ };
403
+ /**
404
+ * The large-print writer's dollars per STORED unit off a TRADE_LARGE answer (decoded series frames, the TRADES
405
+ * columns): `quoteAmount / amount` of the newest row whose both are finite and above zero, undefined when no row is.
406
+ * The writer prices each copy per instrument (contracts times the contract multiplier times the price on a linear
407
+ * market, the contract's dollar face on an inverse one, contracts times the price times the point value on CME), so the
408
+ * ratio is what one stored unit was worth at that print, on every venue, with no unit of ours. Pure.
409
+ */
410
+ export declare function wrunStoredUnitDollarsOfRows(frames: readonly unknown[]): number | undefined;
411
+ /**
412
+ * Read what one STORED unit of `market` is worth in dollars off the large-print writer's own rows: the market's newest
413
+ * TRADE_LARGE print (`wrunStoredUnitDollarsOfRows`), through the host's series read on the K_TRADES history's own wire
414
+ * (the chart's market, its wire venue as the K_TRADES worker spells it; TRADE_LARGE is a v2-only read, never the /v3
415
+ * catalog, whose crypto rows carry no unit): one row, newest first, over the table's week. Once per market for the
416
+ * session; concurrent callers share one read; a failed read is asked again a minute later. A host whose v2 service
417
+ * reads no series (`sendSeriesOneShot` unbound) settles none. Never rejects. Only a run head with a raw floor to carry
418
+ * asks it (wrun-market-size-defaults.util).
419
+ */
420
+ export declare function warmWrunMarketStoredUnit(market: WrunFactsMarket | undefined): Promise<void>;
421
+ /**
422
+ * The US dollars one unit of `market`'s STORED trade amount is worth (the large-print table's `amount`, the unit a
423
+ * 0.5.0 Big Trades Min size floored by: contracts of 0.0001 BTC on gate.io futures BTC_USDT, of 0.01 BTC on an OKX
424
+ * swap, $100 contracts on Binance delivery BTCUSD_PERP, contracts on CME): the writer's own price of one, read off the
425
+ * market's newest large print (`warmWrunMarketStoredUnit`), on a market whose dollar unit is proven (its quote
426
+ * amounts are dollars). ONE rule for every venue, linear, inverse and CME alike, no venue list and no multiplier of
427
+ * ours; a fact that cannot be proven is a named reason, `transient` while a read can still answer it. Synchronous over
428
+ * `warmWrunMarketDollarFacts` and `warmWrunMarketStoredUnit`.
429
+ */
430
+ export declare function wrunMarketStoredUnitDollars(market: WrunFactsMarket | undefined): WrunMarketStoredUnitDollars;
252
431
  /** Forget every kept answer (spec isolation). */
253
432
  export declare function clearWrunMarketFactsMemo(): void;