@orangecharts/wrun-chart-host 0.11.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +1 -0
  2. package/dist/constants/feature-flags.constants.d.ts +4 -4
  3. package/dist/constants/feature-flags.constants.js +38 -52
  4. package/dist/constants/feature-limits.constants.d.ts +1 -1
  5. package/dist/constants/feature-limits.constants.js +5 -4
  6. package/dist/constants/interval.constants.d.ts +7 -0
  7. package/dist/constants/interval.constants.js +7 -0
  8. package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
  9. package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
  10. package/dist/constants/stocks-compliance.constants.d.ts +15 -0
  11. package/dist/constants/stocks-compliance.constants.js +15 -0
  12. package/dist/host-env.d.ts +69 -3
  13. package/dist/host-env.js +21 -0
  14. package/dist/host-ports.types.d.ts +36 -3
  15. package/dist/index.d.ts +18 -0
  16. package/dist/index.js +19 -0
  17. package/dist/indicators/controls/tpo-session.util.d.ts +52 -12
  18. package/dist/indicators/controls/tpo-session.util.js +113 -16
  19. package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
  20. package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
  21. package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
  22. package/dist/interfaces/cme-realtime.interface.js +2 -1
  23. package/dist/interfaces/feed.interface.d.ts +15 -1
  24. package/dist/interfaces/replay.interface.d.ts +5 -0
  25. package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
  26. package/dist/interfaces/stocks-realtime.interface.js +5 -4
  27. package/dist/interfaces/wrun-runtime.interface.d.ts +141 -20
  28. package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
  29. package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
  30. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
  31. package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
  32. package/dist/market-data/billing.interface.d.ts +9 -1
  33. package/dist/market-data/venue.d.ts +1 -1
  34. package/dist/market-data/venues/index.d.ts +5 -5
  35. package/dist/market-data/venues/opra.js +3 -3
  36. package/dist/market-data/venues/stocks.contract.copy.json +6 -5
  37. package/dist/market-data/venues/stocks.d.ts +5 -5
  38. package/dist/market-data/venues/stocks.js +21 -18
  39. package/dist/settings-templates/frvp-fields.d.ts +12 -1
  40. package/dist/settings-templates/frvp-fields.js +15 -4
  41. package/dist/settings-templates/index.js +12 -5
  42. package/dist/settings-templates/indicator-fields.js +43 -2
  43. package/dist/settings-templates/tool-rules.d.ts +17 -8
  44. package/dist/settings-templates/tool-rules.js +15 -8
  45. package/dist/settings-templates/tool-tables.generated.js +4 -2
  46. package/dist/utility/auth/server-clock.util.d.ts +3 -1
  47. package/dist/utility/auth/server-clock.util.js +3 -1
  48. package/dist/utility/chart/book-live-bucket.util.js +2 -2
  49. package/dist/utility/chart/cache-alignment.util.d.ts +38 -7
  50. package/dist/utility/chart/cache-alignment.util.js +50 -13
  51. package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
  52. package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
  53. package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
  54. package/dist/utility/chart/cme-session-bucket.util.js +25 -332
  55. package/dist/utility/chart/continuous-contracts.util.js +6 -5
  56. package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
  57. package/dist/utility/chart/display-offset.leaf.js +41 -0
  58. package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
  59. package/dist/utility/chart/effective-chart-session.util.js +13 -5
  60. package/dist/utility/chart/feed-interval.util.d.ts +6 -20
  61. package/dist/utility/chart/feed-interval.util.js +13 -22
  62. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
  63. package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
  64. package/dist/utility/chart/footprint-band.util.d.ts +21 -5
  65. package/dist/utility/chart/footprint-band.util.js +53 -14
  66. package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
  67. package/dist/utility/chart/host-bar-placement.util.js +8 -2
  68. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
  69. package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
  70. package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
  71. package/dist/utility/chart/indicator-run-interval.util.js +21 -12
  72. package/dist/utility/chart/interval-registry.util.d.ts +1 -1
  73. package/dist/utility/chart/interval-registry.util.js +1 -1
  74. package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
  75. package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
  76. package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
  77. package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
  78. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
  79. package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
  80. package/dist/utility/chart/live-bucket.util.d.ts +39 -17
  81. package/dist/utility/chart/live-bucket.util.js +103 -57
  82. package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
  83. package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
  84. package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
  85. package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
  86. package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
  87. package/dist/utility/chart/market-session-schedule.util.js +39 -1
  88. package/dist/utility/chart/market-session.util.d.ts +136 -0
  89. package/dist/utility/chart/market-session.util.js +341 -0
  90. package/dist/utility/chart/om-panel.util.d.ts +5 -3
  91. package/dist/utility/chart/om-panel.util.js +42 -7
  92. package/dist/utility/chart/om-target.util.d.ts +14 -1
  93. package/dist/utility/chart/om-target.util.js +22 -5
  94. package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
  95. package/dist/utility/chart/opra-read-access.leaf.js +22 -0
  96. package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
  97. package/dist/utility/chart/profile-row-height.util.js +74 -37
  98. package/dist/utility/chart/rth-session.util.d.ts +55 -20
  99. package/dist/utility/chart/rth-session.util.js +94 -46
  100. package/dist/utility/chart/session-lattice.util.d.ts +150 -0
  101. package/dist/utility/chart/session-lattice.util.js +488 -0
  102. package/dist/utility/chart/trading-day.util.d.ts +40 -2
  103. package/dist/utility/chart/trading-day.util.js +84 -7
  104. package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
  105. package/dist/utility/chart/us-equities-session.util.js +44 -15
  106. package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
  107. package/dist/utility/chart/window-geometry.leaf.js +57 -8
  108. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
  109. package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
  110. package/dist/utility/chart/wrun-run-result.util.d.ts +38 -13
  111. package/dist/utility/chart/wrun-run-result.util.js +97 -27
  112. package/dist/utility/common/time.util.js +5 -4
  113. package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
  114. package/dist/utility/market-events/earnings-scope.util.js +17 -9
  115. package/dist/utility/market-events/market-events.util.d.ts +14 -7
  116. package/dist/utility/market-events/market-events.util.js +30 -17
  117. package/dist/utility/number-format.util.d.ts +14 -21
  118. package/dist/utility/number-format.util.js +38 -24
  119. package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
  120. package/dist/utility/options/option-venue-disclosure.util.js +71 -11
  121. package/dist/utility/options/option-venue.util.d.ts +1 -1
  122. package/dist/utility/options/option-venue.util.js +1 -1
  123. package/dist/utility/pool-symbol.leaf.d.ts +7 -0
  124. package/dist/utility/pool-symbol.leaf.js +50 -5
  125. package/dist/utility/stocks/stock-display.util.d.ts +15 -0
  126. package/dist/utility/stocks/stock-display.util.js +37 -0
  127. package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
  128. package/dist/utility/v2/gate-plane.util.d.ts +6 -0
  129. package/dist/utility/v2/gate-plane.util.js +11 -1
  130. package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
  131. package/dist/utility/v2/gate-session-latch.util.js +3 -3
  132. package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
  133. package/dist/utility/v2/governed-tier.leaf.js +17 -16
  134. package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
  135. package/dist/utility/v2/stocks-governed.util.js +14 -0
  136. package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
  137. package/dist/utility/v2/v2-enums.leaf.js +458 -0
  138. package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
  139. package/dist/utility/wrun/derived-roots.leaf.js +27 -1
  140. package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
  141. package/dist/utility/wrun/derived-roots.util.js +97 -56
  142. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
  143. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
  144. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
  145. package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
  146. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
  147. package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
  148. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
  149. package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
  150. package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
  151. package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
  152. package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
  153. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
  154. package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
  155. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
  156. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
  157. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
  158. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
  159. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
  160. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
  161. package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
  162. package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
  163. package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
  164. package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
  165. package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
  166. package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
  167. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +46 -23
  168. package/dist/utility/wrun/wrun-batched-marks.util.js +260 -62
  169. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
  170. package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
  171. package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
  172. package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
  173. package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
  174. package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
  175. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
  176. package/dist/utility/wrun/wrun-canvases.util.d.ts +24 -7
  177. package/dist/utility/wrun/wrun-canvases.util.js +99 -30
  178. package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
  179. package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
  180. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
  181. package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
  182. package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
  183. package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
  184. package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
  185. package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
  186. package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
  187. package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
  188. package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
  189. package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
  190. package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
  191. package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
  192. package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
  193. package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
  194. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
  195. package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
  196. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
  197. package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
  198. package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
  199. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
  200. package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
  201. package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
  202. package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
  203. package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
  204. package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
  205. package/dist/utility/wrun/wrun-host.service.js +137 -27
  206. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
  207. package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
  208. package/dist/utility/wrun/wrun-hover.util.d.ts +8 -2
  209. package/dist/utility/wrun/wrun-hover.util.js +24 -13
  210. package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
  211. package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
  212. package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
  213. package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
  214. package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
  215. package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
  216. package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
  217. package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
  218. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
  219. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
  220. package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
  221. package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
  222. package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
  223. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
  224. package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
  225. package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
  226. package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
  227. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
  228. package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
  229. package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
  230. package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
  231. package/dist/utility/wrun/wrun-live-tick.util.js +655 -97
  232. package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
  233. package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
  234. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
  235. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
  236. package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
  237. package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
  238. package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
  239. package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
  240. package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
  241. package/dist/utility/wrun/wrun-option-views.util.js +5 -2
  242. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
  243. package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
  244. package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
  245. package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
  246. package/dist/utility/wrun/wrun-output-words.util.d.ts +14 -0
  247. package/dist/utility/wrun/wrun-output-words.util.js +51 -0
  248. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +116 -11
  249. package/dist/utility/wrun/wrun-overlay-drivers.util.js +208 -43
  250. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
  251. package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
  252. package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
  253. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
  254. package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
  255. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +6 -1
  256. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  257. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +247 -26
  258. package/dist/utility/wrun/wrun-overlay-run.util.js +2234 -408
  259. package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
  260. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +11 -2
  261. package/dist/utility/wrun/wrun-panel-mount.util.js +122 -19
  262. package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
  263. package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
  264. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
  265. package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
  266. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
  267. package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
  268. package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
  269. package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
  270. package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
  271. package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
  272. package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
  273. package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
  274. package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
  275. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
  276. package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
  277. package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
  278. package/dist/utility/wrun/wrun-refusal.util.js +103 -16
  279. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
  280. package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
  281. package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
  282. package/dist/utility/wrun/wrun-run-health.util.d.ts +95 -5
  283. package/dist/utility/wrun/wrun-run-health.util.js +209 -3
  284. package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
  285. package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
  286. package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
  287. package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
  288. package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
  289. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +38 -11
  290. package/dist/utility/wrun/wrun-script-inputs.util.js +194 -56
  291. package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
  292. package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
  293. package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
  294. package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
  295. package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
  296. package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
  297. package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
  298. package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
  299. package/dist/utility/wrun/wrun-style-names.util.d.ts +23 -0
  300. package/dist/utility/wrun/wrun-style-names.util.js +74 -0
  301. package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
  302. package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
  303. package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
  304. package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
  305. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
  306. package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
  307. package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
  308. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
  309. package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
  310. package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
  311. package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
  312. package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
  313. package/dist/utility/wrun/wrun-visibility-table.js +9 -0
  314. package/dist/utility/wrun/wrun-volume-profile.util.js +7 -3
  315. package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
  316. package/dist/utils/replay/replay-buffer-math.js +60 -30
  317. package/dist/workers/constants/socket-slots.d.ts +11 -7
  318. package/dist/workers/constants/socket-slots.js +6 -5
  319. package/package.json +5 -5
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * The `tape` input source's browser-side contract (WRUN-BIG-TRADES-PLAN C1, and C-DOLLAR for the dollar floor): how a
3
3
  * package's `inputSources.<name> = { source: "tape", min_size | min_value, history }` becomes the ONE acquisition the
