@orangecharts/wrun-chart-host 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/README.md +22 -8
  2. package/dist/constants/common.constants.d.ts +15 -0
  3. package/dist/constants/common.constants.js +23 -0
  4. package/dist/constants/data-source.constants.d.ts +1 -0
  5. package/dist/constants/data-source.constants.js +1 -0
  6. package/dist/constants/economic.constants.d.ts +39 -0
  7. package/dist/constants/economic.constants.js +77 -0
  8. package/dist/constants/etf-covered-coins.constants.d.ts +1 -0
  9. package/dist/constants/etf-covered-coins.constants.js +9 -0
  10. package/dist/constants/feature-flags.constants.d.ts +60 -0
  11. package/dist/constants/feature-flags.constants.js +308 -0
  12. package/dist/constants/feature-limits.constants.d.ts +134 -0
  13. package/dist/constants/feature-limits.constants.js +155 -0
  14. package/dist/constants/marketCapabilities.constants.d.ts +87 -0
  15. package/dist/constants/marketCapabilities.constants.js +213 -0
  16. package/dist/constants/option-venues.constants.d.ts +100 -0
  17. package/dist/constants/option-venues.constants.js +167 -0
  18. package/dist/constants/overlay-data.constants.d.ts +53 -0
  19. package/dist/constants/overlay-data.constants.js +80 -0
  20. package/dist/constants/pane-grid.constants.d.ts +15 -0
  21. package/dist/constants/pane-grid.constants.js +17 -0
  22. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +133 -0
  23. package/dist/constants/scriptEditor/builtin-script-snippets.js +451 -0
  24. package/dist/constants/venue-presets.constants.d.ts +10 -0
  25. package/dist/constants/venue-presets.constants.js +22 -0
  26. package/dist/enums/chart.enum.d.ts +68 -0
  27. package/dist/enums/chart.enum.js +70 -0
  28. package/dist/helpers/data.helpers.d.ts +2 -0
  29. package/dist/helpers/data.helpers.js +14 -0
  30. package/dist/host-env.d.ts +163 -5
  31. package/dist/host-ports.types.d.ts +431 -0
  32. package/dist/host-ports.types.js +1 -0
  33. package/dist/index.d.ts +138 -0
  34. package/dist/index.js +138 -0
  35. package/dist/indicators/controls/technical-script/technical-script-input-rendering.d.ts +86 -0
  36. package/dist/indicators/controls/technical-script/technical-script-input-rendering.js +179 -0
  37. package/dist/interfaces/asset-venue.interface.d.ts +91 -0
  38. package/dist/interfaces/asset-venue.interface.js +1 -0
  39. package/dist/interfaces/cancel-reason.interface.d.ts +24 -0
  40. package/dist/interfaces/cancel-reason.interface.js +2 -0
  41. package/dist/interfaces/catalog-display.interface.d.ts +3 -0
  42. package/dist/interfaces/catalog-display.interface.js +1 -0
  43. package/dist/interfaces/cme-realtime.interface.d.ts +251 -0
  44. package/dist/interfaces/cme-realtime.interface.js +46 -0
  45. package/dist/interfaces/feed.interface.d.ts +80 -0
  46. package/dist/interfaces/feed.interface.js +7 -0
  47. package/dist/interfaces/market-kind.interface.d.ts +8 -0
  48. package/dist/interfaces/market-kind.interface.js +1 -0
  49. package/dist/interfaces/opra-realtime.interface.d.ts +224 -0
  50. package/dist/interfaces/opra-realtime.interface.js +105 -0
  51. package/dist/interfaces/option-instrument.interface.d.ts +32 -0
  52. package/dist/interfaces/option-instrument.interface.js +1 -0
  53. package/dist/interfaces/options-chain-scope.interface.d.ts +29 -0
  54. package/dist/interfaces/options-chain-scope.interface.js +7 -0
  55. package/dist/interfaces/prediction-market.interface.d.ts +88 -0
  56. package/dist/interfaces/prediction-market.interface.js +8 -0
  57. package/dist/interfaces/wrun-runtime.interface.d.ts +5 -0
  58. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +185 -0
  59. package/dist/kscript-data/controls/live-trades-merge.util.js +357 -0
  60. package/dist/settings-templates/frvp-fields.d.ts +27 -0
  61. package/dist/settings-templates/frvp-fields.js +108 -0
  62. package/dist/settings-templates/index.d.ts +119 -0
  63. package/dist/settings-templates/index.js +442 -0
  64. package/dist/settings-templates/indicator-fields.d.ts +56 -0
  65. package/dist/settings-templates/indicator-fields.js +793 -0
  66. package/dist/settings-templates/tool-rules.d.ts +59 -0
  67. package/dist/settings-templates/tool-rules.js +49 -0
  68. package/dist/settings-templates/tool-tables.generated.d.ts +2 -0
  69. package/dist/settings-templates/tool-tables.generated.js +1668 -0
  70. package/dist/utility/blk-market.util.d.ts +5 -0
  71. package/dist/utility/blk-market.util.js +12 -0
  72. package/dist/utility/chart/chart-load-phase.util.d.ts +32 -0
  73. package/dist/utility/chart/chart-load-phase.util.js +78 -0
  74. package/dist/utility/chart/cme-cache-context.util.d.ts +108 -0
  75. package/dist/utility/chart/cme-cache-context.util.js +166 -0
  76. package/dist/utility/chart/cme-session-bucket.util.d.ts +82 -0
  77. package/dist/utility/chart/cme-session-bucket.util.js +343 -0
  78. package/dist/utility/chart/cme-trade-calendar.util.d.ts +26 -0
  79. package/dist/utility/chart/cme-trade-calendar.util.js +147 -0
  80. package/dist/utility/chart/continuous-contracts.util.d.ts +138 -0
  81. package/dist/utility/chart/continuous-contracts.util.js +374 -0
  82. package/dist/utility/chart/date-labelled-interval.leaf.d.ts +15 -0
  83. package/dist/utility/chart/date-labelled-interval.leaf.js +19 -0
  84. package/dist/utility/chart/feed-interval.util.d.ts +119 -0
  85. package/dist/utility/chart/feed-interval.util.js +321 -0
  86. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +110 -0
  87. package/dist/utility/chart/fetch-dedupe-policy.util.js +407 -0
  88. package/dist/utility/chart/footprint-band.util.d.ts +76 -0
  89. package/dist/utility/chart/footprint-band.util.js +205 -0
  90. package/dist/utility/chart/footprint-cell-identity.util.d.ts +82 -0
  91. package/dist/utility/chart/footprint-cell-identity.util.js +346 -0
  92. package/dist/utility/chart/formula-calendar.util.d.ts +27 -0
  93. package/dist/utility/chart/formula-calendar.util.js +59 -0
  94. package/dist/utility/chart/history-wall.util.d.ts +67 -0
  95. package/dist/utility/chart/history-wall.util.js +87 -0
  96. package/dist/utility/chart/index-mode.util.d.ts +66 -0
  97. package/dist/utility/chart/index-mode.util.js +360 -0
  98. package/dist/utility/chart/indicator-coverage-planner.util.d.ts +217 -0
  99. package/dist/utility/chart/indicator-coverage-planner.util.js +443 -0
  100. package/dist/utility/chart/indicator-coverage-state.util.d.ts +33 -0
  101. package/dist/utility/chart/indicator-coverage-state.util.js +110 -0
  102. package/dist/utility/chart/indicator-gap-detector.util.d.ts +127 -0
  103. package/dist/utility/chart/indicator-gap-detector.util.js +260 -0
  104. package/dist/utility/chart/indicator-gap-repair.util.d.ts +88 -0
  105. package/dist/utility/chart/indicator-gap-repair.util.js +177 -0
  106. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +26 -0
  107. package/dist/utility/chart/indicator-inflight-registry.util.js +254 -0
  108. package/dist/utility/chart/indicator-run-interval.util.d.ts +130 -0
  109. package/dist/utility/chart/indicator-run-interval.util.js +268 -0
  110. package/dist/utility/chart/interval-registry.util.d.ts +23 -0
  111. package/dist/utility/chart/interval-registry.util.js +83 -0
  112. package/dist/utility/chart/kscript-main-grid-stages.util.d.ts +21 -0
  113. package/dist/utility/chart/kscript-main-grid-stages.util.js +332 -0
  114. package/dist/utility/chart/legacy-exchange.leaf.d.ts +11 -0
  115. package/dist/utility/chart/legacy-exchange.leaf.js +43 -0
  116. package/dist/utility/chart/live-bucket.util.d.ts +66 -0
  117. package/dist/utility/chart/live-bucket.util.js +165 -0
  118. package/dist/utility/chart/market-session-schedule.util.d.ts +91 -0
  119. package/dist/utility/chart/market-session-schedule.util.js +337 -0
  120. package/dist/utility/chart/marketKind.util.d.ts +181 -0
  121. package/dist/utility/chart/marketKind.util.js +371 -0
  122. package/dist/utility/chart/opra-read-access.leaf.d.ts +26 -0
  123. package/dist/utility/chart/opra-read-access.leaf.js +25 -0
  124. package/dist/utility/chart/prediction-identity.util.d.ts +159 -0
  125. package/dist/utility/chart/prediction-identity.util.js +236 -0
  126. package/dist/utility/chart/rth-session.util.d.ts +352 -0
  127. package/dist/utility/chart/rth-session.util.js +926 -0
  128. package/dist/utility/chart/titan-constants.pin.d.ts +43 -0
  129. package/dist/utility/chart/titan-constants.pin.js +50 -0
  130. package/dist/utility/chart/us-equities-session.util.d.ts +127 -0
  131. package/dist/utility/chart/us-equities-session.util.js +251 -0
  132. package/dist/utility/chart/window-geometry.leaf.d.ts +119 -0
  133. package/dist/utility/chart/window-geometry.leaf.js +391 -0
  134. package/dist/utility/chart/window-owner.leaf.d.ts +19 -0
  135. package/dist/utility/chart/window-owner.leaf.js +24 -0
  136. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +100 -0
  137. package/dist/utility/chart/wrun-bar-session-facts.util.js +354 -0
  138. package/dist/utility/chart/wrun-wire-ref.util.d.ts +23 -0
  139. package/dist/utility/chart/wrun-wire-ref.util.js +16 -0
  140. package/dist/utility/common/safe-math-eval.d.ts +18 -0
  141. package/dist/utility/common/safe-math-eval.js +160 -0
  142. package/dist/utility/common/time.util.d.ts +134 -0
  143. package/dist/utility/common/time.util.js +428 -0
  144. package/dist/utility/common/transformations.util.d.ts +126 -0
  145. package/dist/utility/common/transformations.util.js +711 -0
  146. package/dist/utility/common/visible-timeout.util.d.ts +17 -0
  147. package/dist/utility/common/visible-timeout.util.js +75 -0
  148. package/dist/utility/exchange-normalization.util.d.ts +8 -0
  149. package/dist/utility/exchange-normalization.util.js +32 -0
  150. package/dist/utility/html-escape.leaf.d.ts +11 -0
  151. package/dist/utility/html-escape.leaf.js +20 -0
  152. package/dist/utility/intl-locale.util.d.ts +2 -0
  153. package/dist/utility/intl-locale.util.js +28 -0
  154. package/dist/utility/number-format.util.d.ts +14 -1
  155. package/dist/utility/number-format.util.js +50 -19
  156. package/dist/utility/options/option-symbol.util.d.ts +28 -0
  157. package/dist/utility/options/option-symbol.util.js +176 -0
  158. package/dist/utility/options/option-trade-units.util.d.ts +190 -0
  159. package/dist/utility/options/option-trade-units.util.js +283 -0
  160. package/dist/utility/options/option-venue.util.d.ts +75 -0
  161. package/dist/utility/options/option-venue.util.js +85 -0
  162. package/dist/utility/pool-symbol.leaf.d.ts +34 -0
  163. package/dist/utility/pool-symbol.leaf.js +95 -0
  164. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +109 -0
  165. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +302 -0
  166. package/dist/utility/symbol-selection/contract-expiry.util.d.ts +39 -0
  167. package/dist/utility/symbol-selection/contract-expiry.util.js +111 -0
  168. package/dist/utility/v2/gate-plane.util.d.ts +58 -0
  169. package/dist/utility/v2/gate-plane.util.js +99 -0
  170. package/dist/utility/v2/gate-session-latch.util.d.ts +22 -0
  171. package/dist/utility/v2/gate-session-latch.util.js +34 -0
  172. package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +76 -0
  173. package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +221 -0
  174. package/dist/utility/wrun/sources/host-grid-landing.d.ts +15 -0
  175. package/dist/utility/wrun/sources/host-grid-landing.js +26 -0
  176. package/dist/utility/wrun/sources/lanes/bitfinex_funding.d.ts +27 -0
  177. package/dist/utility/wrun/sources/lanes/bitfinex_funding.js +85 -0
  178. package/dist/utility/wrun/sources/lanes/economic.d.ts +27 -0
  179. package/dist/utility/wrun/sources/lanes/economic.js +79 -0
  180. package/dist/utility/wrun/sources/lanes/etf_holdings.d.ts +35 -0
  181. package/dist/utility/wrun/sources/lanes/etf_holdings.js +165 -0
  182. package/dist/utility/wrun/sources/lanes/etf_premium.d.ts +19 -0
  183. package/dist/utility/wrun/sources/lanes/etf_premium.js +114 -0
  184. package/dist/utility/wrun/sources/lanes/ethena_positions.d.ts +30 -0
  185. package/dist/utility/wrun/sources/lanes/ethena_positions.js +51 -0
  186. package/dist/utility/wrun/sources/lanes/index.d.ts +2 -0
  187. package/dist/utility/wrun/sources/lanes/index.js +32 -0
  188. package/dist/utility/wrun/sources/lanes/long_short_ratio.d.ts +17 -0
  189. package/dist/utility/wrun/sources/lanes/long_short_ratio.js +47 -0
  190. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +58 -0
  191. package/dist/utility/wrun/sources/lanes/option_daily.js +111 -0
  192. package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +27 -0
  193. package/dist/utility/wrun/sources/lanes/option_stats_10m.js +21 -0
  194. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +50 -0
  195. package/dist/utility/wrun/sources/lanes/options_flow.js +155 -0
  196. package/dist/utility/wrun/sources/lanes/options_oi.d.ts +29 -0
  197. package/dist/utility/wrun/sources/lanes/options_oi.js +59 -0
  198. package/dist/utility/wrun/sources/lanes/options_volume.d.ts +38 -0
  199. package/dist/utility/wrun/sources/lanes/options_volume.js +63 -0
  200. package/dist/utility/wrun/sources/lanes/series.d.ts +67 -0
  201. package/dist/utility/wrun/sources/lanes/series.js +321 -0
  202. package/dist/utility/wrun/sources/lanes/token_supply.d.ts +30 -0
  203. package/dist/utility/wrun/sources/lanes/token_supply.js +145 -0
  204. package/dist/utility/wrun/sources/lanes/treasury_balance.d.ts +25 -0
  205. package/dist/utility/wrun/sources/lanes/treasury_balance.js +47 -0
  206. package/dist/utility/wrun/sources/lanes/volatility_index.d.ts +21 -0
  207. package/dist/utility/wrun/sources/lanes/volatility_index.js +11 -0
  208. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +215 -0
  209. package/dist/utility/wrun/sources/opra-option-lanes.util.js +477 -0
  210. package/dist/utility/wrun/sources/registry.d.ts +21 -0
  211. package/dist/utility/wrun/sources/registry.js +237 -0
  212. package/dist/utility/wrun/sources/row-lane-registry.d.ts +28 -0
  213. package/dist/utility/wrun/sources/row-lane-registry.js +230 -0
  214. package/dist/utility/wrun/sources/row-lanes/index.d.ts +2 -0
  215. package/dist/utility/wrun/sources/row-lanes/index.js +12 -0
  216. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +2 -0
  217. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +38 -0
  218. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +55 -0
  219. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +126 -0
  220. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +4 -0
  221. package/dist/utility/wrun/sources/row-lanes/option_prints.js +191 -0
  222. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +62 -0
  223. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +147 -0
  224. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +70 -0
  225. package/dist/utility/wrun/sources/row-lanes/option_surface.js +144 -0
  226. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +309 -0
  227. package/dist/utility/wrun/sources/wrun-poll-lane.types.js +26 -0
  228. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +350 -0
  229. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +576 -0
  230. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +275 -0
  231. package/dist/utility/wrun/sources/wrun-row-lane.types.js +16 -0
  232. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +207 -0
  233. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +450 -0
  234. package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +28 -0
  235. package/dist/utility/wrun/wrun-browser-sources.leaf.js +66 -0
  236. package/dist/utility/wrun/wrun-cloud-record.util.d.ts +65 -0
  237. package/dist/utility/wrun/wrun-cloud-record.util.js +121 -0
  238. package/dist/utility/wrun/wrun-daily-lane.util.d.ts +95 -0
  239. package/dist/utility/wrun/wrun-daily-lane.util.js +297 -0
  240. package/dist/utility/wrun/wrun-deadline.util.d.ts +52 -0
  241. package/dist/utility/wrun/wrun-deadline.util.js +82 -0
  242. package/dist/utility/wrun/wrun-etf-flow-lane.util.d.ts +94 -0
  243. package/dist/utility/wrun/wrun-etf-flow-lane.util.js +224 -0
  244. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +82 -0
  245. package/dist/utility/wrun/wrun-etf-funds.util.js +242 -0
  246. package/dist/utility/wrun/wrun-frames.d.ts +20 -1
  247. package/dist/utility/wrun/wrun-frames.js +103 -49
  248. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  249. package/dist/utility/wrun/wrun-hosted-wire-caps.js +27 -0
  250. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +22 -0
  251. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +32 -0
  252. package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +18 -0
  253. package/dist/utility/wrun/wrun-lane-warmup.util.js +112 -0
  254. package/dist/utility/wrun/wrun-leg-close.util.d.ts +57 -0
  255. package/dist/utility/wrun/wrun-leg-close.util.js +187 -0
  256. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +144 -0
  257. package/dist/utility/wrun/wrun-leg-fetch.util.js +212 -0
  258. package/dist/utility/wrun/wrun-leg-stream-classes.d.ts +73 -0
  259. package/dist/utility/wrun/wrun-leg-stream-classes.js +86 -0
  260. package/dist/utility/wrun/wrun-levels-child.util.d.ts +101 -6
  261. package/dist/utility/wrun/wrun-levels-child.util.js +335 -157
  262. package/dist/utility/wrun/wrun-memory-clamp.util.d.ts +33 -0
  263. package/dist/utility/wrun/wrun-memory-clamp.util.js +146 -0
  264. package/dist/utility/wrun/wrun-odds-template-market.util.d.ts +51 -0
  265. package/dist/utility/wrun/wrun-odds-template-market.util.js +251 -0
  266. package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +65 -0
  267. package/dist/utility/wrun/wrun-opra-flow.leaf.js +94 -0
  268. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +47 -0
  269. package/dist/utility/wrun/wrun-opra-lane.util.js +58 -0
  270. package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +49 -0
  271. package/dist/utility/wrun/wrun-opra-stats.leaf.js +115 -0
  272. package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +12 -0
  273. package/dist/utility/wrun/wrun-opra-underlying.util.js +1 -0
  274. package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +142 -0
  275. package/dist/utility/wrun/wrun-option-contract-flow.util.js +451 -0
  276. package/dist/utility/wrun/wrun-option-knobs.util.d.ts +43 -0
  277. package/dist/utility/wrun/wrun-option-knobs.util.js +81 -0
  278. package/dist/utility/wrun/wrun-option-prints.util.d.ts +144 -0
  279. package/dist/utility/wrun/wrun-option-prints.util.js +356 -0
  280. package/dist/utility/wrun/wrun-option-summary-lane.util.d.ts +102 -0
  281. package/dist/utility/wrun/wrun-option-summary-lane.util.js +143 -0
  282. package/dist/utility/wrun/wrun-options-chain.util.d.ts +308 -0
  283. package/dist/utility/wrun/wrun-options-chain.util.js +502 -0
  284. package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +9 -4
  285. package/dist/utility/wrun/wrun-overlay-identity.util.js +16 -6
  286. package/dist/utility/wrun/wrun-panel-mount.lazy.d.ts +10 -0
  287. package/dist/utility/wrun/wrun-panel-mount.lazy.js +68 -0
  288. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +377 -0
  289. package/dist/utility/wrun/wrun-panel-mount.util.js +2251 -0
  290. package/dist/utility/wrun/wrun-param-map.util.d.ts +298 -0
  291. package/dist/utility/wrun/wrun-param-map.util.js +581 -0
  292. package/dist/utility/wrun/wrun-pause-dim.util.d.ts +52 -0
  293. package/dist/utility/wrun/wrun-pause-dim.util.js +153 -0
  294. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +149 -0
  295. package/dist/utility/wrun/wrun-pin-spelling.util.js +523 -0
  296. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +116 -0
  297. package/dist/utility/wrun/wrun-pin-venues.util.js +320 -0
  298. package/dist/utility/wrun/wrun-pinned-interval.util.d.ts +20 -0
  299. package/dist/utility/wrun/wrun-pinned-interval.util.js +47 -0
  300. package/dist/utility/wrun/wrun-plot-gate.types.d.ts +23 -0
  301. package/dist/utility/wrun/wrun-plot-gate.types.js +7 -0
  302. package/dist/utility/wrun/wrun-present-bits.util.d.ts +37 -0
  303. package/dist/utility/wrun/wrun-present-bits.util.js +73 -0
  304. package/dist/utility/wrun/wrun-protocol-pending.util.d.ts +33 -0
  305. package/dist/utility/wrun/wrun-protocol-pending.util.js +57 -0
  306. package/dist/utility/wrun/wrun-refusal.util.d.ts +41 -1
  307. package/dist/utility/wrun/wrun-refusal.util.js +69 -2
  308. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +1 -14
  309. package/dist/utility/wrun/wrun-registry-errors.util.js +0 -16
  310. package/dist/utility/wrun/wrun-row-source.d.ts +158 -0
  311. package/dist/utility/wrun/wrun-row-source.js +75 -0
  312. package/dist/utility/wrun/wrun-run-health.util.d.ts +155 -0
  313. package/dist/utility/wrun/wrun-run-health.util.js +273 -0
  314. package/dist/utility/wrun/wrun-run-interval-projection.types.d.ts +14 -0
  315. package/dist/utility/wrun/wrun-run-interval-projection.types.js +1 -0
  316. package/dist/utility/wrun/wrun-socket-row-source.d.ts +439 -0
  317. package/dist/utility/wrun/wrun-socket-row-source.js +1689 -0
  318. package/dist/utility/wrun/wrun-socket-session-losses.util.d.ts +18 -0
  319. package/dist/utility/wrun/wrun-socket-session-losses.util.js +25 -0
  320. package/dist/utility/wrun/wrun-source-rows.util.d.ts +911 -0
  321. package/dist/utility/wrun/wrun-source-rows.util.js +2597 -0
  322. package/dist/utility/wrun/wrun-tape-source.util.d.ts +82 -0
  323. package/dist/utility/wrun/wrun-tape-source.util.js +151 -0
  324. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +137 -0
  325. package/dist/utility/wrun/wrun-tier-grid.util.js +279 -0
  326. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +52 -0
  327. package/dist/utility/wrun/wrun-trades-lane.util.js +58 -0
  328. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +41 -0
  329. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +66 -0
  330. package/dist/utility/wrun-display-name.util.d.ts +33 -0
  331. package/dist/utility/wrun-display-name.util.js +64 -0
  332. package/dist/workers/constants/kscript-transport-codes.d.ts +15 -0
  333. package/dist/workers/constants/kscript-transport-codes.js +15 -0
  334. package/dist/workers/constants/socket-slots.d.ts +574 -0
  335. package/dist/workers/constants/socket-slots.js +539 -0
  336. package/dist/workers/utils/number.worker.util.d.ts +5 -0
  337. package/dist/workers/utils/number.worker.util.js +10 -0
  338. package/dist/workers/utils/time.worker.util.d.ts +12 -0
  339. package/dist/workers/utils/time.worker.util.js +24 -0
  340. package/dist/workers/utils/volume-profile.worker.util.d.ts +200 -0
  341. package/dist/workers/utils/volume-profile.worker.util.js +631 -0
  342. package/package.json +10 -4
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The `ethena_positions` poll lane: Ethena's collateral in the chart's coin, summed over the
3
+ * venues it is held on, as served (`input("ethena", ethena_positions.collateral)`).
4
+ *
5
+ * Rides the `K_ETHENA_POSITIONS` control (`src/kscript-data/controls/k-ethena-positions.control.ts`
6
+ * and its worker twin). The control reads `settings.coin` and asks `ETHENA_COLLATERAL_INFO_AGG`
7
+ * once per venue leg of a fixed map (BTC: Binance, Deribit, Bybit, OKX; ETH: seven legs over the
8
+ * same venues, the staked and wrapped forms included), then emits `[ts, sum of collateral]` for
9
+ * every bar on which EVERY leg has a row. Rows are stamped at the chart's bar opens, so an input
10
+ * exact-joins its bar (`join: 'bar'`) under the `missing` policy. Units: the venue-summed
11
+ * collateral as the gateway serves it, not converted.
12
+ *
13
+ * The map lists BTC and ETH only: for any other coin the control builds an empty formula and the
14
+ * legacy worker used to return before creating its queue element, so the request never ended.
15
+ * The lane refuses such a chart by name BEFORE any fetch (the only place a lane refuses). No
16
+ * knobs: the lane reads the chart's own coin, so every input of the class shares one fetch.
17
+ */
18
+ import { refuseWrunPollInput, wrunPollCoinGateSeed, } from '../wrun-poll-lane.types.js';
19
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.ethenaPositions`). */
20
+ const WRUN_ETHENA_POSITIONS_LANE_KEY = 'ethena_positions';
21
+ /** The coins the control maps venue legs for (`KEthenaPositionsControl.EXCHANGE_MAPPINGS`). */
22
+ export const WRUN_ETHENA_POSITIONS_COINS = Object.freeze(['BTC', 'ETH']);
23
+ /** The chart's coin as the control compares it: trimmed and upper-cased ('' when absent). */
24
+ function chartCoinWord(coin) {
25
+ return typeof coin === 'string' ? coin.trim().toUpperCase() : '';
26
+ }
27
+ /**
28
+ * Refuse by name unless the chart's coin is one Ethena holds collateral in (the coin gate's record:
29
+ * the lane, its coins, the chart's coin; the market words when the chart names no coin); answer
30
+ * the one payload field the control reads, as the placeholder the chart's fetch resolves to the
31
+ * chart's coin.
32
+ */
33
+ export function planWrunEthenaPositionsInput(ctx) {
34
+ const coin = chartCoinWord(ctx.coin);
35
+ if (coin === '') {
36
+ return refuseWrunPollInput(ctx, `needs a BTC or ETH chart (Ethena holds collateral in those coins only), and this chart has no coin`, wrunPollCoinGateSeed(WRUN_ETHENA_POSITIONS_LANE_KEY, WRUN_ETHENA_POSITIONS_COINS, ''));
37
+ }
38
+ if (!WRUN_ETHENA_POSITIONS_COINS.includes(coin)) {
39
+ return refuseWrunPollInput(ctx, `needs a BTC or ETH chart (Ethena holds collateral in those coins only): this chart's coin is ${coin}`, wrunPollCoinGateSeed(WRUN_ETHENA_POSITIONS_LANE_KEY, WRUN_ETHENA_POSITIONS_COINS, coin));
40
+ }
41
+ return { coin: 'currentCoin' };
42
+ }
43
+ export const lane = {
44
+ sourceClass: 'ethena_positions',
45
+ laneKey: WRUN_ETHENA_POSITIONS_LANE_KEY,
46
+ kType: 'ethena_positions',
47
+ fields: { collateral: 1 },
48
+ plan: (_source, ctx) => planWrunEthenaPositionsInput(ctx),
49
+ join: 'bar',
50
+ label: 'Ethena positions',
51
+ };
@@ -0,0 +1,2 @@
1
+ import type { WrunPollLaneModule } from '../wrun-poll-lane.types.js';
2
+ export declare const WRUN_POLL_LANE_MODULES: Readonly<Record<string, WrunPollLaneModule>>;
@@ -0,0 +1,32 @@
1
+ import * as lane_bitfinex_funding from './bitfinex_funding.js';
2
+ import * as lane_economic from './economic.js';
3
+ import * as lane_etf_holdings from './etf_holdings.js';
4
+ import * as lane_etf_premium from './etf_premium.js';
5
+ import * as lane_ethena_positions from './ethena_positions.js';
6
+ import * as lane_long_short_ratio from './long_short_ratio.js';
7
+ import * as lane_option_daily from './option_daily.js';
8
+ import * as lane_option_stats_10m from './option_stats_10m.js';
9
+ import * as lane_options_flow from './options_flow.js';
10
+ import * as lane_options_oi from './options_oi.js';
11
+ import * as lane_options_volume from './options_volume.js';
12
+ import * as lane_series from './series.js';
13
+ import * as lane_token_supply from './token_supply.js';
14
+ import * as lane_treasury_balance from './treasury_balance.js';
15
+ import * as lane_volatility_index from './volatility_index.js';
16
+ export const WRUN_POLL_LANE_MODULES = {
17
+ './lanes/bitfinex_funding.ts': lane_bitfinex_funding,
18
+ './lanes/economic.ts': lane_economic,
19
+ './lanes/etf_holdings.ts': lane_etf_holdings,
20
+ './lanes/etf_premium.ts': lane_etf_premium,
21
+ './lanes/ethena_positions.ts': lane_ethena_positions,
22
+ './lanes/long_short_ratio.ts': lane_long_short_ratio,
23
+ './lanes/option_daily.ts': lane_option_daily,
24
+ './lanes/option_stats_10m.ts': lane_option_stats_10m,
25
+ './lanes/options_flow.ts': lane_options_flow,
26
+ './lanes/options_oi.ts': lane_options_oi,
27
+ './lanes/options_volume.ts': lane_options_volume,
28
+ './lanes/series.ts': lane_series,
29
+ './lanes/token_supply.ts': lane_token_supply,
30
+ './lanes/treasury_balance.ts': lane_treasury_balance,
31
+ './lanes/volatility_index.ts': lane_volatility_index,
32
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * The `long_short_ratio` poll lane: the chart market's long/short ratios off the chart's
3
+ * `K_LONG_SHORT_RATIO` control (`LONG_SHORT_RATIO_AGG` for `<exchange>|<symbol>`, built by the
4
+ * control from the `symbol` and `exchange` the host's placeholders resolve to), one row per chart
5
+ * bar: `[ts, total_account, top_trader_account, top_trader_position]`, plain ratios of longs over
6
+ * shorts (the worker already reads a ratio at or below 0 as NaN, which the row builder treats as
7
+ * no observation under `carry`).
8
+ *
9
+ * No knobs, the chart's own market, an exact join at the bar opens. The data exists on 5m and
10
+ * coarser charts only (the chart's fetch gate, `KSCRIPT_DATA_INTERVAL_RESTRICTIONS`, refuses the
11
+ * K type at 1s, 1m, 2m and 3m, where the ask would come back declined and read as unavailable),
12
+ * so `plan` refuses a finer chart by name before any fetch (the record: `interval-unserved`
13
+ * `fine`, the 5m minimum as the interval to try); otherwise the placeholders are the whole ask and
14
+ * the plan answers nothing.
15
+ */
16
+ import { type WrunPollLane } from '../wrun-poll-lane.types.js';
17
+ export declare const lane: WrunPollLane;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The `long_short_ratio` poll lane: the chart market's long/short ratios off the chart's
3
+ * `K_LONG_SHORT_RATIO` control (`LONG_SHORT_RATIO_AGG` for `<exchange>|<symbol>`, built by the
4
+ * control from the `symbol` and `exchange` the host's placeholders resolve to), one row per chart
5
+ * bar: `[ts, total_account, top_trader_account, top_trader_position]`, plain ratios of longs over
6
+ * shorts (the worker already reads a ratio at or below 0 as NaN, which the row builder treats as
7
+ * no observation under `carry`).
8
+ *
9
+ * No knobs, the chart's own market, an exact join at the bar opens. The data exists on 5m and
10
+ * coarser charts only (the chart's fetch gate, `KSCRIPT_DATA_INTERVAL_RESTRICTIONS`, refuses the
11
+ * K type at 1s, 1m, 2m and 3m, where the ask would come back declined and read as unavailable),
12
+ * so `plan` refuses a finer chart by name before any fetch (the record: `interval-unserved`
13
+ * `fine`, the 5m minimum as the interval to try); otherwise the placeholders are the whole ask and
14
+ * the plan answers nothing.
15
+ */
16
+ import { refuseWrunPollInput } from '../wrun-poll-lane.types.js';
17
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.longShortRatio`). */
18
+ const WRUN_LONG_SHORT_RATIO_LANE_KEY = 'long_short_ratio';
19
+ /** The finest chart interval the series exists on, and its picker word. */
20
+ const WRUN_LONG_SHORT_RATIO_MIN_INTERVAL_MS = 5 * 60_000;
21
+ const WRUN_LONG_SHORT_RATIO_MIN_INTERVAL = '5m';
22
+ /** A chart interval finer than 5m as the picker spells it (`1s`, `1m`, `2m`, `3m`), for the
23
+ * refusal; a length outside the picker's grid reads in whole seconds. */
24
+ function finerIntervalLabel(intervalMs) {
25
+ if (intervalMs >= 60_000 && intervalMs % 60_000 === 0)
26
+ return `${intervalMs / 60_000}m`;
27
+ return `${Math.max(1, Math.round(intervalMs / 1000))}s`;
28
+ }
29
+ export const lane = {
30
+ sourceClass: 'long_short_ratio',
31
+ laneKey: WRUN_LONG_SHORT_RATIO_LANE_KEY,
32
+ kType: 'long_short_ratio',
33
+ fields: { total_account: 1, top_trader_account: 2, top_trader_position: 3 },
34
+ plan(_source, ctx) {
35
+ if (ctx.intervalMs < WRUN_LONG_SHORT_RATIO_MIN_INTERVAL_MS) {
36
+ const chartInterval = finerIntervalLabel(ctx.intervalMs);
37
+ return refuseWrunPollInput(ctx, `needs a 5m or coarser chart: long/short ratio data exists on 5m and coarser charts, and this chart is ${chartInterval}`, {
38
+ cls: 'interval-unserved',
39
+ variant: 'fine',
40
+ params: { feed: WRUN_LONG_SHORT_RATIO_LANE_KEY, interval: WRUN_LONG_SHORT_RATIO_MIN_INTERVAL, chartInterval },
41
+ });
42
+ }
43
+ return undefined;
44
+ },
45
+ join: 'bar',
46
+ label: 'Long/short ratio',
47
+ };
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The `option_daily` lane (UW-PARITY source S5a, OPTIONS-PORT P5): the daily options statistics of the chart's options
3
+ * chain as 31 scalars, a daily join (`input("iv30", option_daily.atm_iv_30d, { missing: "nan" })`): the underlying as
4
+ * a symbol code, its price, the at-the-money IV at nine tenors, the 30-day 25-delta risk reversal, call and put
5
+ * volume, premium and open interest, the net exposures, the walls, the gamma flip and magnet, the front expiry's max
6
+ * pain and implied move, and the contracts counted (wrun-opra-stats.leaf, its units per plane).
7
+ *
8
+ * It reads OPTION_UNDERLYING_STATS DAY rows through `K_OPTION_UNDERLYING_STATS_DAY` (om's fetch type
9
+ * `option_underlying_stats_day`) and its worker twin. A DAY row is stamped at its session date's UTC midnight and
10
+ * written after that session closes, so the daily `last` landing lands it on the first chart bar of that UTC day and
11
+ * carries it across the day; the day before's row stands until the session's row is written (`lookbackDays` 7 keeps
12
+ * it in the ask after a holiday weekend).
13
+ *
14
+ * A CHAIN lane (`chain`): the chain is the one chain resolver's (opra-option-lanes.util `resolveWrunLaneChainChart`
15
+ * then `decideWrunLaneChain`, the decision `options_chain` and `option_surface` read), per input, and its plane is per
16
+ * instance: OPRA's rules on a US stock or OPRA contract chart, CME's on a CME futures chart (a continuous chart reads
17
+ * its lead contract, and a live session rebuilds once the lead rolls: `acquisitionMoved`), none on a crypto chain. On
18
+ * the OPRA plane (`ctx.opraPlane`, the planner's verdict) the chain is the plane's own by coin
19
+ * (`wrunLaneOpraPlaneChain`): the read goes by coin with no chain directory read, as it always went, so a stock listing
20
+ * no options or a directory that does not answer refuses nothing before the read. Each input reads ONE book, decided
21
+ * when the run plans (`auto`: the chain's default book) and named in the acquisition off OPRA. It rides the
22
+ * native-rows path on every plane (`nativeRows`), so the index-mode stock chart serves it too.
23
+ *
24
+ * Refused by name before any fetch: `opra-official-only:option_daily` for a package that may not read US options, a
25
+ * chart that names no underlying, `protocol-pending:OPTION_UNDERLYING_STATS` until the protocol release, a chart whose
26
+ * options a known stop keeps off the OPRA plane (`options-stopped`), a chart with no option chain (the options chain's
27
+ * `no-chain`), the CME display wall for a package that is not OpenMarket's own and a venue or book outside its words.
28
+ * The planner drops an input that declared `missing: "nan"` or `"zero"` instead of the stop's and the no-chain refusal
29
+ * (a note names the feed). An underlying with no row in the window answers empty: the empty-answer rule speaks for it.
30
+ */
31
+ import { type WrunPollLane, type WrunPollLaneContext, type WrunPollLaneExtras, type WrunPollLaneSource } from '../wrun-poll-lane.types.js';
32
+ import { type WrunLaneChain } from '../opra-option-lanes.util.js';
33
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.optionDaily`). */
34
+ export declare const WRUN_OPTION_DAILY_LANE_KEY = "option_daily";
35
+ /** The days before the chart window the ask opens: a session's row is written after its close, so the newest row
36
+ * standing at the window's head can be a few days old (a weekend, a holiday). */
37
+ export declare const WRUN_OPTION_DAILY_LOOKBACK_DAYS = 7;
38
+ /**
39
+ * An input's acquisition, the chain it reads as the ask's fields (the acquisition key: the class, the plane its
40
+ * exchange names, the exchange, the underlying, the book and the grain): `coin`, the chain's underlying (the OPRA
41
+ * ticker, the CME futures contract, a crypto venue's root coin: the key the plane files its rows under), and
42
+ * `statsExchange` always; `statsBook`, the ONE book the run decided, on every plane but OPRA (an OPRA read stays by
43
+ * coin with no symbol: contract C1); `statsContinuous` for a CME chain read off a continuous alias
44
+ * (`wrunOptionStatsAcquisitionMoved` reads it).
45
+ */
46
+ export declare function wrunOptionStatsExtras(chain: WrunLaneChain): Record<string, unknown>;
47
+ /** Whether an acquisition no longer names the chain the lane would plan now (D12): a CME chain read off a continuous
48
+ * alias whose lead contract rolled since the run planned it (`wrunLaneChainLeadMoved`). A live session holding it
49
+ * rebuilds, so no ask, cache or buffer joins the old contract's statistics to the new one's. */
50
+ export declare function wrunOptionStatsAcquisitionMoved(acquisition: Readonly<Record<string, unknown>>): boolean;
51
+ /**
52
+ * One input against the chart: a chart that names no underlying refused by name, the protocol gate, then the chain
53
+ * (the run's one resolution of the chart, `statsChartOf`: on the OPRA plane the plane's own by coin, no directory read)
54
+ * and the input's `venue` and `book` decided by the one chain resolver; its refusals are the options chain's own.
55
+ * Shared with `option_stats_10m`, which reads the same chain at ten minutes.
56
+ */
57
+ export declare function planWrunOptionStatsInput(source: WrunPollLaneSource, ctx: WrunPollLaneContext, feed: string, series: string): Promise<WrunPollLaneExtras>;
58
+ export declare const lane: WrunPollLane;
@@ -0,0 +1,111 @@
1
+ /**
2
+ * The `option_daily` lane (UW-PARITY source S5a, OPTIONS-PORT P5): the daily options statistics of the chart's options
3
+ * chain as 31 scalars, a daily join (`input("iv30", option_daily.atm_iv_30d, { missing: "nan" })`): the underlying as
4
+ * a symbol code, its price, the at-the-money IV at nine tenors, the 30-day 25-delta risk reversal, call and put
5
+ * volume, premium and open interest, the net exposures, the walls, the gamma flip and magnet, the front expiry's max
6
+ * pain and implied move, and the contracts counted (wrun-opra-stats.leaf, its units per plane).
7
+ *
8
+ * It reads OPTION_UNDERLYING_STATS DAY rows through `K_OPTION_UNDERLYING_STATS_DAY` (om's fetch type
9
+ * `option_underlying_stats_day`) and its worker twin. A DAY row is stamped at its session date's UTC midnight and
10
+ * written after that session closes, so the daily `last` landing lands it on the first chart bar of that UTC day and
11
+ * carries it across the day; the day before's row stands until the session's row is written (`lookbackDays` 7 keeps
12
+ * it in the ask after a holiday weekend).
13
+ *
14
+ * A CHAIN lane (`chain`): the chain is the one chain resolver's (opra-option-lanes.util `resolveWrunLaneChainChart`
15
+ * then `decideWrunLaneChain`, the decision `options_chain` and `option_surface` read), per input, and its plane is per
16
+ * instance: OPRA's rules on a US stock or OPRA contract chart, CME's on a CME futures chart (a continuous chart reads
17
+ * its lead contract, and a live session rebuilds once the lead rolls: `acquisitionMoved`), none on a crypto chain. On
18
+ * the OPRA plane (`ctx.opraPlane`, the planner's verdict) the chain is the plane's own by coin
19
+ * (`wrunLaneOpraPlaneChain`): the read goes by coin with no chain directory read, as it always went, so a stock listing
20
+ * no options or a directory that does not answer refuses nothing before the read. Each input reads ONE book, decided
21
+ * when the run plans (`auto`: the chain's default book) and named in the acquisition off OPRA. It rides the
22
+ * native-rows path on every plane (`nativeRows`), so the index-mode stock chart serves it too.
23
+ *
24
+ * Refused by name before any fetch: `opra-official-only:option_daily` for a package that may not read US options, a
25
+ * chart that names no underlying, `protocol-pending:OPTION_UNDERLYING_STATS` until the protocol release, a chart whose
26
+ * options a known stop keeps off the OPRA plane (`options-stopped`), a chart with no option chain (the options chain's
27
+ * `no-chain`), the CME display wall for a package that is not OpenMarket's own and a venue or book outside its words.
28
+ * The planner drops an input that declared `missing: "nan"` or `"zero"` instead of the stop's and the no-chain refusal
29
+ * (a note names the feed). An underlying with no row in the window answers empty: the empty-answer rule speaks for it.
30
+ */
31
+ import { refuseWrunPollInput, } from '../wrun-poll-lane.types.js';
32
+ import { decideWrunLaneChain, resolveWrunLaneChainChart, wrunLaneChainLeadMoved, wrunLaneOpraPlaneChain, } from '../opra-option-lanes.util.js';
33
+ import { WRUN_OPTION_STATS_BOOK_FIELD, WRUN_OPTION_STATS_CONTINUOUS_FIELD, WRUN_OPTION_STATS_EXCHANGE_FIELD, WRUN_OPTION_STATS_FIELDS, WRUN_OPTION_STATS_KTYPES, WRUN_OPTION_STATS_TYPE, } from '../../wrun-opra-stats.leaf.js';
34
+ import { assertWrunProtocolType } from '../../wrun-protocol-pending.util.js';
35
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.optionDaily`). */
36
+ export const WRUN_OPTION_DAILY_LANE_KEY = 'option_daily';
37
+ /** The days before the chart window the ask opens: a session's row is written after its close, so the newest row
38
+ * standing at the window's head can be a few days old (a weekend, a holiday). */
39
+ export const WRUN_OPTION_DAILY_LOOKBACK_DAYS = 7;
40
+ /** The chart each run's plan resolved for the statistics lanes, by the plan's scope (`WrunPollLaneContext.runScope`):
41
+ * every input of one run, of either class, reads one resolution (one chain, one `auto` book), and the next run
42
+ * resolves afresh (a rolled lead, a listing that changed). */
43
+ const statsCharts = new WeakMap();
44
+ /** The chart the statistics lanes decide their chain over: on the OPRA plane the plane's own chain by coin (no chain
45
+ * directory read: `wrunLaneOpraPlaneChain`), off it the chart's chain as the one resolver resolves it. */
46
+ function resolveStatsChart(ctx) {
47
+ return resolveWrunLaneChainChart(ctx, ctx.opraPlane === true ? wrunLaneOpraPlaneChain(ctx.coin) : undefined);
48
+ }
49
+ function statsChartOf(ctx) {
50
+ const scope = ctx.runScope;
51
+ if (scope === undefined)
52
+ return resolveStatsChart(ctx);
53
+ let chart = statsCharts.get(scope);
54
+ if (chart === undefined) {
55
+ chart = resolveStatsChart(ctx);
56
+ statsCharts.set(scope, chart);
57
+ }
58
+ return chart;
59
+ }
60
+ /**
61
+ * An input's acquisition, the chain it reads as the ask's fields (the acquisition key: the class, the plane its
62
+ * exchange names, the exchange, the underlying, the book and the grain): `coin`, the chain's underlying (the OPRA
63
+ * ticker, the CME futures contract, a crypto venue's root coin: the key the plane files its rows under), and
64
+ * `statsExchange` always; `statsBook`, the ONE book the run decided, on every plane but OPRA (an OPRA read stays by
65
+ * coin with no symbol: contract C1); `statsContinuous` for a CME chain read off a continuous alias
66
+ * (`wrunOptionStatsAcquisitionMoved` reads it).
67
+ */
68
+ export function wrunOptionStatsExtras(chain) {
69
+ return {
70
+ coin: chain.underlying.toUpperCase(),
71
+ [WRUN_OPTION_STATS_EXCHANGE_FIELD]: chain.exchange,
72
+ ...(chain.plane !== 'opra' ? { [WRUN_OPTION_STATS_BOOK_FIELD]: chain.book.toUpperCase() } : {}),
73
+ ...(chain.continuous !== undefined ? { [WRUN_OPTION_STATS_CONTINUOUS_FIELD]: chain.continuous } : {}),
74
+ };
75
+ }
76
+ /** Whether an acquisition no longer names the chain the lane would plan now (D12): a CME chain read off a continuous
77
+ * alias whose lead contract rolled since the run planned it (`wrunLaneChainLeadMoved`). A live session holding it
78
+ * rebuilds, so no ask, cache or buffer joins the old contract's statistics to the new one's. */
79
+ export function wrunOptionStatsAcquisitionMoved(acquisition) {
80
+ return wrunLaneChainLeadMoved(acquisition[WRUN_OPTION_STATS_EXCHANGE_FIELD], acquisition[WRUN_OPTION_STATS_CONTINUOUS_FIELD], acquisition.coin);
81
+ }
82
+ /**
83
+ * One input against the chart: a chart that names no underlying refused by name, the protocol gate, then the chain
84
+ * (the run's one resolution of the chart, `statsChartOf`: on the OPRA plane the plane's own by coin, no directory read)
85
+ * and the input's `venue` and `book` decided by the one chain resolver; its refusals are the options chain's own.
86
+ * Shared with `option_stats_10m`, which reads the same chain at ten minutes.
87
+ */
88
+ export async function planWrunOptionStatsInput(source, ctx, feed, series) {
89
+ if (ctx.coin.trim() === '') {
90
+ return refuseWrunPollInput(ctx, `reads the ${series} of the chart's underlying, and this chart names none`, {
91
+ cls: 'feed-missing',
92
+ variant: 'market-paused',
93
+ params: { feed },
94
+ });
95
+ }
96
+ await assertWrunProtocolType(ctx, WRUN_OPTION_STATS_TYPE, feed);
97
+ const chain = await decideWrunLaneChain(await statsChartOf(ctx), { venue: source.venue, book: source.book }, ctx);
98
+ return wrunOptionStatsExtras(chain);
99
+ }
100
+ export const lane = {
101
+ sourceClass: 'option_daily',
102
+ laneKey: WRUN_OPTION_DAILY_LANE_KEY,
103
+ kType: WRUN_OPTION_STATS_KTYPES.day,
104
+ fields: Object.freeze(Object.fromEntries(WRUN_OPTION_STATS_FIELDS.map((field, at) => [field, at + 1]))),
105
+ plan: (source, ctx) => planWrunOptionStatsInput(source, ctx, WRUN_OPTION_DAILY_LANE_KEY, 'daily options statistics'),
106
+ join: { kind: 'daily', landing: 'last', lookbackDays: WRUN_OPTION_DAILY_LOOKBACK_DAYS },
107
+ label: 'Daily options statistics',
108
+ nativeRows: true,
109
+ chain: { exchangeField: WRUN_OPTION_STATS_EXCHANGE_FIELD },
110
+ acquisitionMoved: wrunOptionStatsAcquisitionMoved,
111
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The `option_stats_10m` lane (UW-PARITY source S5b, OPTIONS-PORT P5): the options statistics of the chart's options
3
+ * chain every ten minutes, the same 31 scalars as `option_daily` (wrun-opra-stats.leaf), each ten-minute row on the
4
+ * chart bar holding it (`input("gex", option_stats_10m.net_gex, { missing: "carry" })`).
5
+ *
6
+ * It reads OPTION_UNDERLYING_STATS TEN_MINUTES rows through `K_OPTION_UNDERLYING_STATS_10M` (om's fetch type
7
+ * `option_underlying_stats_10m`) and its worker twin, at ten minutes whatever the chart's interval (`interval`), and
8
+ * lands them on the chart's bars (`nativeRows` + `barGrid` snapshot, no tiers: a ten-minute row is the chain as it
9
+ * stood at its stamp, so it lands on the bar holding that stamp, and a bar holding several reads the newest): an
10
+ * as-of join, since a bar between two rows reads the input's `missing` policy (`carry` holds the last row). A stock
11
+ * chart's 09:30 New York bars, a crypto chart's and an OPRA contract chart's UTC bars alike.
12
+ *
13
+ * A CHAIN lane like `option_daily` (`planWrunOptionStatsInput`): the chart's chain on whichever plane it lists on (on
14
+ * the OPRA plane its own by coin, with no chain directory read), one book per input, a plane per instance, a continuous
15
+ * CME chart's lead contract (`acquisitionMoved`).
16
+ *
17
+ * Only some underlyings have ten-minute rows (U7). The chart never mirrors that list: the worker twin decides from
18
+ * the data plane's answer (an empty window, then one probe of the last week) and answers the refusal by name,
19
+ * `not-in-10m-universe`, which degrades the lane once as the `feed-missing` / `not-sampled` record below.
20
+ *
21
+ * Refused by name before any fetch: `opra-official-only:option_stats_10m`, a chart naming no underlying,
22
+ * `protocol-pending:OPTION_UNDERLYING_STATS` until the protocol release, and the chain's own refusals.
23
+ */
24
+ import type { WrunPollLane } from '../wrun-poll-lane.types.js';
25
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.optionStats10m`). */
26
+ export declare const WRUN_OPTION_STATS_10M_LANE_KEY = "option_stats_10m";
27
+ export declare const lane: WrunPollLane;
@@ -0,0 +1,21 @@
1
+ import { planWrunOptionStatsInput, wrunOptionStatsAcquisitionMoved } from './option_daily.js';
2
+ import { WRUN_NOT_IN_10M_UNIVERSE_CODE, WRUN_OPTION_STATS_EXCHANGE_FIELD, WRUN_OPTION_STATS_FIELDS, WRUN_OPTION_STATS_INTERVALS, WRUN_OPTION_STATS_KTYPES, } from '../../wrun-opra-stats.leaf.js';
3
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.optionStats10m`). */
4
+ export const WRUN_OPTION_STATS_10M_LANE_KEY = 'option_stats_10m';
5
+ export const lane = {
6
+ sourceClass: 'option_stats_10m',
7
+ laneKey: WRUN_OPTION_STATS_10M_LANE_KEY,
8
+ kType: WRUN_OPTION_STATS_KTYPES['10m'],
9
+ fields: Object.freeze(Object.fromEntries(WRUN_OPTION_STATS_FIELDS.map((field, at) => [field, at + 1]))),
10
+ plan: (source, ctx) => planWrunOptionStatsInput(source, ctx, WRUN_OPTION_STATS_10M_LANE_KEY, '10-minute options statistics'),
11
+ join: 'bar',
12
+ interval: WRUN_OPTION_STATS_INTERVALS['10m'],
13
+ label: '10-minute options statistics',
14
+ nativeRows: true,
15
+ barGrid: { landing: 'snapshot' },
16
+ chain: { exchangeField: WRUN_OPTION_STATS_EXCHANGE_FIELD },
17
+ acquisitionMoved: wrunOptionStatsAcquisitionMoved,
18
+ refusedAnswers: {
19
+ [WRUN_NOT_IN_10M_UNIVERSE_CODE]: { cls: 'feed-missing', variant: 'not-sampled' },
20
+ },
21
+ };
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The `options_flow` lane (UW-PARITY source S2): one bar's US listed option flow (OPRA) of the chart's underlying, or
3
+ * of a market-wide scope, as 32 scalars per bar: premium in USD, contracts and prints as counts, share delta in
4
+ * shares, vega in USD per IV point (`input("calls", options_flow.net_call_prem, { scope: "market", dte: "0dte" })`).
5
+ *
6
+ * It reads OPTION_PRINT_AGG flow scope rows (wrun-opra-flow.leaf: which rows each knob names) through the
7
+ * `K_OPTION_PRINT_AGG_SCOPE` control and its worker twin, which sums a bucket's matching rows into the 32 fields
8
+ * (`foldWrunOptionsFlowRows`); this lane lands the buckets on the chart's bars under the tier rule (rule 9: 1m kept 7
9
+ * days, 5m kept 30, 1d kept, the finest that fits the bar and still holds it; a stock chart's 09:30 New York bars, an
10
+ * OPRA contract chart's UTC ones), summed per bar. A bar no tier holds any more reads the input's `missing` fill.
11
+ *
12
+ * Knobs (acquisition facets, each validated here before any fetch, refused by name otherwise):
13
+ * - `scope`: `ticker` (the default: COIN rows of the chart's underlying), `market` (MARKET rows of every issue type),
14
+ * `equity`, `etf`, `index` (MARKET rows of that issue type), `venue` (VENUE rows of the `venue` knob's exchange);
15
+ * - `dte`: `all` (the default), `0dte`, `week` (1 to 7 days), `month` (8 to 35), `later`;
16
+ * - `moneyness`: `all` (the default), `otm`, `itm`;
17
+ * - `venue`: scope `venue` only, required there: an exchange's ISO MIC (`XCBO`), read by its Databento publisher id
18
+ * (`WRUN_OPTIONS_FLOW_VENUE_PUBLISHER_IDS`). That scope serves `call_prem_total`, `put_prem_total`,
19
+ * `call_contracts_total`, `put_contracts_total` and `prints` alone, with no `dte` or `moneyness` split.
20
+ *
21
+ * OPRA: `opra`, so the run's wall refuses a package that may not read US options (`opra-official-only:options_flow`),
22
+ * the lane is served only where the chart's options ride the OPRA plane, its asks name the plane and their routed
23
+ * tier, and the overlay's OPRA provenance is stamped before the first ask. `nativeRows` + `barGrid`: served on the
24
+ * index-mode stock chart, asked on the native-rows path, landed on the host grid.
25
+ *
26
+ * Before the protocol package names OPTION_PRINT_AGG, every input refuses by name before any fetch
27
+ * (`protocol-pending:OPTION_PRINT_AGG`). The gateway's scope reads stay behind its `read.option_print_scopes`
28
+ * switch: while it is off, the worker twin answers the refusal by name (`option-scope-reads-off`) and the run
29
+ * degrades the lane once, its chip the record below (wrun-lane-refusal.leaf), never a blank or a retry loop.
30
+ */
31
+ import { type WrunPollLane } from '../wrun-poll-lane.types.js';
32
+ import type { WrunBackendTier } from '../../wrun-tier-grid.util.js';
33
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.optionsFlow`). */
34
+ export declare const WRUN_OPTIONS_FLOW_LANE_KEY = "options_flow";
35
+ /** The tiers a bar is read from (rule 9, ADDENDUM-2 B3; the VENUE family keeps no 5m tier, so a 5m ask of it the
36
+ * gateway rolls up from its 1m rows, which a bar older than 7 days no longer has: that bar reads its fill). */
37
+ export declare const WRUN_OPTIONS_FLOW_TIERS: readonly WrunBackendTier[];
38
+ /**
39
+ * The Databento publisher id the data plane names each `venue` word by (the VENUE rows' `venue`, the request's
40
+ * `VENUE:<id>`). The words are ISO MIC codes, Databento's OPRA.PILLAR publisher suffixes (`OPRA.PILLAR.XCBO`): the
41
+ * fourteen exchanges om's market-share template reads by name. streamd writes a print's DBN header publisher id
42
+ * unmapped into `option_print.venue` (streamd `internal/tradficontroller/source/databento/option_print.go:135`, the
43
+ * header read at `internal/databento/dbn.go:244`), and no backend repo maps a MIC to its id, so the ids are
44
+ * Databento's own enum: dbn `rust/dbn/src/publishers.rs` @ fc7392bcbb (`OpraPillar<MIC>`, lines 818-852 and 900),
45
+ * equal in databento-cpp `include/databento/publishers.hpp` @ 5305827ee7. A word outside the table refuses by name
46
+ * (`options-flow-venue-unmapped:<VENUE>`), never a guessed id.
47
+ */
48
+ export declare const WRUN_OPTIONS_FLOW_VENUE_PUBLISHER_IDS: Readonly<Record<string, number>>;
49
+ export declare function wrunOptionsFlowVenuePublisherId(venue: string): number | undefined;
50
+ export declare const lane: WrunPollLane;
@@ -0,0 +1,155 @@
1
+ /**
2
+ * The `options_flow` lane (UW-PARITY source S2): one bar's US listed option flow (OPRA) of the chart's underlying, or
3
+ * of a market-wide scope, as 32 scalars per bar: premium in USD, contracts and prints as counts, share delta in
4
+ * shares, vega in USD per IV point (`input("calls", options_flow.net_call_prem, { scope: "market", dte: "0dte" })`).
5
+ *
6
+ * It reads OPTION_PRINT_AGG flow scope rows (wrun-opra-flow.leaf: which rows each knob names) through the
7
+ * `K_OPTION_PRINT_AGG_SCOPE` control and its worker twin, which sums a bucket's matching rows into the 32 fields
8
+ * (`foldWrunOptionsFlowRows`); this lane lands the buckets on the chart's bars under the tier rule (rule 9: 1m kept 7
9
+ * days, 5m kept 30, 1d kept, the finest that fits the bar and still holds it; a stock chart's 09:30 New York bars, an
10
+ * OPRA contract chart's UTC ones), summed per bar. A bar no tier holds any more reads the input's `missing` fill.
11
+ *
12
+ * Knobs (acquisition facets, each validated here before any fetch, refused by name otherwise):
13
+ * - `scope`: `ticker` (the default: COIN rows of the chart's underlying), `market` (MARKET rows of every issue type),
14
+ * `equity`, `etf`, `index` (MARKET rows of that issue type), `venue` (VENUE rows of the `venue` knob's exchange);
15
+ * - `dte`: `all` (the default), `0dte`, `week` (1 to 7 days), `month` (8 to 35), `later`;
16
+ * - `moneyness`: `all` (the default), `otm`, `itm`;
17
+ * - `venue`: scope `venue` only, required there: an exchange's ISO MIC (`XCBO`), read by its Databento publisher id
18
+ * (`WRUN_OPTIONS_FLOW_VENUE_PUBLISHER_IDS`). That scope serves `call_prem_total`, `put_prem_total`,
19
+ * `call_contracts_total`, `put_contracts_total` and `prints` alone, with no `dte` or `moneyness` split.
20
+ *
21
+ * OPRA: `opra`, so the run's wall refuses a package that may not read US options (`opra-official-only:options_flow`),
22
+ * the lane is served only where the chart's options ride the OPRA plane, its asks name the plane and their routed
23
+ * tier, and the overlay's OPRA provenance is stamped before the first ask. `nativeRows` + `barGrid`: served on the
24
+ * index-mode stock chart, asked on the native-rows path, landed on the host grid.
25
+ *
26
+ * Before the protocol package names OPTION_PRINT_AGG, every input refuses by name before any fetch
27
+ * (`protocol-pending:OPTION_PRINT_AGG`). The gateway's scope reads stay behind its `read.option_print_scopes`
28
+ * switch: while it is off, the worker twin answers the refusal by name (`option-scope-reads-off`) and the run
29
+ * degrades the lane once, its chip the record below (wrun-lane-refusal.leaf), never a blank or a retry loop.
30
+ */
31
+ import { refuseWrunPollInput, WRUN_POLL_AUTHOR_GATE_SEED, } from '../wrun-poll-lane.types.js';
32
+ import { WRUN_OPTION_PRINT_AGG_SCOPE_KTYPE, WRUN_OPTION_SCOPE_READS_OFF_CODE, WRUN_OPTIONS_FLOW_DTE, WRUN_OPTIONS_FLOW_FIELDS, WRUN_OPTIONS_FLOW_MONEYNESS, WRUN_OPTIONS_FLOW_SCOPES, WRUN_OPTIONS_FLOW_TYPE, WRUN_OPTIONS_FLOW_VENUE_FIELDS, WRUN_OPTIONS_FLOW_VENUE_RE, } from '../../wrun-opra-flow.leaf.js';
33
+ import { assertWrunProtocolType, wrunProtocolPendingSeed } from '../../wrun-protocol-pending.util.js';
34
+ /** The lane key (the refusal record's feed words, `wrun.refusal.feed.optionsFlow`). */
35
+ export const WRUN_OPTIONS_FLOW_LANE_KEY = 'options_flow';
36
+ const MINUTE = 60_000;
37
+ const DAY = 86_400_000;
38
+ /** The tiers a bar is read from (rule 9, ADDENDUM-2 B3; the VENUE family keeps no 5m tier, so a 5m ask of it the
39
+ * gateway rolls up from its 1m rows, which a bar older than 7 days no longer has: that bar reads its fill). */
40
+ export const WRUN_OPTIONS_FLOW_TIERS = Object.freeze([
41
+ { key: '1m', ms: MINUTE, retentionMs: 7 * DAY },
42
+ { key: '5m', ms: 5 * MINUTE, retentionMs: 30 * DAY },
43
+ { key: '1d', ms: DAY },
44
+ ]);
45
+ /**
46
+ * The Databento publisher id the data plane names each `venue` word by (the VENUE rows' `venue`, the request's
47
+ * `VENUE:<id>`). The words are ISO MIC codes, Databento's OPRA.PILLAR publisher suffixes (`OPRA.PILLAR.XCBO`): the
48
+ * fourteen exchanges om's market-share template reads by name. streamd writes a print's DBN header publisher id
49
+ * unmapped into `option_print.venue` (streamd `internal/tradficontroller/source/databento/option_print.go:135`, the
50
+ * header read at `internal/databento/dbn.go:244`), and no backend repo maps a MIC to its id, so the ids are
51
+ * Databento's own enum: dbn `rust/dbn/src/publishers.rs` @ fc7392bcbb (`OpraPillar<MIC>`, lines 818-852 and 900),
52
+ * equal in databento-cpp `include/databento/publishers.hpp` @ 5305827ee7. A word outside the table refuses by name
53
+ * (`options-flow-venue-unmapped:<VENUE>`), never a guessed id.
54
+ */
55
+ export const WRUN_OPTIONS_FLOW_VENUE_PUBLISHER_IDS = Object.freeze({
56
+ AMXO: 20, // NYSE American Options
57
+ XBOX: 21, // BOX Options
58
+ XCBO: 22, // Cboe Options
59
+ EMLD: 23, // MIAX Emerald
60
+ EDGO: 24, // Cboe EDGX Options
61
+ XISX: 26, // Nasdaq ISE
62
+ MCRY: 27, // Nasdaq MRX
63
+ XMIO: 28, // MIAX Options
64
+ ARCO: 29, // NYSE Arca Options
65
+ XNDQ: 32, // Nasdaq Options
66
+ XPHL: 35, // Nasdaq PHLX
67
+ BATO: 36, // Cboe BZX Options
68
+ MXOP: 37, // MEMX Options
69
+ SPHR: 61, // MIAX Sapphire: its publisher id (Databento's Venue enum numbers it 41; the header carries the publisher)
70
+ });
71
+ export function wrunOptionsFlowVenuePublisherId(venue) {
72
+ return Object.prototype.hasOwnProperty.call(WRUN_OPTIONS_FLOW_VENUE_PUBLISHER_IDS, venue)
73
+ ? WRUN_OPTIONS_FLOW_VENUE_PUBLISHER_IDS[venue]
74
+ : undefined;
75
+ }
76
+ function knobWord(source, ctx, knob, words) {
77
+ const declared = source[knob];
78
+ const value = declared === undefined ? words[0] : declared;
79
+ if (typeof value === 'string' && words.includes(value))
80
+ return value;
81
+ return refuseWrunPollInput(ctx, `declares ${knob} '${String(declared)}': ${knob} is one of ${words.map((word) => `"${word}"`).join(', ')} ` +
82
+ `("${words[0]}" when absent)`, WRUN_POLL_AUTHOR_GATE_SEED);
83
+ }
84
+ /** One input against the chart: its knobs, then the protocol gate; the answer is the acquisition's knobs. */
85
+ async function planWrunOptionsFlow(source, ctx) {
86
+ const scope = knobWord(source, ctx, 'scope', WRUN_OPTIONS_FLOW_SCOPES);
87
+ const dte = knobWord(source, ctx, 'dte', WRUN_OPTIONS_FLOW_DTE);
88
+ const moneyness = knobWord(source, ctx, 'moneyness', WRUN_OPTIONS_FLOW_MONEYNESS);
89
+ let extras;
90
+ if (scope === 'venue') {
91
+ const venue = source.venue;
92
+ if (venue === undefined) {
93
+ return refuseWrunPollInput(ctx, 'declares scope "venue" with no venue: name the exchange whose prints it reads (options-flow-venue-required)', WRUN_POLL_AUTHOR_GATE_SEED);
94
+ }
95
+ if (typeof venue !== 'string' || !WRUN_OPTIONS_FLOW_VENUE_RE.test(venue)) {
96
+ return refuseWrunPollInput(ctx, `declares venue '${String(venue)}': a venue is an exchange id, 2 to 16 upper-case letters, digits or underscores`, WRUN_POLL_AUTHOR_GATE_SEED);
97
+ }
98
+ const field = String(source.field ?? '');
99
+ const served = WRUN_OPTIONS_FLOW_VENUE_FIELDS;
100
+ const split = !served.includes(field)
101
+ ? `field '${field}'`
102
+ : dte !== 'all'
103
+ ? `dte "${dte}"`
104
+ : moneyness !== 'all'
105
+ ? `moneyness "${moneyness}"`
106
+ : undefined;
107
+ if (split !== undefined) {
108
+ return refuseWrunPollInput(ctx, `reads ${split} under scope "venue": the venue rows serve ${served.join(', ')}, with no side, DTE or ` +
109
+ 'moneyness split (options-flow-venue-field)', WRUN_POLL_AUTHOR_GATE_SEED);
110
+ }
111
+ const venueId = wrunOptionsFlowVenuePublisherId(venue);
112
+ if (venueId === undefined) {
113
+ return refuseWrunPollInput(ctx, `declares venue '${venue}': the data plane names a venue by its publisher id, and this version of the app ` +
114
+ `holds none for ${venue} (options-flow-venue-unmapped:${venue})`, wrunProtocolPendingSeed(WRUN_OPTIONS_FLOW_LANE_KEY));
115
+ }
116
+ extras = { scope, venueId, dte, moneyness };
117
+ }
118
+ else {
119
+ if (source.venue !== undefined) {
120
+ return refuseWrunPollInput(ctx, `declares venue '${String(source.venue)}' beside scope "${scope}": a venue names the exchange of scope ` +
121
+ '"venue" only (options-flow-venue-scope)', WRUN_POLL_AUTHOR_GATE_SEED);
122
+ }
123
+ if (scope === 'ticker') {
124
+ const coin = ctx.coin.trim().toUpperCase();
125
+ if (coin === '') {
126
+ return refuseWrunPollInput(ctx, "reads the options flow of the chart's underlying, and this chart names none", {
127
+ cls: 'feed-missing',
128
+ variant: 'market-paused',
129
+ params: { feed: WRUN_OPTIONS_FLOW_LANE_KEY },
130
+ });
131
+ }
132
+ extras = { scope, coin, dte, moneyness };
133
+ }
134
+ else {
135
+ extras = { scope, dte, moneyness };
136
+ }
137
+ }
138
+ await assertWrunProtocolType(ctx, WRUN_OPTIONS_FLOW_TYPE, WRUN_OPTIONS_FLOW_LANE_KEY);
139
+ return extras;
140
+ }
141
+ export const lane = {
142
+ sourceClass: 'options_flow',
143
+ laneKey: WRUN_OPTIONS_FLOW_LANE_KEY,
144
+ kType: WRUN_OPTION_PRINT_AGG_SCOPE_KTYPE,
145
+ fields: Object.freeze(Object.fromEntries(WRUN_OPTIONS_FLOW_FIELDS.map((field, at) => [field, at + 1]))),
146
+ plan: planWrunOptionsFlow,
147
+ join: 'bar',
148
+ label: 'Options flow',
149
+ nativeRows: true,
150
+ barGrid: { landing: 'flow', tiers: WRUN_OPTIONS_FLOW_TIERS },
151
+ opra: true,
152
+ refusedAnswers: {
153
+ [WRUN_OPTION_SCOPE_READS_OFF_CODE]: { cls: 'service-no-answer', variant: 'switched-off' },
154
+ },
155
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * The `options_oi` lane of the browser lane: options open interest of the chart's coin on one
3
+ * venue, puts and calls apart (`input("put_oi", options_oi.puts, { venue: "binance" })`), off
4
+ * the `K_OPTIONS_OPEN_INTEREST` control.
5
+ *
6
+ * What the control serves (`k-options-open-interest.control.ts` and its worker twin): the main
7
+ * thread builds `{ tf, exchanges: [settings.exchange], coin: settings.coin, period, from, ovId }`
8
+ * (the chart's own interval in chart mode), so the lane's extras are `coin` and `exchange`; the
9
+ * worker asks Deribit's OPTION_OPEN_INTEREST_AGG grouped by option type (exchange `DERIBIT`) or
10
+ * Binance's BINANCE_OI_AND_VOLUME_SUM_AGG (exchange `BINANCE_OPTIONS`) and emits
11
+ * `[ts, puts, calls]`, one row per bar both sides reported (a one-sided bar is dropped, so it
12
+ * reads the input's `missing` fill). For any other exchange, and for a coin other than BTC or
13
+ * ETH, the worker ends its stream with no rows and no error: both refusals belong in `plan`, by
14
+ * name, before any fetch, where they read on the legend instead of a bare "data is unavailable".
15
+ *
16
+ * Units are the venue's (Deribit contracts, Binance base coin), documented, never converted.
17
+ */
18
+ import { type WrunPollLane } from '../wrun-poll-lane.types.js';
19
+ /** The `venue` knob's words (the kit's WRUN_OPTIONS_FLOW_VENUES, in its order). The main thread
20
+ * never loads the kit bundle, so the lane hand-copies them; its spec pins the copy. */
21
+ export declare const WRUN_OPTIONS_OI_VENUES: readonly ["deribit", "binance"];
22
+ export type WrunOptionsOiVenue = (typeof WRUN_OPTIONS_OI_VENUES)[number];
23
+ /** An absent knob reads this venue (the kit's rule); the sheet keeps the knob absent. */
24
+ export declare const WRUN_OPTIONS_OI_DEFAULT_VENUE: WrunOptionsOiVenue;
25
+ /** The exchange the control's payload names (`settings.exchange`) for each venue word. */
26
+ export declare const WRUN_OPTIONS_OI_EXCHANGE_OF_VENUE: Readonly<Record<WrunOptionsOiVenue, string>>;
27
+ /** The coins the series exists for: the worker's own gate, spelled as the chart holds the coin. */
28
+ export declare const WRUN_OPTIONS_OI_COINS: readonly string[];
29
+ export declare const lane: WrunPollLane;