4
- * K_TRADES lane fetches and the live intake folds: the large lane wherever the large-print table holds the market, else
5
- * the raw tape (`wrunTapeLaneExtras`). Pure: no store, no chart, no fetch; the run pass calls it at its head, before any
6
- * lane fetch, so every refusal here lands by name and at zero fetches.
4
+ * K_TRADES large lane fetches and the live intake folds. Pure: no store, no chart, no fetch; the run pass calls it at
5
+ * its head, before any lane fetch, so every refusal here lands by name and at zero fetches.
7
6
  *
8
7
  * - A tape declares exactly ONE floor, `min_size` or `min_value`; both or neither refuses `wrun_tape_floor_invalid`
9
8
  * naming the input. Each is a number literal or a string naming a declared numeric `param`, resolved from the run's
@@ -23,8 +22,9 @@
23
22
  * - The table's own floor ($10k quote on USD-quoted markets, a contracts floor per CME Group root) is a fact a package
24
23
  * cannot lower: a floor below it is served at the table's floor (documented, never enforced here).
25
24
  * - `history: "0" | <duration>`: `"0"` (the default) is the live edge only; a duration `^\d+(s|m|h|d)$` seeds that much
26
- * history from TRADE_LARGE (two hours of the raw tape on a market the table does not hold, `tradesLaneLimits`), at
27
- * most `WRUN_TAPE_HISTORY_MAX_SEC` (30 days); a zero-length spelling ("0m") is the live
25
+ * history from TRADE_LARGE, counted back from the run's as-of (the server's now on a live run, the replay's present
26
+ * in market replay: live-trades-merge.util `SOURCE_HISTORY_AS_OF_FIELD`), at most `WRUN_TAPE_HISTORY_MAX_SEC` (30
27
+ * days); a zero-length spelling ("0m") is the live
28
28
  * edge too. Anything else refuses `wrun_tape_history_invalid`. The lane serves `min(history, the chart's loaded
29
29
  * window)`, and no more than the gateway's bar limit lets it today (`WRUN_TAPE_HISTORY_SERVED_MAX_SEC`: 15,000
30
30
  * one-minute points, about 10.4 days; k-trades.control.ts opens the ask at the first bar after it), so the
@@ -40,18 +40,32 @@
40
40
  * (the row builder's empty block). Big Trades 0.8.0 floors CME in contracts (`min_size` on `tape_contracts`, asked
41
41
  * on size unit 3) and every other market in dollars (`min_value` on `tape`, asked on 0, 1 and 2): one acquisition
42
42
  * on every market, two floors in the sheet.
43
+ * - `min_coins` (contract C-COINS item 2) is the smallest print served by its size in coins, a third floor beside the
44
+ * two (exactly one of the three). The run asks the dollar table, `minQuoteAmount`, at F = min_coins x L x the
45
+ * market's dollar unit x 0.9, L the lowest price the market traded at across the window that request reads
46
+ * (wrun-tape-coins.util, priced by the run pass from candles covering the window): F never exceeds min_coins x p for
47
+ * any price p the window traded at, so no trade of min_coins or more is dropped. Cells arrive in dollars, as on a
48
+ * `min_value` tape, and the acquisition keeps the coins and L beside the dollar floor (`minCoins`, `priceLow`): the
49
+ * live leg re-plans once the market trades below L x 0.9. No price for the window refuses the tape by name
50
+ * (`wrun_tape_coins_unpriced`), never a guess.
43
51
  * The om daemon shares the vocabulary (`wrun_tape_floor_invalid`, `wrun_tape_min_size_invalid`,
44
52
  * `wrun_tape_min_value_invalid`, `wrun_tape_history_invalid`).
45
53
  */
46
54
  import type { WrunIndicatorMetadata, WrunInputSource } from '../../interfaces/wrun-runtime.interface.js';
47
- import { type TradesLargeMarket } from '../../kscript-data/controls/live-trades-merge.util.js';
48
55
  /** A tape `min_size` that resolves to nothing servable (a param the package does not declare, non-finite or not
49
56
  * above zero). */
50
57
  export declare const WRUN_TAPE_MIN_SIZE_INVALID_CODE = "wrun_tape_min_size_invalid";
51
58
  /** A tape `min_value` that resolves to nothing servable (a param the package does not declare, non-finite or not
52
59
  * above zero): C-DOLLAR's refusal, naming the input and the param. */
53
60
  export declare const WRUN_TAPE_MIN_VALUE_INVALID_CODE = "wrun_tape_min_value_invalid";
54
- /** A tape input declaring both floors or neither (C-DOLLAR): a tape serves exactly one floor. */
61
+ /** A tape `min_coins` that resolves to nothing servable (C-COINS item 2, the facet's own code beside the other two). */
62
+ export declare const WRUN_TAPE_MIN_COINS_INVALID_CODE = "wrun_tape_min_coins_invalid";
63
+ /** A coins tape (`min_coins`) whose request window has no price the run can read: the floor is never guessed. */
64
+ export declare const WRUN_TAPE_COINS_UNPRICED_CODE = "wrun_tape_coins_unpriced";
65
+ /** The plan setting a coins tape's priced dollar floor rides under (`wrunTapeFloorSettings`): no param can be named so,
66
+ * and the row builder plans the tape at it as a literal floor, never bound to the coins param. */
67
+ export declare const WRUN_TAPE_COINS_PLAN_FLOOR = "@min_coins";
68
+ /** A tape input declaring several floors or none (C-DOLLAR, C-COINS): a tape serves exactly one floor. */
55
69
  export declare const WRUN_TAPE_FLOOR_INVALID_CODE = "wrun_tape_floor_invalid";
56
70
  /** A dollar tape (C-DOLLAR's `min_value`) on a market whose dollar unit no read can ever prove (a quote that is no
57
71
  * dollar, a venue or a contract with no point value): none of its prints could be valued, so the run refuses it by
@@ -75,8 +89,8 @@ export declare const WRUN_TAPE_HISTORY_MAX_SEC = 2592000;
75
89
  * unaggregated read (TRADES_LARGE_BAR_LIMIT_SEC, about 10.4 days). A longer declared history (up to
76
90
  * the 30-day contract) is served from that horizon. */
77
91
  export declare const WRUN_TAPE_HISTORY_SERVED_MAX_SEC: number;
78
- /** The two floor facets a tape input may declare, exactly one of them. */
79
- export type WrunTapeFloorFacet = 'min_size' | 'min_value';
92
+ /** The three floor facets a tape input may declare, exactly one of them. */
93
+ export type WrunTapeFloorFacet = 'min_size' | 'min_value' | 'min_coins';
80
94
  interface WrunTapeAcquisitionBase {
81
95
  history: string;
82
96
  /** The history served, in seconds: the declared one, capped at WRUN_TAPE_HISTORY_SERVED_MAX_SEC. */
@@ -85,14 +99,27 @@ interface WrunTapeAcquisitionBase {
85
99
  inputNames: string[];
86
100
  }
87
101
  /** The one tape acquisition a package resolves to: the K_TRADES payload extras the history fetch and the reconcile
88
- * ride (exactly one floor: `minSize` in the raw stored unit, or `minValue` in US dollars; `history` as declared),
89
- * plus the inputs it serves. */
102
+ * ride (exactly one floor: `minSize` in the raw stored unit, `minValue` in US dollars, or `minCoins` in coins, whose
103
+ * dollar floor `minValue` and price `priceLow` the run pass adds once it priced the window, `wrunCoinTapeFloor`;
104
+ * `history` as declared), plus the inputs it serves. */
90
105
  export type WrunTapeAcquisition = WrunTapeAcquisitionBase & ({
91
106
  minSize: number;
92
107
  minValue?: undefined;
108
+ minCoins?: undefined;
109
+ priceLow?: undefined;
110
+ priceFromChart?: undefined;
93
111
  } | {
94
112
  minValue: number;
95
113
  minSize?: undefined;
114
+ minCoins?: undefined;
115
+ priceLow?: undefined;
116
+ priceFromChart?: undefined;
117
+ } | {
118
+ minCoins: number;
119
+ minValue?: number;
120
+ priceLow?: number;
121
+ priceFromChart?: true;
122
+ minSize?: undefined;
96
123
  });
97
124
  /** Whether an input source is a tape the run asks: a `tape` source the run's sheet on the chart's market did not mark
98
125
  * `undemanded` (wrunSheetWithLaneDemand, kit 0.95.0's `needed_by` on a secondary tape). THE predicate every reader
@@ -105,11 +132,11 @@ export declare function isWrunAskedTapeSource<Source extends Pick<WrunInputSourc
105
132
  export declare function wrunTapeHistoryOf(source: Pick<WrunInputSource, 'history'>): string;
106
133
  /** The seconds a valid tape history declares (0 for the live edge), or a refusal by name. */
107
134
  export declare function parseWrunTapeHistory(metadata: Pick<WrunIndicatorMetadata, 'id'>, inputName: string, history: string): number;
108
- /** The floor facet a tape source declares when it declares exactly one, else undefined (both, or neither). */
109
- export declare function wrunTapeFloorFacetOf(source: Pick<WrunInputSource, 'min_size' | 'min_value'>): WrunTapeFloorFacet | undefined;
135
+ /** The floor facet a tape source declares when it declares exactly one, else undefined (several, or none). */
136
+ export declare function wrunTapeFloorFacetOf(source: Pick<WrunInputSource, 'min_size' | 'min_value' | 'min_coins'>): WrunTapeFloorFacet | undefined;
110
137
  /** The name of the param a tape source's floor reads (its one floor facet's string), else undefined (a literal floor,
111
138
  * or a source declaring both floors or neither). */
112
- export declare function wrunTapeFloorParamOf(source: Pick<WrunInputSource, 'min_size' | 'min_value'>): string | undefined;
139
+ export declare function wrunTapeFloorParamOf(source: Pick<WrunInputSource, 'min_size' | 'min_value' | 'min_coins'>): string | undefined;
113
140
  /** The smallest print size a tape input serves (raw stored units): the literal, or the named param's current value;
114
141
  * refused by name (`wrun_tape_min_size_invalid`) when it is not finite and above zero. */
115
142
  export declare function resolveWrunTapeMinSize(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params'>, inputName: string, source: Pick<WrunInputSource, 'min_size'>, paramValues: Readonly<Record<string, number>>): number;
@@ -117,17 +144,18 @@ export declare function resolveWrunTapeMinSize(metadata: Pick<WrunIndicatorMetad
117
144
  * refused by name (`wrun_tape_min_value_invalid`, naming the input and the param) when it is not finite and above
118
145
  * zero. */
119
146
  export declare function resolveWrunTapeMinValue(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params'>, inputName: string, source: Pick<WrunInputSource, 'min_value'>, paramValues: Readonly<Record<string, number>>): number;
120
- /** A tape input's one floor, by its facet: refused `wrun_tape_floor_invalid` naming the input when it declares both
121
- * floors or neither, else by the facet's own code when the value is not servable. */
122
- export declare function resolveWrunTapeFloor(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params'>, inputName: string, source: Pick<WrunInputSource, 'min_size' | 'min_value'>, paramValues: Readonly<Record<string, number>>): {
147
+ /** A tape input's one floor, by its facet: refused `wrun_tape_floor_invalid` naming the input when it declares
148
+ * several floors or none, else by the facet's own code when the value is not servable. */
149
+ export declare function resolveWrunTapeFloor(metadata: Pick<WrunIndicatorMetadata, 'id' | 'params'>, inputName: string, source: Pick<WrunInputSource, 'min_size' | 'min_value' | 'min_coins'>, paramValues: Readonly<Record<string, number>>): {
123
150
  facet: WrunTapeFloorFacet;
124
151
  value: number;
125
152
  };
126
- /** The floor an acquisition asks at, in its own unit (raw stored units under `min_size`, dollars under `min_value`). */
153
+ /** The floor an acquisition asks at, in its own unit (raw stored units under `min_size`, dollars under `min_value`
154
+ * and under a priced `min_coins`; a coins acquisition not priced yet asks none). */
127
155
  export declare function wrunTapeFloorOf(tape: Pick<WrunTapeAcquisition, 'minSize' | 'minValue'>): number;
128
156
  /** The words a refusal states an acquisition's floor in: the raw number under `min_size`, a US dollar amount under
129
- * `min_value` (`$500,000`). */
130
- export declare function wrunTapeFloorWords(tape: Pick<WrunTapeAcquisition, 'minSize' | 'minValue'> | undefined): string;
157
+ * `min_value` (`$500,000`), the coins under `min_coins` (`10`, the setting's own number). */
158
+ export declare function wrunTapeFloorWords(tape: Pick<WrunTapeAcquisition, 'minSize' | 'minValue' | 'minCoins'> | undefined): string;
131
159
  /**
132
160
  * Resolve every tape input the run asks (`isWrunAskedTapeSource`: the run's sheet on the chart's market, its
133
161
  * unasked tapes marked) against the run's param values into the package's one tape acquisition, refusing by name
@@ -142,7 +170,9 @@ export declare function wrunTapeFloorSettingWords(metadata: Pick<WrunIndicatorMe
142
170
  /**
143
171
  * The settings a row build hands the shared host's plan for a param-bound floor
144
172
  * (`WrunChartSourceRows.settings`): the floor the lane's acquisition was asked at (`wrunTapeFloorOf`, in its own
145
- * unit), under the name of every param a tape input's floor (`min_size` or `min_value`) names. The host resolves that
173
+ * unit), under the name of every param a tape input's floor (`min_size` or `min_value`) names, and a coins tape's
174
+ * priced dollar floor under `WRUN_TAPE_COINS_PLAN_FLOOR` whether its `min_coins` names a param or holds a literal: the
175
+ * plan asks it as a literal floor, so the coins param's bounds never judge a dollar number. The host resolves that
146
176
  * floor itself from the settings it is handed (its planTapeFloors; a `min_value` tape is planned as the kit's floor
147
177
  * facet over the dollar cells, wrun-source-rows.util `wrunPlannedSheet`), so the plan's tape ask carries the floor the
148
178
  * run resolved from the overlay's current settings (`resolveWrunTapeAcquisition`): a full run hands its acquisition's
@@ -160,16 +190,16 @@ export declare function wrunTapeAcquisitionFloor(acquisition: {
160
190
  } | undefined): unknown;
161
191
  /**
162
192
  * The K_TRADES payload extras of a tape acquisition (the run pass's `fetchLane('trades', 'tp', ...)`, which the run
163
- * records as the lane's acquisition: the history fetch, the reconcile's re-ask, the live channel and the live fold read
164
- * the SAME payload): the lane, the declared history and the one floor. The lane is the large-print table (`large`)
165
- * wherever the table holds the market the tape reads (`tradesLargeServesMarket`), else the raw tape (no `large`: a
166
- * two-hour seed and the raw TRADE live channel, every fill judged on its own, `tradesLaneLimits`): a CME root the
167
- * collector does not copy (MGC, MCL, M2K, ...) asked the empty table and drew nothing (#feedback-stream 2149). The
168
- * market is required, so no caller asks a lane without saying which market's tape it reads; `undefined` (a chart
169
- * with no market metadata) keeps the large lane. A dollar floor also carries `valuePerUnit`, the US dollars one price
170
- * unit times one size unit of a live print is worth on the chart's market (the run head's `wrunMarketDollarUnit`);
171
- * without it no live print can be priced and none folds (the history rows carry the gateway's own dollar value). A raw
172
- * floor on a market the table holds carries exactly what it always did, so 0.5.0's payload is unchanged.
193
+ * records as the lane's acquisition: the history fetch, the reconcile's re-ask and the live fold read the SAME
194
+ * payload): the large lane, the declared history and the one floor. A dollar floor also carries `valuePerUnit`, the US
195
+ * dollars one price unit times one size unit of a live print is worth on the chart's market (the run head's
196
+ * `wrunMarketDollarUnit`); without it no live print can be priced and none folds (the history rows carry the gateway's
197
+ * own dollar value). A raw floor carries exactly what it always did, so 0.5.0's payload is unchanged. A priced coins
198
+ * floor rides as the dollar floor it priced, its coins and its price beside it (`minCoins`, `priceLow`, and
199
+ * `priceFromChart` when the chart's own candles are the market's prices: the live leg's re-plan reads them, the worker
200
+ * never does).
201
+ * Always the large lane, on every market: a market Big Trades misses needs its floor in the streamd ingest service's
202
+ * config, never a raw-tape read here (docs/features/indicators/big-trades.md).
173
203
  */
174
- export declare function wrunTapeLaneExtras(tape: WrunTapeAcquisition, valuePerUnit: number | undefined, market: TradesLargeMarket | undefined): Record<string, unknown>;
204
+ export declare function wrunTapeLaneExtras(tape: WrunTapeAcquisition, valuePerUnit: number | undefined): Record<string, unknown>;
175
205
  export {};
@@ -1,9 +1,8 @@
1
1
  /**
2
2
  * The `tape` input source's browser-side contract (WRUN-BIG-TRADES-PLAN C1, and C-DOLLAR for the dollar floor): how a
3
3
  * package's `inputSources.<name> = { source: "tape", min_size | min_value, history }` becomes the ONE acquisition the
4
- * K_TRADES lane fetches and the live intake folds: the large lane wherever the large-print table holds the market, else
5
- * the raw tape (`wrunTapeLaneExtras`). Pure: no store, no chart, no fetch; the run pass calls it at its head, before any
6
- * lane fetch, so every refusal here lands by name and at zero fetches.
4
+ * K_TRADES large lane fetches and the live intake folds. Pure: no store, no chart, no fetch; the run pass calls it at
5
+ * its head, before any lane fetch, so every refusal here lands by name and at zero fetches.
7
6
  *
8
7
  * - A tape declares exactly ONE floor, `min_size` or `min_value`; both or neither refuses `wrun_tape_floor_invalid`
9
8
  * naming the input. Each is a number literal or a string naming a declared numeric `param`, resolved from the run's
@@ -23,8 +22,9 @@
23
22
  * - The table's own floor ($10k quote on USD-quoted markets, a contracts floor per CME Group root) is a fact a package
24
23
  * cannot lower: a floor below it is served at the table's floor (documented, never enforced here).
25
24
  * - `history: "0" | <duration>`: `"0"` (the default) is the live edge only; a duration `^\d+(s|m|h|d)$` seeds that much
26
- * history from TRADE_LARGE (two hours of the raw tape on a market the table does not hold, `tradesLaneLimits`), at
27
- * most `WRUN_TAPE_HISTORY_MAX_SEC` (30 days); a zero-length spelling ("0m") is the live
25
+ * history from TRADE_LARGE, counted back from the run's as-of (the server's now on a live run, the replay's present
26
+ * in market replay: live-trades-merge.util `SOURCE_HISTORY_AS_OF_FIELD`), at most `WRUN_TAPE_HISTORY_MAX_SEC` (30
27
+ * days); a zero-length spelling ("0m") is the live
28
28
  * edge too. Anything else refuses `wrun_tape_history_invalid`. The lane serves `min(history, the chart's loaded
29
29
  * window)`, and no more than the gateway's bar limit lets it today (`WRUN_TAPE_HISTORY_SERVED_MAX_SEC`: 15,000
30
30
  * one-minute points, about 10.4 days; k-trades.control.ts opens the ask at the first bar after it), so the
@@ -40,17 +40,32 @@
40
40
  * (the row builder's empty block). Big Trades 0.8.0 floors CME in contracts (`min_size` on `tape_contracts`, asked
41
41
  * on size unit 3) and every other market in dollars (`min_value` on `tape`, asked on 0, 1 and 2): one acquisition
42
42
  * on every market, two floors in the sheet.
43
+ * - `min_coins` (contract C-COINS item 2) is the smallest print served by its size in coins, a third floor beside the
44
+ * two (exactly one of the three). The run asks the dollar table, `minQuoteAmount`, at F = min_coins x L x the
45
+ * market's dollar unit x 0.9, L the lowest price the market traded at across the window that request reads
46
+ * (wrun-tape-coins.util, priced by the run pass from candles covering the window): F never exceeds min_coins x p for
47
+ * any price p the window traded at, so no trade of min_coins or more is dropped. Cells arrive in dollars, as on a
48
+ * `min_value` tape, and the acquisition keeps the coins and L beside the dollar floor (`minCoins`, `priceLow`): the
49
+ * live leg re-plans once the market trades below L x 0.9. No price for the window refuses the tape by name
50
+ * (`wrun_tape_coins_unpriced`), never a guess.
43
51
  * The om daemon shares the vocabulary (`wrun_tape_floor_invalid`, `wrun_tape_min_size_invalid`,
44
52
  * `wrun_tape_min_value_invalid`, `wrun_tape_history_invalid`).
45
53
  */
46
- import { TRADES_LARGE_BAR_LIMIT_SEC, tradesLargeServesMarket, } from '../../kscript-data/controls/live-trades-merge.util.js';
54
+ import { TRADES_LARGE_BAR_LIMIT_SEC } from '../../kscript-data/controls/live-trades-merge.util.js';
47
55
  /** A tape `min_size` that resolves to nothing servable (a param the package does not declare, non-finite or not
48
56
  * above zero). */
49
57
  export const WRUN_TAPE_MIN_SIZE_INVALID_CODE = 'wrun_tape_min_size_invalid';
50
58
  /** A tape `min_value` that resolves to nothing servable (a param the package does not declare, non-finite or not
51
59
  * above zero): C-DOLLAR's refusal, naming the input and the param. */
52
60
  export const WRUN_TAPE_MIN_VALUE_INVALID_CODE = 'wrun_tape_min_value_invalid';
53
- /** A tape input declaring both floors or neither (C-DOLLAR): a tape serves exactly one floor. */
61
+ /** A tape `min_coins` that resolves to nothing servable (C-COINS item 2, the facet's own code beside the other two). */
62
+ export const WRUN_TAPE_MIN_COINS_INVALID_CODE = 'wrun_tape_min_coins_invalid';
63
+ /** A coins tape (`min_coins`) whose request window has no price the run can read: the floor is never guessed. */
64
+ export const WRUN_TAPE_COINS_UNPRICED_CODE = 'wrun_tape_coins_unpriced';
65
+ /** The plan setting a coins tape's priced dollar floor rides under (`wrunTapeFloorSettings`): no param can be named so,
66
+ * and the row builder plans the tape at it as a literal floor, never bound to the coins param. */
67
+ export const WRUN_TAPE_COINS_PLAN_FLOOR = '@min_coins';
68
+ /** A tape input declaring several floors or none (C-DOLLAR, C-COINS): a tape serves exactly one floor. */
54
69
  export const WRUN_TAPE_FLOOR_INVALID_CODE = 'wrun_tape_floor_invalid';
55
70
  /** A dollar tape (C-DOLLAR's `min_value`) on a market whose dollar unit no read can ever prove (a quote that is no
56
71
  * dollar, a venue or a contract with no point value): none of its prints could be valued, so the run refuses it by
@@ -76,11 +91,12 @@ export const WRUN_TAPE_HISTORY_MAX_SEC = 2_592_000;
76
91
  export const WRUN_TAPE_HISTORY_SERVED_MAX_SEC = TRADES_LARGE_BAR_LIMIT_SEC;
77
92
  const WRUN_TAPE_HISTORY_PATTERN = /^(\d+)(s|m|h|d)$/;
78
93
  const WRUN_TAPE_HISTORY_UNIT_SEC = { s: 1, m: 60, h: 3600, d: 86_400 };
79
- const WRUN_TAPE_FLOOR_FACETS = ['min_size', 'min_value'];
94
+ const WRUN_TAPE_FLOOR_FACETS = ['min_size', 'min_value', 'min_coins'];
80
95
  /** Each floor facet's refusal code and the words a refusal uses for what it floors. */
81
96
  const WRUN_TAPE_FLOOR_RULES = {
82
97
  min_size: { code: WRUN_TAPE_MIN_SIZE_INVALID_CODE, what: 'size' },
83
98
  min_value: { code: WRUN_TAPE_MIN_VALUE_INVALID_CODE, what: 'value' },
99
+ min_coins: { code: WRUN_TAPE_MIN_COINS_INVALID_CODE, what: 'size in coins' },
84
100
  };
85
101
  /** Whether an input source is a tape the run asks: a `tape` source the run's sheet on the chart's market did not mark
86
102
  * `undemanded` (wrunSheetWithLaneDemand, kit 0.95.0's `needed_by` on a secondary tape). THE predicate every reader
@@ -109,7 +125,7 @@ export function parseWrunTapeHistory(metadata, inputName, history) {
109
125
  }
110
126
  return seconds;
111
127
  }
112
- /** The floor facet a tape source declares when it declares exactly one, else undefined (both, or neither). */
128
+ /** The floor facet a tape source declares when it declares exactly one, else undefined (several, or none). */
113
129
  export function wrunTapeFloorFacetOf(source) {
114
130
  const declared = WRUN_TAPE_FLOOR_FACETS.filter((facet) => source[facet] !== undefined);
115
131
  return declared.length === 1 ? declared[0] : undefined;
@@ -161,27 +177,35 @@ export function resolveWrunTapeMinSize(metadata, inputName, source, paramValues)
161
177
  export function resolveWrunTapeMinValue(metadata, inputName, source, paramValues) {
162
178
  return resolveWrunTapeFloorFacet(metadata, inputName, 'min_value', source.min_value, paramValues);
163
179
  }
164
- /** A tape input's one floor, by its facet: refused `wrun_tape_floor_invalid` naming the input when it declares both
165
- * floors or neither, else by the facet's own code when the value is not servable. */
180
+ /** A tape input's one floor, by its facet: refused `wrun_tape_floor_invalid` naming the input when it declares
181
+ * several floors or none, else by the facet's own code when the value is not servable. */
166
182
  export function resolveWrunTapeFloor(metadata, inputName, source, paramValues) {
167
183
  const facet = wrunTapeFloorFacetOf(source);
168
184
  if (facet === undefined) {
169
- const both = source.min_size !== undefined && source.min_value !== undefined;
170
- throw new Error(`WRUN ${metadata.id}: input '${inputName}' (tape) declares ${both ? 'both min_size and min_value' : 'no floor'} ` +
171
- `(${WRUN_TAPE_FLOOR_INVALID_CODE}): a tape takes exactly one floor, min_size (the raw stored unit) or ` +
172
- 'min_value (US dollars)');
185
+ const declared = WRUN_TAPE_FLOOR_FACETS.filter((key) => source[key] !== undefined);
186
+ const words = declared.length === 0
187
+ ? 'no floor'
188
+ : declared.length === 2
189
+ ? `both ${declared.join(' and ')}`
190
+ : `${declared.slice(0, -1).join(', ')} and ${declared[declared.length - 1]}`;
191
+ throw new Error(`WRUN ${metadata.id}: input '${inputName}' (tape) declares ${words} ` +
192
+ `(${WRUN_TAPE_FLOOR_INVALID_CODE}): a tape takes exactly one floor, min_size (the raw stored unit), ` +
193
+ 'min_value (US dollars) or min_coins (coins)');
173
194
  }
174
195
  return { facet, value: resolveWrunTapeFloorFacet(metadata, inputName, facet, source[facet], paramValues) };
175
196
  }
176
- /** The floor an acquisition asks at, in its own unit (raw stored units under `min_size`, dollars under `min_value`). */
197
+ /** The floor an acquisition asks at, in its own unit (raw stored units under `min_size`, dollars under `min_value`
198
+ * and under a priced `min_coins`; a coins acquisition not priced yet asks none). */
177
199
  export function wrunTapeFloorOf(tape) {
178
200
  return (tape.minValue ?? tape.minSize);
179
201
  }
180
202
  /** The words a refusal states an acquisition's floor in: the raw number under `min_size`, a US dollar amount under
181
- * `min_value` (`$500,000`). */
203
+ * `min_value` (`$500,000`), the coins under `min_coins` (`10`, the setting's own number). */
182
204
  export function wrunTapeFloorWords(tape) {
183
205
  if (tape === undefined)
184
206
  return '0';
207
+ if (tape.minCoins !== undefined)
208
+ return String(tape.minCoins);
185
209
  if (tape.minValue === undefined)
186
210
  return String(tape.minSize ?? 0);
187
211
  return `$${tape.minValue.toLocaleString('en-US', { maximumFractionDigits: 2 })}`;
@@ -208,10 +232,13 @@ export function resolveWrunTapeAcquisition(metadata, paramValues) {
208
232
  const floor = resolveWrunTapeFloor(metadata, name, source, paramValues);
209
233
  if (acquisition === undefined || first === undefined) {
210
234
  first = floor;
235
+ const base = { history, historySeconds, inputNames: [name] };
211
236
  acquisition =
212
237
  floor.facet === 'min_size'
213
- ? { minSize: floor.value, history, historySeconds, inputNames: [name] }
214
- : { minValue: floor.value, history, historySeconds, inputNames: [name] };
238
+ ? { minSize: floor.value, ...base }
239
+ : floor.facet === 'min_value'
240
+ ? { minValue: floor.value, ...base }
241
+ : { minCoins: floor.value, ...base };
215
242
  continue;
216
243
  }
217
244
  if (first.facet !== floor.facet || first.value !== floor.value || acquisition.historySeconds !== historySeconds) {
@@ -246,7 +273,9 @@ export function wrunTapeFloorSettingWords(metadata) {
246
273
  /**
247
274
  * The settings a row build hands the shared host's plan for a param-bound floor
248
275
  * (`WrunChartSourceRows.settings`): the floor the lane's acquisition was asked at (`wrunTapeFloorOf`, in its own
249
- * unit), under the name of every param a tape input's floor (`min_size` or `min_value`) names. The host resolves that
276
+ * unit), under the name of every param a tape input's floor (`min_size` or `min_value`) names, and a coins tape's
277
+ * priced dollar floor under `WRUN_TAPE_COINS_PLAN_FLOOR` whether its `min_coins` names a param or holds a literal: the
278
+ * plan asks it as a literal floor, so the coins param's bounds never judge a dollar number. The host resolves that
250
279
  * floor itself from the settings it is handed (its planTapeFloors; a `min_value` tape is planned as the kit's floor
251
280
  * facet over the dollar cells, wrun-source-rows.util `wrunPlannedSheet`), so the plan's tape ask carries the floor the
252
281
  * run resolved from the overlay's current settings (`resolveWrunTapeAcquisition`): a full run hands its acquisition's
@@ -263,6 +292,10 @@ export function wrunTapeFloorSettings(metadata, floorValue) {
263
292
  for (const source of Object.values(metadata.inputSources)) {
264
293
  if (!isWrunAskedTapeSource(source))
265
294
  continue;
295
+ if (wrunTapeFloorFacetOf(source) === 'min_coins') {
296
+ (settings ??= {})[WRUN_TAPE_COINS_PLAN_FLOOR] = floor;
297
+ continue;
298
+ }
266
299
  const paramName = wrunTapeFloorParamOf(source);
267
300
  if (paramName !== undefined)
268
301
  (settings ??= {})[paramName] = floor;
@@ -278,25 +311,30 @@ export function wrunTapeAcquisitionFloor(acquisition) {
278
311
  }
279
312
  /**
280
313
  * The K_TRADES payload extras of a tape acquisition (the run pass's `fetchLane('trades', 'tp', ...)`, which the run
281
- * records as the lane's acquisition: the history fetch, the reconcile's re-ask, the live channel and the live fold read
282
- * the SAME payload): the lane, the declared history and the one floor. The lane is the large-print table (`large`)
283
- * wherever the table holds the market the tape reads (`tradesLargeServesMarket`), else the raw tape (no `large`: a
284
- * two-hour seed and the raw TRADE live channel, every fill judged on its own, `tradesLaneLimits`): a CME root the
285
- * collector does not copy (MGC, MCL, M2K, ...) asked the empty table and drew nothing (#feedback-stream 2149). The
286
- * market is required, so no caller asks a lane without saying which market's tape it reads; `undefined` (a chart
287
- * with no market metadata) keeps the large lane. A dollar floor also carries `valuePerUnit`, the US dollars one price
288
- * unit times one size unit of a live print is worth on the chart's market (the run head's `wrunMarketDollarUnit`);
289
- * without it no live print can be priced and none folds (the history rows carry the gateway's own dollar value). A raw
290
- * floor on a market the table holds carries exactly what it always did, so 0.5.0's payload is unchanged.
314
+ * records as the lane's acquisition: the history fetch, the reconcile's re-ask and the live fold read the SAME
315
+ * payload): the large lane, the declared history and the one floor. A dollar floor also carries `valuePerUnit`, the US
316
+ * dollars one price unit times one size unit of a live print is worth on the chart's market (the run head's
317
+ * `wrunMarketDollarUnit`); without it no live print can be priced and none folds (the history rows carry the gateway's
318
+ * own dollar value). A raw floor carries exactly what it always did, so 0.5.0's payload is unchanged. A priced coins
319
+ * floor rides as the dollar floor it priced, its coins and its price beside it (`minCoins`, `priceLow`, and
320
+ * `priceFromChart` when the chart's own candles are the market's prices: the live leg's re-plan reads them, the worker
321
+ * never does).
322
+ * Always the large lane, on every market: a market Big Trades misses needs its floor in the streamd ingest service's
323
+ * config, never a raw-tape read here (docs/features/indicators/big-trades.md).
291
324
  */
292
- export function wrunTapeLaneExtras(tape, valuePerUnit, market) {
293
- const lane = market === undefined || tradesLargeServesMarket(market) ? { large: true } : {};
325
+ export function wrunTapeLaneExtras(tape, valuePerUnit) {
326
+ // A coins floor has no ask until its window is priced: an unpriced one would ride as an unfiltered tape.
327
+ if (tape.minCoins !== undefined && tape.minValue === undefined) {
328
+ throw new Error(`input '${tape.inputNames[0]}' (tape): a min_coins floor asks only once priced (${WRUN_TAPE_COINS_UNPRICED_CODE})`);
329
+ }
294
330
  if (tape.minValue === undefined)
295
- return { minSize: tape.minSize, history: tape.history, ...lane };
331
+ return { minSize: tape.minSize, history: tape.history, large: true };
296
332
  return {
297
333
  minValue: tape.minValue,
298
334
  ...(valuePerUnit !== undefined && Number.isFinite(valuePerUnit) && valuePerUnit > 0 ? { valuePerUnit } : {}),
299
335
  history: tape.history,
300
- ...lane,
336
+ large: true,
337
+ ...(tape.minCoins !== undefined ? { minCoins: tape.minCoins, priceLow: tape.priceLow } : {}),
338
+ ...(tape.priceFromChart === true ? { priceFromChart: true } : {}),
301
339
  };
302
340
  }
@@ -27,16 +27,24 @@ export interface WrunHostBarSpan {
27
27
  }
28
28
  /**
29
29
  * The session a host bar covers when it is not its stamp to its end, under a session grid (a flow's plan, see the
30
- * module header): a bar the CME session lattice stamps at a day or longer (cme-session-bucket.util: the trade date's
31
- * 00:00Z label at 1d, its group's first trade date at 3d, its week's Monday at 1w, its month's 1st at a calendar
32
- * length) runs from the 17:00 Chicago open before it (`cmeSessionBarOpenMs`, read inside the bar) to the open that
33
- * starts the next bar (`cmeSessionBarEndMs`). Undefined for any other bar: no grid, a grid off the lattice (a UTC or
34
- * a stock chart's), an intraday lattice width (its stamp is its open), a stamp the lattice books no row to.
30
+ * module header): a bar a session lattice stamps at a day or longer (session-lattice.util, the CME family and forex:
31
+ * the trade date's 00:00Z label at 1d, its group's first trade date at 3d, its week's Monday at 1w, its month's 1st
32
+ * at a calendar length) runs from the session open before it (`venueSessionLatticeBarOpenMs`, read inside the bar) to
33
+ * the open that starts the next bar (`venueSessionLatticeBarEndMs`). Undefined for any other bar: no grid, a grid off
34
+ * every lattice (a UTC or a stock chart's), an intraday lattice width (its stamp is its open), a stamp the lattice
35
+ * books no row to.
35
36
  */
36
37
  export declare function wrunCmeSessionBarSpan(barOpenMs: number, intervalMs: number, sessionGrid: LiveBucketVenue | null | undefined): WrunHostBarSpan | undefined;
37
38
  /** A host bar's span: its session under a session grid (`wrunCmeSessionBarSpan`), else its stamp to its end
38
39
  * (`wrunHostGridFetchTo`: its calendar close on a calendar chart). */
39
40
  export declare function wrunHostBarSpanOf(barOpenMs: number, intervalMs: number, sessionGrid?: LiveBucketVenue | null): WrunHostBarSpan;
41
+ /** The host bars of a window that `[fromMs, toMs)` reaches, each its span (`wrunHostBarSpanOf`) cut at the next bar's
42
+ * stamp: a lane that marks bars by time stamps a row inside each bar it means, never by stepping the interval. */
43
+ export declare function wrunHostBarSpansWithin(window: {
44
+ barOpens: readonly number[];
45
+ intervalMs: number;
46
+ barGrid?: LiveBucketVenue | null;
47
+ }, fromMs: number, toMs: number): WrunHostBarSpan[];
40
48
  /** The finest tier that fits a host bar (the one its live bar is built from), or undefined when none fits
41
49
  * (a bar finer than every tier, or one whose open sits on no tier's grid). */
42
50
  export declare function wrunFinestTier(tiers: readonly WrunBackendTier[], barOpenMs: number, barMs: number): WrunBackendTier | undefined;
@@ -36,8 +36,7 @@
36
36
  * whose tier bucket has closed by the clock: a forming bucket is never read as the bar's state).
37
37
  */
38
38
  import { barEndMs, calendarMonthsOfMs } from '../chart/calendar-interval.util.js';
39
- import { cmeSessionBarEndMs, cmeSessionBarOpenMs, isCmeSessionLatticeIntervalMs, } from '../chart/cme-session-bucket.util.js';
40
- import { isCmeSessionLatticeVenue, liveBucketStartMs } from '../chart/live-bucket.util.js';
39
+ import { liveBucketStartMs, venueSessionLatticeBarEndMs, venueSessionLatticeBarOpenMs, } from '../chart/live-bucket.util.js';
41
40
  import { wrunPartialMarkerTuple, wrunTuplesMarkedPartial } from './wrun-present-bits.util.js';
42
41
  const DAY_MS = 86_400_000;
43
42
  /** The span a tier must divide: the bar's own, or a day for a calendar bar (its span is no fixed number). */
@@ -63,22 +62,20 @@ function fittingTiers(tiers, barOpenMs, barMs) {
63
62
  }
64
63
  /**
65
64
  * The session a host bar covers when it is not its stamp to its end, under a session grid (a flow's plan, see the
66
- * module header): a bar the CME session lattice stamps at a day or longer (cme-session-bucket.util: the trade date's
67
- * 00:00Z label at 1d, its group's first trade date at 3d, its week's Monday at 1w, its month's 1st at a calendar
68
- * length) runs from the 17:00 Chicago open before it (`cmeSessionBarOpenMs`, read inside the bar) to the open that
69
- * starts the next bar (`cmeSessionBarEndMs`). Undefined for any other bar: no grid, a grid off the lattice (a UTC or
70
- * a stock chart's), an intraday lattice width (its stamp is its open), a stamp the lattice books no row to.
65
+ * module header): a bar a session lattice stamps at a day or longer (session-lattice.util, the CME family and forex:
66
+ * the trade date's 00:00Z label at 1d, its group's first trade date at 3d, its week's Monday at 1w, its month's 1st
67
+ * at a calendar length) runs from the session open before it (`venueSessionLatticeBarOpenMs`, read inside the bar) to
68
+ * the open that starts the next bar (`venueSessionLatticeBarEndMs`). Undefined for any other bar: no grid, a grid off
69
+ * every lattice (a UTC or a stock chart's), an intraday lattice width (its stamp is its open), a stamp the lattice
70
+ * books no row to.
71
71
  */
72
72
  export function wrunCmeSessionBarSpan(barOpenMs, intervalMs, sessionGrid) {
73
- if (!Number.isFinite(barOpenMs) || !(intervalMs >= DAY_MS) || !isCmeSessionLatticeIntervalMs(intervalMs)) {
73
+ if (!Number.isFinite(barOpenMs) || !(intervalMs >= DAY_MS))
74
74
  return undefined;
75
- }
76
- if (!isCmeSessionLatticeVenue(sessionGrid))
77
- return undefined;
78
- const toMs = cmeSessionBarEndMs(barOpenMs, intervalMs);
75
+ const toMs = venueSessionLatticeBarEndMs(barOpenMs, intervalMs, sessionGrid);
79
76
  if (toMs === null)
80
77
  return undefined;
81
- const fromMs = cmeSessionBarOpenMs(toMs - 1, intervalMs);
78
+ const fromMs = venueSessionLatticeBarOpenMs(toMs - 1, intervalMs, sessionGrid);
82
79
  return fromMs !== null && fromMs < toMs ? { fromMs, toMs } : undefined;
83
80
  }
84
81
  /** A host bar's span: its session under a session grid (`wrunCmeSessionBarSpan`), else its stamp to its end
@@ -89,6 +86,19 @@ export function wrunHostBarSpanOf(barOpenMs, intervalMs, sessionGrid) {
89
86
  toMs: wrunHostGridFetchTo(barOpenMs, intervalMs),
90
87
  });
91
88
  }
89
+ /** The host bars of a window that `[fromMs, toMs)` reaches, each its span (`wrunHostBarSpanOf`) cut at the next bar's
90
+ * stamp: a lane that marks bars by time stamps a row inside each bar it means, never by stepping the interval. */
91
+ export function wrunHostBarSpansWithin(window, fromMs, toMs) {
92
+ const spans = [];
93
+ window.barOpens.forEach((open, at) => {
94
+ const span = wrunHostBarSpanOf(open, window.intervalMs, window.barGrid);
95
+ const next = window.barOpens[at + 1];
96
+ const end = next !== undefined ? Math.min(span.toMs, next) : span.toMs;
97
+ if (end > fromMs && span.fromMs < toMs)
98
+ spans.push({ fromMs: span.fromMs, toMs: end });
99
+ });
100
+ return spans;
101
+ }
92
102
  /** The tiers that fit a session (its length a whole number of the tier's buckets, its open on the tier's UTC grid),
93
103
  * finest first: on a CME session the hour and finer, never the UTC day. */
94
104
  function sessionTiers(tiers, span) {
@@ -81,10 +81,11 @@ function tpoRowGridRefusal(name, rowHeight, from, to, price) {
81
81
  }
82
82
  function tpoFoldSpecOf(input) {
83
83
  const sessionType = tpoPeriodWord(input.period ?? 'day');
84
+ // A kit TPO has no trading-hour choice and no chart session in its input: its day is the venue's, as before.
84
85
  const customTimeRange = resolveTradingDayTpoTimeRange({
85
86
  sessionType,
86
87
  ...(input.exchange !== undefined ? { exchange: input.exchange } : {}),
87
- });
88
+ }, null);
88
89
  return {
89
90
  name: input.name,
90
91
  rowHeight: finite(input.rowHeight) && input.rowHeight > 0 ? input.rowHeight : 1,
@@ -20,8 +20,15 @@
20
20
  * A trades input pinned to another market (kit 0.77.0) reads a leg lane per
21
21
  * (quote, market), `trades@BYBIT|BTCUSDT`: its fetch key, live lane and
22
22
  * `tradeLegRows` key (docs: wrun-typed-inputs.md, "Coin legs").
23
+ *
24
+ * A leg lane is asked by ONE planner (`planWrunTradeLegAsk`, WRUN-PANBACK C): the
25
+ * whole run's window and a pan-back prefix page's ask the same request, a leg on
26
+ * the chart's own grid plainly and any other at the tier that fits both grids.
27
+ * The leg placement rules it reads (`wrunLegVenueOf`, `wrunLegStraddlesChartBars`,
28
+ * `wrunLegPlacementLeadMs`) are the pinned candle legs' too.
23
29
  */
24
30
  import type { WrunInputSource } from '../../interfaces/wrun-runtime.interface.js';
31
+ import { type LiveBucketVenue } from '../chart/live-bucket.util.js';
25
32
  /** A trades lane: one per quote. */
26
33
  export type WrunTradesLane = 'trades' | 'trades_usd';
27
34
  /** A trades lane's payload extras: present only on the dollar lane. */
@@ -50,3 +57,69 @@ export declare function wrunTradesLegOf(lane: string): WrunTradesLeg | undefined
50
57
  export declare function isWrunTradesLegLane(value: unknown): value is WrunTradesLegLane;
51
58
  /** A leg lane's payload extras: its market, its quote's own, and `pinnedMarket` (its market's series on any chart). */
52
59
  export declare function wrunTradesLegExtras(lane: WrunTradesLegLane): Record<string, unknown>;
60
+ /** The chart a leg's ask is planned against: the run clock's bar span (the chart's interval, or the run interval's)
61
+ * and the chart's market and bar grid as `liveBucketVenueOf` reads them (the chart's metadata, or the market a live
62
+ * session recorded). */
63
+ export interface WrunLegAskChart {
64
+ intervalMs: number;
65
+ venue: LiveBucketVenue | null | undefined;
66
+ }
67
+ /** A leg's own bar grid: its market (the chart's own where it names none) at the chart's session. */
68
+ export declare function wrunLegVenueOf(chart: WrunLegAskChart, market: {
69
+ exchange?: unknown;
70
+ symbol?: unknown;
71
+ } | undefined): LiveBucketVenue;
72
+ /**
73
+ * Whether a leg's rows at `legMs` straddle the chart's bars (`sourceRowsStraddleHostBars`: a 24/7 market's :00 hours
74
+ * under a stock's 09:30-anchored bars, a crypto market's 4h bars on a CME chart's session lattice, or the reverse).
75
+ * Such a leg is placed on the chart's bars by the row builder alone (`wrunLegRowsOnHostBars`), so its asks ride
76
+ * dataFetch's native-rows path and its window opens one leg span early (`wrunLegPlacementLeadMs`): the chart's first
77
+ * bar is owed the row opening up to one leg span before it. A leg on the chart's own grid, or on a finer one dividing
78
+ * it, never straddles, and a leg coarser than the chart is never placed.
79
+ */
80
+ export declare function wrunLegStraddlesChartBars(chart: WrunLegAskChart, legMs: number, market: {
81
+ exchange?: unknown;
82
+ symbol?: unknown;
83
+ } | undefined): boolean;
84
+ /** The span a leg's window opens before the chart's first bar: one leg span where its rows straddle the chart's bars
85
+ * (`wrunLegStraddlesChartBars`), else none. */
86
+ export declare function wrunLegPlacementLeadMs(chart: WrunLegAskChart, legMs: number, market: {
87
+ exchange?: unknown;
88
+ symbol?: unknown;
89
+ } | undefined): number;
90
+ /** The request a trades leg lane is asked with (`planWrunTradeLegAsk`). */
91
+ export interface WrunTradeLegAsk {
92
+ lane: WrunTradesLegLane;
93
+ /** The K control every leg rides: its market's buy and sell volume. */
94
+ type: 'buy_sell_volume';
95
+ /** The leg's payload extras (`wrunTradesLegExtras`): its market, its quote's own, `pinnedMarket`. */
96
+ extras: Record<string, unknown>;
97
+ /** The window the ask spans: the asked window on the chart's own grid; a tier ask's from one tier row early where
98
+ * the leg's rows straddle the chart's bars, through the last bar's close. */
99
+ fromMs: number;
100
+ toMs: number;
101
+ /** The tier ask (dataFetch's native-rows path at the tier that fits every chart bar and every leg bar, its payload
102
+ * extras naming the tier and the path), or null for a leg on the chart's own grid, asked plainly. */
103
+ tier: null | {
104
+ tierMs: number;
105
+ extras: Record<string, unknown>;
106
+ };
107
+ }
108
+ /**
109
+ * The request a trades leg lane is asked with over a window `[fromMs, toMs]` (the run window's first bar through its
110
+ * last bar's open), on the chart `chart`: the whole run's ask (wrun-overlay-run.util, the browser lanes) and a
111
+ * pan-back prefix page's (`acquireWrunPrefixLanePages`) alike, so a page asks a leg exactly as the whole run it stands
112
+ * in for would. A trades leg rides the grid-leg model: its rows stay on its own market's grid and the row builder sums
113
+ * them into the chart bars holding them (wrun-source-rows `tradeLegRowsOf`). On an index-mode chart or market, and
114
+ * wherever its rows straddle the chart's bars (`wrunLegStraddlesChartBars`), it is asked at a tier (`tier`): the
115
+ * native-rows path (its rows at their own stamps, never placed on the chart's bars by the fetch) at the tier that fits
116
+ * every chart bar and every leg bar (`indexHostFetchTierMs`: 30m under a stock's :30 hours, so each bar sums whole
117
+ * tier rows; the chart's interval on a timestamp-mode chart), the chart's bars asked whole (through the last bar's
118
+ * close, from one tier row early where the rows straddle). The tier and the path ride its acquisition, which the
119
+ * intake folds the live prints at and the reconcile asks again. Elsewhere (a 24/7 leg on a 24/7 chart) the ask is the
120
+ * chart's own window at the chart's interval (`tier` null). Undefined for a lane that names no leg market.
121
+ */
122
+ export declare function planWrunTradeLegAsk(lane: WrunTradesLegLane, chart: WrunLegAskChart, window: {
123
+ fromMs: number;
124
+ toMs: number;
125
+ }): WrunTradeLegAsk | undefined;