@orangecharts/wrun-chart-host 0.2.0 → 0.3.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 (320) hide show
  1. package/README.md +14 -6
  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/venue-presets.constants.d.ts +10 -0
  23. package/dist/constants/venue-presets.constants.js +22 -0
  24. package/dist/enums/chart.enum.d.ts +68 -0
  25. package/dist/enums/chart.enum.js +70 -0
  26. package/dist/helpers/data.helpers.d.ts +2 -0
  27. package/dist/helpers/data.helpers.js +14 -0
  28. package/dist/host-env.d.ts +161 -5
  29. package/dist/host-ports.types.d.ts +446 -0
  30. package/dist/host-ports.types.js +1 -0
  31. package/dist/index.d.ts +128 -0
  32. package/dist/index.js +128 -0
  33. package/dist/indicators/controls/technical-script/technical-script-input-rendering.d.ts +86 -0
  34. package/dist/indicators/controls/technical-script/technical-script-input-rendering.js +179 -0
  35. package/dist/interfaces/asset-venue.interface.d.ts +91 -0
  36. package/dist/interfaces/asset-venue.interface.js +1 -0
  37. package/dist/interfaces/cancel-reason.interface.d.ts +24 -0
  38. package/dist/interfaces/cancel-reason.interface.js +2 -0
  39. package/dist/interfaces/catalog-display.interface.d.ts +3 -0
  40. package/dist/interfaces/catalog-display.interface.js +1 -0
  41. package/dist/interfaces/cme-realtime.interface.d.ts +251 -0
  42. package/dist/interfaces/cme-realtime.interface.js +46 -0
  43. package/dist/interfaces/feed.interface.d.ts +80 -0
  44. package/dist/interfaces/feed.interface.js +7 -0
  45. package/dist/interfaces/market-kind.interface.d.ts +8 -0
  46. package/dist/interfaces/market-kind.interface.js +1 -0
  47. package/dist/interfaces/opra-realtime.interface.d.ts +224 -0
  48. package/dist/interfaces/opra-realtime.interface.js +105 -0
  49. package/dist/interfaces/option-instrument.interface.d.ts +32 -0
  50. package/dist/interfaces/option-instrument.interface.js +1 -0
  51. package/dist/interfaces/options-chain-scope.interface.d.ts +29 -0
  52. package/dist/interfaces/options-chain-scope.interface.js +7 -0
  53. package/dist/interfaces/prediction-market.interface.d.ts +88 -0
  54. package/dist/interfaces/prediction-market.interface.js +8 -0
  55. package/dist/interfaces/wrun-runtime.interface.d.ts +5 -0
  56. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +185 -0
  57. package/dist/kscript-data/controls/live-trades-merge.util.js +357 -0
  58. package/dist/settings-templates/frvp-fields.d.ts +27 -0
  59. package/dist/settings-templates/frvp-fields.js +108 -0
  60. package/dist/settings-templates/index.d.ts +119 -0
  61. package/dist/settings-templates/index.js +442 -0
  62. package/dist/settings-templates/indicator-fields.d.ts +56 -0
  63. package/dist/settings-templates/indicator-fields.js +793 -0
  64. package/dist/settings-templates/tool-rules.d.ts +59 -0
  65. package/dist/settings-templates/tool-rules.js +49 -0
  66. package/dist/settings-templates/tool-tables.generated.d.ts +2 -0
  67. package/dist/settings-templates/tool-tables.generated.js +1668 -0
  68. package/dist/utility/blk-market.util.d.ts +5 -0
  69. package/dist/utility/blk-market.util.js +12 -0
  70. package/dist/utility/chart/chart-load-phase.util.d.ts +32 -0
  71. package/dist/utility/chart/chart-load-phase.util.js +78 -0
  72. package/dist/utility/chart/cme-cache-context.util.d.ts +108 -0
  73. package/dist/utility/chart/cme-cache-context.util.js +166 -0
  74. package/dist/utility/chart/cme-session-bucket.util.d.ts +82 -0
  75. package/dist/utility/chart/cme-session-bucket.util.js +343 -0
  76. package/dist/utility/chart/cme-trade-calendar.util.d.ts +26 -0
  77. package/dist/utility/chart/cme-trade-calendar.util.js +147 -0
  78. package/dist/utility/chart/continuous-contracts.util.d.ts +138 -0
  79. package/dist/utility/chart/continuous-contracts.util.js +374 -0
  80. package/dist/utility/chart/feed-interval.util.d.ts +119 -0
  81. package/dist/utility/chart/feed-interval.util.js +321 -0
  82. package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +110 -0
  83. package/dist/utility/chart/fetch-dedupe-policy.util.js +407 -0
  84. package/dist/utility/chart/footprint-band.util.d.ts +76 -0
  85. package/dist/utility/chart/footprint-band.util.js +205 -0
  86. package/dist/utility/chart/footprint-cell-identity.util.d.ts +82 -0
  87. package/dist/utility/chart/footprint-cell-identity.util.js +346 -0
  88. package/dist/utility/chart/formula-calendar.util.d.ts +27 -0
  89. package/dist/utility/chart/formula-calendar.util.js +59 -0
  90. package/dist/utility/chart/history-wall.util.d.ts +67 -0
  91. package/dist/utility/chart/history-wall.util.js +87 -0
  92. package/dist/utility/chart/index-mode.util.d.ts +66 -0
  93. package/dist/utility/chart/index-mode.util.js +360 -0
  94. package/dist/utility/chart/indicator-coverage-planner.util.d.ts +217 -0
  95. package/dist/utility/chart/indicator-coverage-planner.util.js +443 -0
  96. package/dist/utility/chart/indicator-coverage-state.util.d.ts +33 -0
  97. package/dist/utility/chart/indicator-coverage-state.util.js +110 -0
  98. package/dist/utility/chart/indicator-gap-detector.util.d.ts +127 -0
  99. package/dist/utility/chart/indicator-gap-detector.util.js +260 -0
  100. package/dist/utility/chart/indicator-gap-repair.util.d.ts +88 -0
  101. package/dist/utility/chart/indicator-gap-repair.util.js +177 -0
  102. package/dist/utility/chart/indicator-inflight-registry.util.d.ts +26 -0
  103. package/dist/utility/chart/indicator-inflight-registry.util.js +254 -0
  104. package/dist/utility/chart/interval-registry.util.d.ts +23 -0
  105. package/dist/utility/chart/interval-registry.util.js +83 -0
  106. package/dist/utility/chart/kscript-main-grid-stages.util.d.ts +21 -0
  107. package/dist/utility/chart/kscript-main-grid-stages.util.js +332 -0
  108. package/dist/utility/chart/legacy-exchange.leaf.d.ts +11 -0
  109. package/dist/utility/chart/legacy-exchange.leaf.js +43 -0
  110. package/dist/utility/chart/live-bucket.util.d.ts +66 -0
  111. package/dist/utility/chart/live-bucket.util.js +165 -0
  112. package/dist/utility/chart/market-session-schedule.util.d.ts +91 -0
  113. package/dist/utility/chart/market-session-schedule.util.js +337 -0
  114. package/dist/utility/chart/marketKind.util.d.ts +181 -0
  115. package/dist/utility/chart/marketKind.util.js +371 -0
  116. package/dist/utility/chart/opra-read-access.leaf.d.ts +26 -0
  117. package/dist/utility/chart/opra-read-access.leaf.js +25 -0
  118. package/dist/utility/chart/prediction-identity.util.d.ts +159 -0
  119. package/dist/utility/chart/prediction-identity.util.js +236 -0
  120. package/dist/utility/chart/rth-session.util.d.ts +352 -0
  121. package/dist/utility/chart/rth-session.util.js +926 -0
  122. package/dist/utility/chart/titan-constants.pin.d.ts +43 -0
  123. package/dist/utility/chart/titan-constants.pin.js +50 -0
  124. package/dist/utility/chart/us-equities-session.util.d.ts +127 -0
  125. package/dist/utility/chart/us-equities-session.util.js +251 -0
  126. package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +100 -0
  127. package/dist/utility/chart/wrun-bar-session-facts.util.js +354 -0
  128. package/dist/utility/chart/wrun-wire-ref.util.d.ts +23 -0
  129. package/dist/utility/chart/wrun-wire-ref.util.js +16 -0
  130. package/dist/utility/common/safe-math-eval.d.ts +18 -0
  131. package/dist/utility/common/safe-math-eval.js +160 -0
  132. package/dist/utility/common/time.util.d.ts +134 -0
  133. package/dist/utility/common/time.util.js +428 -0
  134. package/dist/utility/common/transformations.util.d.ts +126 -0
  135. package/dist/utility/common/transformations.util.js +711 -0
  136. package/dist/utility/common/visible-timeout.util.d.ts +17 -0
  137. package/dist/utility/common/visible-timeout.util.js +75 -0
  138. package/dist/utility/exchange-normalization.util.d.ts +8 -0
  139. package/dist/utility/exchange-normalization.util.js +32 -0
  140. package/dist/utility/intl-locale.util.d.ts +2 -0
  141. package/dist/utility/intl-locale.util.js +28 -0
  142. package/dist/utility/number-format.util.d.ts +14 -1
  143. package/dist/utility/number-format.util.js +50 -19
  144. package/dist/utility/options/option-symbol.util.d.ts +28 -0
  145. package/dist/utility/options/option-symbol.util.js +176 -0
  146. package/dist/utility/options/option-trade-units.util.d.ts +190 -0
  147. package/dist/utility/options/option-trade-units.util.js +283 -0
  148. package/dist/utility/options/option-venue.util.d.ts +75 -0
  149. package/dist/utility/options/option-venue.util.js +85 -0
  150. package/dist/utility/pool-symbol.leaf.d.ts +34 -0
  151. package/dist/utility/pool-symbol.leaf.js +95 -0
  152. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +109 -0
  153. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +302 -0
  154. package/dist/utility/symbol-selection/contract-expiry.util.d.ts +39 -0
  155. package/dist/utility/symbol-selection/contract-expiry.util.js +111 -0
  156. package/dist/utility/v2/gate-plane.util.d.ts +58 -0
  157. package/dist/utility/v2/gate-plane.util.js +99 -0
  158. package/dist/utility/v2/gate-session-latch.util.d.ts +22 -0
  159. package/dist/utility/v2/gate-session-latch.util.js +34 -0
  160. package/dist/utility/watchlist/import/tradingview-symbols.leaf.d.ts +76 -0
  161. package/dist/utility/watchlist/import/tradingview-symbols.leaf.js +221 -0
  162. package/dist/utility/wrun/sources/host-grid-landing.d.ts +15 -0
  163. package/dist/utility/wrun/sources/host-grid-landing.js +26 -0
  164. package/dist/utility/wrun/sources/lanes/bitfinex_funding.d.ts +27 -0
  165. package/dist/utility/wrun/sources/lanes/bitfinex_funding.js +85 -0
  166. package/dist/utility/wrun/sources/lanes/economic.d.ts +27 -0
  167. package/dist/utility/wrun/sources/lanes/economic.js +79 -0
  168. package/dist/utility/wrun/sources/lanes/etf_holdings.d.ts +35 -0
  169. package/dist/utility/wrun/sources/lanes/etf_holdings.js +165 -0
  170. package/dist/utility/wrun/sources/lanes/etf_premium.d.ts +19 -0
  171. package/dist/utility/wrun/sources/lanes/etf_premium.js +114 -0
  172. package/dist/utility/wrun/sources/lanes/ethena_positions.d.ts +30 -0
  173. package/dist/utility/wrun/sources/lanes/ethena_positions.js +51 -0
  174. package/dist/utility/wrun/sources/lanes/index.d.ts +2 -0
  175. package/dist/utility/wrun/sources/lanes/index.js +32 -0
  176. package/dist/utility/wrun/sources/lanes/long_short_ratio.d.ts +17 -0
  177. package/dist/utility/wrun/sources/lanes/long_short_ratio.js +47 -0
  178. package/dist/utility/wrun/sources/lanes/option_daily.d.ts +30 -0
  179. package/dist/utility/wrun/sources/lanes/option_daily.js +53 -0
  180. package/dist/utility/wrun/sources/lanes/option_stats_10m.d.ts +23 -0
  181. package/dist/utility/wrun/sources/lanes/option_stats_10m.js +20 -0
  182. package/dist/utility/wrun/sources/lanes/options_flow.d.ts +50 -0
  183. package/dist/utility/wrun/sources/lanes/options_flow.js +155 -0
  184. package/dist/utility/wrun/sources/lanes/options_oi.d.ts +29 -0
  185. package/dist/utility/wrun/sources/lanes/options_oi.js +59 -0
  186. package/dist/utility/wrun/sources/lanes/options_volume.d.ts +38 -0
  187. package/dist/utility/wrun/sources/lanes/options_volume.js +63 -0
  188. package/dist/utility/wrun/sources/lanes/series.d.ts +67 -0
  189. package/dist/utility/wrun/sources/lanes/series.js +321 -0
  190. package/dist/utility/wrun/sources/lanes/token_supply.d.ts +30 -0
  191. package/dist/utility/wrun/sources/lanes/token_supply.js +145 -0
  192. package/dist/utility/wrun/sources/lanes/treasury_balance.d.ts +25 -0
  193. package/dist/utility/wrun/sources/lanes/treasury_balance.js +47 -0
  194. package/dist/utility/wrun/sources/lanes/volatility_index.d.ts +21 -0
  195. package/dist/utility/wrun/sources/lanes/volatility_index.js +11 -0
  196. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +196 -0
  197. package/dist/utility/wrun/sources/opra-option-lanes.util.js +446 -0
  198. package/dist/utility/wrun/sources/registry.d.ts +21 -0
  199. package/dist/utility/wrun/sources/registry.js +207 -0
  200. package/dist/utility/wrun/sources/row-lane-registry.d.ts +28 -0
  201. package/dist/utility/wrun/sources/row-lane-registry.js +230 -0
  202. package/dist/utility/wrun/sources/row-lanes/index.d.ts +2 -0
  203. package/dist/utility/wrun/sources/row-lanes/index.js +12 -0
  204. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.d.ts +2 -0
  205. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +38 -0
  206. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +6 -0
  207. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +70 -0
  208. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +4 -0
  209. package/dist/utility/wrun/sources/row-lanes/option_prints.js +191 -0
  210. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +13 -0
  211. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +137 -0
  212. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +38 -0
  213. package/dist/utility/wrun/sources/row-lanes/option_surface.js +150 -0
  214. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +275 -0
  215. package/dist/utility/wrun/sources/wrun-poll-lane.types.js +26 -0
  216. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +224 -0
  217. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +394 -0
  218. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +283 -0
  219. package/dist/utility/wrun/sources/wrun-row-lane.types.js +16 -0
  220. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +205 -0
  221. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +469 -0
  222. package/dist/utility/wrun/wrun-browser-sources.leaf.d.ts +28 -0
  223. package/dist/utility/wrun/wrun-browser-sources.leaf.js +66 -0
  224. package/dist/utility/wrun/wrun-cloud-record.util.d.ts +65 -0
  225. package/dist/utility/wrun/wrun-cloud-record.util.js +121 -0
  226. package/dist/utility/wrun/wrun-daily-lane.util.d.ts +95 -0
  227. package/dist/utility/wrun/wrun-daily-lane.util.js +297 -0
  228. package/dist/utility/wrun/wrun-deadline.util.d.ts +52 -0
  229. package/dist/utility/wrun/wrun-deadline.util.js +82 -0
  230. package/dist/utility/wrun/wrun-etf-flow-lane.util.d.ts +94 -0
  231. package/dist/utility/wrun/wrun-etf-flow-lane.util.js +224 -0
  232. package/dist/utility/wrun/wrun-etf-funds.util.d.ts +82 -0
  233. package/dist/utility/wrun/wrun-etf-funds.util.js +242 -0
  234. package/dist/utility/wrun/wrun-frames.d.ts +20 -1
  235. package/dist/utility/wrun/wrun-frames.js +103 -49
  236. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  237. package/dist/utility/wrun/wrun-hosted-wire-caps.js +27 -0
  238. package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +22 -0
  239. package/dist/utility/wrun/wrun-lane-refusal.leaf.js +32 -0
  240. package/dist/utility/wrun/wrun-lane-warmup.util.d.ts +18 -0
  241. package/dist/utility/wrun/wrun-lane-warmup.util.js +112 -0
  242. package/dist/utility/wrun/wrun-leg-close.util.d.ts +57 -0
  243. package/dist/utility/wrun/wrun-leg-close.util.js +187 -0
  244. package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +144 -0
  245. package/dist/utility/wrun/wrun-leg-fetch.util.js +212 -0
  246. package/dist/utility/wrun/wrun-leg-stream-classes.d.ts +73 -0
  247. package/dist/utility/wrun/wrun-leg-stream-classes.js +86 -0
  248. package/dist/utility/wrun/wrun-levels-child.util.d.ts +101 -6
  249. package/dist/utility/wrun/wrun-levels-child.util.js +335 -157
  250. package/dist/utility/wrun/wrun-memory-clamp.util.d.ts +33 -0
  251. package/dist/utility/wrun/wrun-memory-clamp.util.js +146 -0
  252. package/dist/utility/wrun/wrun-odds-template-market.util.d.ts +51 -0
  253. package/dist/utility/wrun/wrun-odds-template-market.util.js +251 -0
  254. package/dist/utility/wrun/wrun-opra-flow.leaf.d.ts +65 -0
  255. package/dist/utility/wrun/wrun-opra-flow.leaf.js +94 -0
  256. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +47 -0
  257. package/dist/utility/wrun/wrun-opra-lane.util.js +58 -0
  258. package/dist/utility/wrun/wrun-opra-stats.leaf.d.ts +30 -0
  259. package/dist/utility/wrun/wrun-opra-stats.leaf.js +96 -0
  260. package/dist/utility/wrun/wrun-opra-underlying.util.d.ts +12 -0
  261. package/dist/utility/wrun/wrun-opra-underlying.util.js +1 -0
  262. package/dist/utility/wrun/wrun-option-contract-flow.util.d.ts +142 -0
  263. package/dist/utility/wrun/wrun-option-contract-flow.util.js +451 -0
  264. package/dist/utility/wrun/wrun-option-knobs.util.d.ts +43 -0
  265. package/dist/utility/wrun/wrun-option-knobs.util.js +81 -0
  266. package/dist/utility/wrun/wrun-option-prints.util.d.ts +144 -0
  267. package/dist/utility/wrun/wrun-option-prints.util.js +356 -0
  268. package/dist/utility/wrun/wrun-option-summary-lane.util.d.ts +102 -0
  269. package/dist/utility/wrun/wrun-option-summary-lane.util.js +143 -0
  270. package/dist/utility/wrun/wrun-options-chain.util.d.ts +308 -0
  271. package/dist/utility/wrun/wrun-options-chain.util.js +502 -0
  272. package/dist/utility/wrun/wrun-overlay-identity.util.d.ts +9 -4
  273. package/dist/utility/wrun/wrun-overlay-identity.util.js +16 -6
  274. package/dist/utility/wrun/wrun-param-map.util.d.ts +298 -0
  275. package/dist/utility/wrun/wrun-param-map.util.js +581 -0
  276. package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +149 -0
  277. package/dist/utility/wrun/wrun-pin-spelling.util.js +523 -0
  278. package/dist/utility/wrun/wrun-pin-venues.util.d.ts +116 -0
  279. package/dist/utility/wrun/wrun-pin-venues.util.js +320 -0
  280. package/dist/utility/wrun/wrun-pinned-interval.util.d.ts +20 -0
  281. package/dist/utility/wrun/wrun-pinned-interval.util.js +47 -0
  282. package/dist/utility/wrun/wrun-present-bits.util.d.ts +37 -0
  283. package/dist/utility/wrun/wrun-present-bits.util.js +73 -0
  284. package/dist/utility/wrun/wrun-protocol-pending.util.d.ts +33 -0
  285. package/dist/utility/wrun/wrun-protocol-pending.util.js +57 -0
  286. package/dist/utility/wrun/wrun-refusal.util.d.ts +41 -1
  287. package/dist/utility/wrun/wrun-refusal.util.js +69 -2
  288. package/dist/utility/wrun/wrun-registry-errors.util.d.ts +1 -14
  289. package/dist/utility/wrun/wrun-registry-errors.util.js +0 -16
  290. package/dist/utility/wrun/wrun-row-source.d.ts +158 -0
  291. package/dist/utility/wrun/wrun-row-source.js +75 -0
  292. package/dist/utility/wrun/wrun-run-health.util.d.ts +155 -0
  293. package/dist/utility/wrun/wrun-run-health.util.js +273 -0
  294. package/dist/utility/wrun/wrun-socket-row-source.d.ts +439 -0
  295. package/dist/utility/wrun/wrun-socket-row-source.js +1689 -0
  296. package/dist/utility/wrun/wrun-socket-session-losses.util.d.ts +18 -0
  297. package/dist/utility/wrun/wrun-socket-session-losses.util.js +25 -0
  298. package/dist/utility/wrun/wrun-source-rows.util.d.ts +911 -0
  299. package/dist/utility/wrun/wrun-source-rows.util.js +2597 -0
  300. package/dist/utility/wrun/wrun-tape-source.util.d.ts +82 -0
  301. package/dist/utility/wrun/wrun-tape-source.util.js +151 -0
  302. package/dist/utility/wrun/wrun-tier-grid.util.d.ts +137 -0
  303. package/dist/utility/wrun/wrun-tier-grid.util.js +279 -0
  304. package/dist/utility/wrun/wrun-trades-lane.util.d.ts +52 -0
  305. package/dist/utility/wrun/wrun-trades-lane.util.js +58 -0
  306. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +41 -0
  307. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +66 -0
  308. package/dist/utility/wrun-display-name.util.d.ts +33 -0
  309. package/dist/utility/wrun-display-name.util.js +64 -0
  310. package/dist/workers/constants/kscript-transport-codes.d.ts +15 -0
  311. package/dist/workers/constants/kscript-transport-codes.js +15 -0
  312. package/dist/workers/constants/socket-slots.d.ts +574 -0
  313. package/dist/workers/constants/socket-slots.js +539 -0
  314. package/dist/workers/utils/number.worker.util.d.ts +5 -0
  315. package/dist/workers/utils/number.worker.util.js +10 -0
  316. package/dist/workers/utils/time.worker.util.d.ts +12 -0
  317. package/dist/workers/utils/time.worker.util.js +24 -0
  318. package/dist/workers/utils/volume-profile.worker.util.d.ts +200 -0
  319. package/dist/workers/utils/volume-profile.worker.util.js +631 -0
  320. package/package.json +10 -4
@@ -0,0 +1,100 @@
1
+ import type { OptionSettlementFamily } from '../utility/options/option-symbol.util.js';
2
+ import type { GateProvider } from '../workers/constants/socket-slots.js';
3
+ /**
4
+ * One settlement family a venue lists as its own product. `quoteAsset` names the pair (`BTC/USDC`);
5
+ * omitted, the contract is quoted and settled in the root coin itself and the pair is the root.
6
+ * Trade units are never a family rule: an option's coin size and premium come from the contract's
7
+ * registry multiplier and point value (option-trade-units.util), and the gateway serves `TRADE_AGG`
8
+ * volume already sized in coin (`optionCoinVolume`).
9
+ */
10
+ export interface OptionVenueFamily {
11
+ family: OptionSettlementFamily;
12
+ quoteAsset?: string;
13
+ }
14
+ /** A root served without a catalog read, and the settlement families the venue lists it under. */
15
+ export interface OptionKnownUnderlying {
16
+ root: string;
17
+ families: readonly OptionSettlementFamily[];
18
+ }
19
+ /**
20
+ * One option provider on the options surfaces. `lane` picks the chain transport: CME chains only
21
+ * answer on the governed gate socket, crypto chains answer on the plain v2 socket. `gated` providers
22
+ * stay hidden unless the caller passes the `crypto-options` gate (see `visibleOptionVenues`).
23
+ *
24
+ * `exchanges` are pb-common `Exchange` member names, resolved at runtime so a name the installed
25
+ * build lacks is skipped rather than failing. `underlyingKey` names the catalog field the chain
26
+ * RPCs expect as the underlying (`'base'`, the parsed root, by default). `knownUnderlyings` lists
27
+ * roots served without a catalog read, for venues whose StreamMarkets rows are hidden. `families`
28
+ * lists the settlement families the venue serves; a `knownUnderlyings` root names its own, and a
29
+ * root listed in both is offered once, as the coin-settled product the quote summary prices.
30
+ * `chainWindowSec` is the trailing OPTION_SUMMARY window the chain snapshot reads. It must cover the
31
+ * venue's publish interval: Deribit ticks every 1 to 3 s, the other plain venues every 15 to 60 s
32
+ * (measured 2026-09-29), and the latest-snapshot answer does not grow with the window.
33
+ */
34
+ export interface OptionVenue {
35
+ id: 'cme' | 'opra' | 'deribit' | 'binance-options' | 'okx-options' | 'bybit' | 'bullish' | 'derive';
36
+ labelKey: string;
37
+ exchanges: readonly string[];
38
+ lane: 'governed' | 'plain';
39
+ /** Governed rows name their entitlement-gate plane: the socket slots, served-access rows and delay default they ride. */
40
+ plane?: GateProvider;
41
+ gated: boolean;
42
+ /**
43
+ * Which gate lights a gated row: the crypto providers share `crypto-options` (signed in); OPRA has its
44
+ * own `opra` flag. A gated row without a `gate` is a crypto-options row (the shape before OPRA).
45
+ */
46
+ gate?: 'crypto-options' | 'opra';
47
+ /**
48
+ * Chart exchanges whose symbol is this venue's UNDERLYING (not its contracts): a US stock chart carries
49
+ * US_STOCKS / POLYGON or a listing venue, while its options carry OPRA. CME needs none because futures and
50
+ * their options share exchange codes.
51
+ */
52
+ underlyingExchanges?: readonly string[];
53
+ /**
54
+ * How the Options tab lists roots: `wire` pages the gateway's option directory (CME, crypto); `search`
55
+ * lists roots from the stock search and loads expiries on demand (OPRA: 1.9M contracts, no directory).
56
+ */
57
+ directory?: 'wire' | 'search';
58
+ /** Roots the search cannot list (index options: no underlying series), offered by name with trades and OI only. */
59
+ syntheticRoots?: readonly string[];
60
+ /** Greeks and IV are computed in-house (Black-Scholes, flat rate, no dividends): caption them as estimates. */
61
+ greeksEstimated?: boolean;
62
+ /**
63
+ * The chain stamps each expiry at the contract's true expiry instant (OPRA: 16:00 New York, 09:30 for the
64
+ * AM-settled roots), not a bare UTC-midnight date (CME's registry today). The heatmap's charm and vanna
65
+ * read time to expiry, so they are offered and kept only on a plane whose row says so: set it on a
66
+ * governed row the day its registry stamps instants (planeServesExpiryInstants).
67
+ */
68
+ expiryInstants?: boolean;
69
+ /** Chain fields the venue never serves (OPRA publishes no settlement), folded into the hidden set. */
70
+ unavailableFields?: readonly string[];
71
+ /** The delayed tier's nominal minutes for copy until the gate's tier frame reports the real figure. */
72
+ delayMinutes?: number;
73
+ underlyingKey?: 'base' | 'assetTicker';
74
+ knownUnderlyings?: readonly OptionKnownUnderlying[];
75
+ families?: readonly OptionVenueFamily[];
76
+ chainWindowSec?: number;
77
+ /** The venue streams OPTION_SUMMARY on the live feed, so a chain's underlying follows it between summary polls. */
78
+ liveSummary?: boolean;
79
+ /**
80
+ * The chain page's summary poll for this venue. Omitted polls at `OPTION_CHAIN_SUMMARY_POLL_MS` (3 s, Deribit and
81
+ * CME); the other plain venues publish every 15 to 60 s, so a 3 s poll mostly re-reads the same quotes.
82
+ */
83
+ chainPollMs?: number;
84
+ }
85
+ /**
86
+ * Chart exchange codes a US stock or ETF may carry (the post-flip vendor code, its enum alias and the
87
+ * legacy listing venues the catalog still emits). An OPRA chain attaches to a chart on any of them.
88
+ */
89
+ export declare const OPRA_UNDERLYING_EXCHANGES: readonly string[];
90
+ /**
91
+ * Index option roots on OPRA, listed by name (no underlying series on the chart): the directory, the logo
92
+ * choice and the session table read this list. What their chain carries (an underlying price, open
93
+ * interest, greeks) is read off the summary itself, never off this list.
94
+ */
95
+ export declare const OPRA_INDEX_ROOTS: readonly string[];
96
+ export declare const OPTION_VENUES: readonly OptionVenue[];
97
+ /** The Options tab's Any exchange row: every provider on offer, browsed as one list. */
98
+ export declare const ANY_OPTION_VENUE = "all";
99
+ /** What the Options tab browses: one provider, or every provider at once. */
100
+ export type OptionProviderId = OptionVenue['id'] | typeof ANY_OPTION_VENUE;
@@ -0,0 +1,167 @@
1
+ import { CME_BUNDLE_EXCHANGES } from '../interfaces/cme-realtime.interface.js';
2
+ import { OPRA_DELAY_MINUTES, OPRA_GOVERNED_EXCHANGES } from '../interfaces/opra-realtime.interface.js';
3
+ /**
4
+ * The chain page's poll for the plain venues that publish every 15 to 60 s (see `OptionVenue.chainPollMs`): slow
5
+ * enough not to re-read the same quotes every 3 s, fast enough to add at most 5 s on top of the source's own delay.
6
+ */
7
+ const SLOW_VENUE_CHAIN_POLL_MS = 5_000;
8
+ /**
9
+ * Chart exchange codes a US stock or ETF may carry (the post-flip vendor code, its enum alias and the
10
+ * legacy listing venues the catalog still emits). An OPRA chain attaches to a chart on any of them.
11
+ */
12
+ export const OPRA_UNDERLYING_EXCHANGES = [
13
+ 'US_STOCKS',
14
+ 'POLYGON',
15
+ 'NYSE',
16
+ 'NYSE_AMERICAN',
17
+ 'NYSE_NATIONAL',
18
+ 'NYSE_ARCA',
19
+ 'NYSE_CHICAGO',
20
+ 'NASDAQ',
21
+ 'NASDAQ_BX',
22
+ 'NASDAQ_ISE',
23
+ 'NASDAQ_PHILADELPHIA',
24
+ 'NASDAQ_PSX',
25
+ 'NASDAQ_INT',
26
+ 'CBOE',
27
+ 'CBOE_EDGA',
28
+ 'CBOE_EDGX',
29
+ 'CBOE_BYX',
30
+ 'CBOE_BZX',
31
+ 'IEX',
32
+ 'LTSE',
33
+ 'MIAX_PEARL',
34
+ 'MEMBERS_EXCHANGE',
35
+ ];
36
+ /**
37
+ * Index option roots on OPRA, listed by name (no underlying series on the chart): the directory, the logo
38
+ * choice and the session table read this list. What their chain carries (an underlying price, open
39
+ * interest, greeks) is read off the summary itself, never off this list.
40
+ */
41
+ export const OPRA_INDEX_ROOTS = [
42
+ 'SPX',
43
+ 'SPXW',
44
+ 'XSP',
45
+ 'NDX',
46
+ 'NDXP',
47
+ 'RUT',
48
+ 'RUTW',
49
+ 'VIX',
50
+ 'VIXW',
51
+ 'DJX',
52
+ ];
53
+ // Order is the provider rail order. A backend venue change is one row here.
54
+ export const OPTION_VENUES = [
55
+ {
56
+ id: 'cme',
57
+ labelKey: 'symbolSelection.optionVenues.cme',
58
+ exchanges: CME_BUNDLE_EXCHANGES,
59
+ lane: 'governed',
60
+ plane: 'cme',
61
+ gated: false,
62
+ },
63
+ {
64
+ // US equity and index options: one consolidated venue over the OPRA gate, 15-minute delayed free
65
+ // for registered users. Contracts carry the compact OSI symbol (AAPL261016C00250000); the
66
+ // underlying is the stock's ticker, charted under US_STOCKS / POLYGON or a listing venue.
67
+ id: 'opra',
68
+ labelKey: 'symbolSelection.optionVenues.opra',
69
+ exchanges: OPRA_GOVERNED_EXCHANGES,
70
+ lane: 'governed',
71
+ plane: 'opra',
72
+ gated: true,
73
+ gate: 'opra',
74
+ underlyingKey: 'base',
75
+ underlyingExchanges: OPRA_UNDERLYING_EXCHANGES,
76
+ directory: 'search',
77
+ syntheticRoots: OPRA_INDEX_ROOTS,
78
+ greeksEstimated: true,
79
+ // opraExpiryUnix: the OSI date at its New York close, the instant the gateway lists the expiry under.
80
+ expiryInstants: true,
81
+ unavailableFields: ['settlementPrice', 'settlementDate'],
82
+ delayMinutes: OPRA_DELAY_MINUTES,
83
+ // The delayed tier re-reads the same quotes for 15 minutes; 3 s polls would only burn the reader.
84
+ chainPollMs: 15_000,
85
+ },
86
+ {
87
+ id: 'deribit',
88
+ labelKey: 'symbolSelection.optionVenues.deribit',
89
+ exchanges: ['DERIBIT'],
90
+ lane: 'plain',
91
+ gated: true,
92
+ chainWindowSec: 30,
93
+ // Deribit has no StreamMarkets option rows until tsdb-gateway !2122; its chain RPCs serve these.
94
+ // Measured 2026-09-29: only BTC and ETH list coin-settled contracts beside the USDC ones.
95
+ knownUnderlyings: [
96
+ { root: 'BTC', families: ['inverse', 'linear'] },
97
+ { root: 'ETH', families: ['inverse', 'linear'] },
98
+ { root: 'SOL', families: ['linear'] },
99
+ { root: 'XRP', families: ['linear'] },
100
+ { root: 'HYPE', families: ['linear'] },
101
+ { root: 'AVAX', families: ['linear'] },
102
+ ],
103
+ families: [{ family: 'inverse' }, { family: 'linear', quoteAsset: 'USDC' }],
104
+ liveSummary: true,
105
+ },
106
+ {
107
+ id: 'binance-options',
108
+ labelKey: 'symbolSelection.optionVenues.binance-options',
109
+ exchanges: ['BINANCE_OPTIONS'],
110
+ lane: 'plain',
111
+ gated: true,
112
+ chainWindowSec: 120,
113
+ underlyingKey: 'assetTicker',
114
+ families: [{ family: 'linear', quoteAsset: 'USDT' }],
115
+ liveSummary: true,
116
+ chainPollMs: SLOW_VENUE_CHAIN_POLL_MS,
117
+ },
118
+ {
119
+ id: 'okx-options',
120
+ labelKey: 'symbolSelection.optionVenues.okx-options',
121
+ exchanges: ['OKEX_OPTIONS'],
122
+ lane: 'plain',
123
+ gated: true,
124
+ chainWindowSec: 120,
125
+ families: [
126
+ { family: 'inverse', quoteAsset: 'USD' },
127
+ { family: 'linear', quoteAsset: 'USDT' },
128
+ ],
129
+ liveSummary: true,
130
+ chainPollMs: SLOW_VENUE_CHAIN_POLL_MS,
131
+ },
132
+ {
133
+ id: 'bybit',
134
+ labelKey: 'symbolSelection.optionVenues.bybit',
135
+ exchanges: ['BYBIT'],
136
+ lane: 'plain',
137
+ gated: true,
138
+ chainWindowSec: 120,
139
+ families: [{ family: 'linear', quoteAsset: 'USDT' }],
140
+ liveSummary: true,
141
+ chainPollMs: SLOW_VENUE_CHAIN_POLL_MS,
142
+ },
143
+ {
144
+ id: 'bullish',
145
+ labelKey: 'symbolSelection.optionVenues.bullish',
146
+ exchanges: ['BULLISH'],
147
+ lane: 'plain',
148
+ gated: true,
149
+ chainWindowSec: 120,
150
+ families: [{ family: 'linear', quoteAsset: 'USDC' }],
151
+ liveSummary: true,
152
+ chainPollMs: SLOW_VENUE_CHAIN_POLL_MS,
153
+ },
154
+ {
155
+ id: 'derive',
156
+ labelKey: 'symbolSelection.optionVenues.derive',
157
+ exchanges: ['DERIVE'],
158
+ lane: 'plain',
159
+ gated: true,
160
+ chainWindowSec: 120,
161
+ families: [{ family: 'linear', quoteAsset: 'USDC' }],
162
+ liveSummary: true,
163
+ chainPollMs: SLOW_VENUE_CHAIN_POLL_MS,
164
+ },
165
+ ];
166
+ /** The Options tab's Any exchange row: every provider on offer, browsed as one list. */
167
+ export const ANY_OPTION_VENUE = 'all';
@@ -0,0 +1,53 @@
1
+ export declare const NoExchangeOverlays: string[];
2
+ export declare const FUNDING_INTERVAL_MAP: {
3
+ '1h': number;
4
+ '8h': number;
5
+ '24h': number;
6
+ '1y': number;
7
+ };
8
+ export declare const DEFAULT_4K_MAX_DEPTH = 3500;
9
+ export type OrderbookDepthAccess = 'full' | 'reduced';
10
+ /**
11
+ * Heatmap overlay types whose orderbook depth is tiered by the
12
+ * `fullOrderbookDepth` entitlement (full vs reduced depth tables below).
13
+ * Shared by the entitlement-flip resubscriber and the tier clamp.
14
+ */
15
+ export declare const DEPTH_TIERED_HEATMAP_TYPES: Set<string>;
16
+ export declare const FULL_ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS: {
17
+ '1s': number;
18
+ '1m': number;
19
+ '5m': number;
20
+ '15m': number;
21
+ '30m': number;
22
+ '1h': number;
23
+ '4h': number;
24
+ '1d': number;
25
+ '1w': number;
26
+ default: number;
27
+ };
28
+ export declare const OPTIMAL_HD_DEPTH_LEVELS: {
29
+ '1s': number;
30
+ '1m': number;
31
+ '5m': number;
32
+ '15m': number;
33
+ '30m': number;
34
+ '1h': number;
35
+ '4h': number;
36
+ '1d': number;
37
+ '1w': number;
38
+ default: number;
39
+ };
40
+ export declare const REDUCED_ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS: {
41
+ '1s': number;
42
+ '1m': number;
43
+ '5m': number;
44
+ '15m': number;
45
+ '30m': number;
46
+ '1h': number;
47
+ '4h': number;
48
+ '1d': number;
49
+ '1w': number;
50
+ default: number;
51
+ };
52
+ export declare function getOptimalMaxDepth(interval: string | undefined, resolution?: 'HD' | '4K', access?: OrderbookDepthAccess): number;
53
+ export declare function scaleMaxDepth(baseMaxDepth: number, smallerThanPct?: number): number;
@@ -0,0 +1,80 @@
1
+ import { EChartType } from '../enums/chart.enum.js';
2
+ import { standardIntervalAtOrBelow } from '../utility/chart/interval-registry.util.js';
3
+ export const NoExchangeOverlays = [
4
+ EChartType.MARKETCAP,
5
+ EChartType.MARKETCAP_AGG,
6
+ EChartType.AGGREGATED_DAILY_VOLUME,
7
+ EChartType.AGGREGATED_DAILY_VOLUME_AGG,
8
+ ];
9
+ export const FUNDING_INTERVAL_MAP = {
10
+ '1h': 3600000,
11
+ '8h': 28800000,
12
+ '24h': 86400000,
13
+ '1y': 31536000000,
14
+ };
15
+ export const DEFAULT_4K_MAX_DEPTH = 3500;
16
+ /**
17
+ * Heatmap overlay types whose orderbook depth is tiered by the
18
+ * `fullOrderbookDepth` entitlement (full vs reduced depth tables below).
19
+ * Shared by the entitlement-flip resubscriber and the tier clamp.
20
+ */
21
+ export const DEPTH_TIERED_HEATMAP_TYPES = new Set([
22
+ 'ORDERBOOK_HEATMAP',
23
+ 'AGGREGATED_ORDERBOOK_HEATMAP',
24
+ 'HYPERLIQUID_LIQUIDATION_HEATMAP',
25
+ 'HYPERLIQUID_TPSL_HEATMAP',
26
+ // Orderbook Depth asks for the single heatmap's tier value so both ride
27
+ // one shared ladder (resolveOrderbookDepthLadderMaxDepth); it re-resolves
28
+ // on the same entitlement flip.
29
+ 'ORDERBOOK_DEPTH',
30
+ ]);
31
+ export const FULL_ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS = {
32
+ '1s': 100,
33
+ '1m': 750,
34
+ '5m': 1000,
35
+ '15m': 1500,
36
+ '30m': 1500,
37
+ '1h': 1500,
38
+ '4h': 1500,
39
+ '1d': 1800,
40
+ '1w': 1800,
41
+ default: 1750,
42
+ };
43
+ export const OPTIMAL_HD_DEPTH_LEVELS = FULL_ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS;
44
+ export const REDUCED_ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS = {
45
+ '1s': 100,
46
+ '1m': 250,
47
+ '5m': 500,
48
+ '15m': 500,
49
+ '30m': 500,
50
+ '1h': 500,
51
+ '4h': 500,
52
+ '1d': 750,
53
+ '1w': 750,
54
+ default: 500,
55
+ };
56
+ const ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS = {
57
+ full: FULL_ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS,
58
+ reduced: REDUCED_ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS,
59
+ };
60
+ export function getOptimalMaxDepth(interval, resolution = 'HD', access = 'full') {
61
+ const depthLevels = ORDERBOOK_HEATMAP_HD_DEPTH_LEVELS[access];
62
+ const key = interval === undefined ? undefined : standardIntervalAtOrBelow(interval);
63
+ const hdDepth = depthLevels[key] || depthLevels.default;
64
+ // Full depth doubles the rows at 4K. Reduced (free) depth keeps the HD row
65
+ // count: free 4K loads the same rows as free HD over a narrower price band.
66
+ return resolution === '4K' && access === 'full' ? hdDepth * 2 : hdDepth;
67
+ }
68
+ const DEPTH_TIERS = [100, 250, 500, 750, 1000, 1250, 1500, 1750, 2000, 2500, 3000, 3500];
69
+ function snapToDepthTier(value) {
70
+ for (const tier of DEPTH_TIERS) {
71
+ if (value <= tier)
72
+ return tier;
73
+ }
74
+ return DEFAULT_4K_MAX_DEPTH;
75
+ }
76
+ export function scaleMaxDepth(baseMaxDepth, smallerThanPct) {
77
+ const raw = Math.min(DEFAULT_4K_MAX_DEPTH, Math.round(baseMaxDepth * Math.max(1, (smallerThanPct ?? 5) / 10)));
78
+ const snapped = snapToDepthTier(raw);
79
+ return snapped;
80
+ }
@@ -0,0 +1,15 @@
1
+ /** Tracks per axis. The workspace document stores at most 4x4 tracks. */
2
+ export declare const MAX_PANE_GRID_DIM = 4;
3
+ /** Panes per layout (one pane per cell of a 4x4). */
4
+ export declare const MAX_PANE_GRID_PANES: number;
5
+ /** Discriminator of the geometry object stored in `multiCharts.layout`. Its
6
+ * presence makes a workspace document canonical (see pane-grid.util). */
7
+ export declare const PANE_GRID_LAYOUT_KIND = "pane-grid";
8
+ export declare const PANE_GRID_LAYOUT_VERSION = 1;
9
+ /** Smallest track a splitter drag may leave: the classic 20% for layouts of
10
+ * up to 4 panes, Monitor's 5% for denser grids. */
11
+ export declare const PANE_GRID_MIN_FRACTION_CLASSIC = 0.2;
12
+ export declare const PANE_GRID_MIN_FRACTION_DENSE = 0.05;
13
+ /** Column resolution of the 2x2's per-row dividers (the classic technique:
14
+ * each row places its two panes on a fine shared column grid). */
15
+ export declare const PANE_GRID_FINE_COLUMNS = 1000;
@@ -0,0 +1,17 @@
1
+ // Pane-grid limits and wire constants. Store-free on purpose: the layout model,
2
+ // the budget policy and their node specs import this module directly.
3
+ /** Tracks per axis. The workspace document stores at most 4x4 tracks. */
4
+ export const MAX_PANE_GRID_DIM = 4;
5
+ /** Panes per layout (one pane per cell of a 4x4). */
6
+ export const MAX_PANE_GRID_PANES = MAX_PANE_GRID_DIM * MAX_PANE_GRID_DIM;
7
+ /** Discriminator of the geometry object stored in `multiCharts.layout`. Its
8
+ * presence makes a workspace document canonical (see pane-grid.util). */
9
+ export const PANE_GRID_LAYOUT_KIND = 'pane-grid';
10
+ export const PANE_GRID_LAYOUT_VERSION = 1;
11
+ /** Smallest track a splitter drag may leave: the classic 20% for layouts of
12
+ * up to 4 panes, Monitor's 5% for denser grids. */
13
+ export const PANE_GRID_MIN_FRACTION_CLASSIC = 0.2;
14
+ export const PANE_GRID_MIN_FRACTION_DENSE = 0.05;
15
+ /** Column resolution of the 2x2's per-row dividers (the classic technique:
16
+ * each row places its two panes on a fine shared column grid). */
17
+ export const PANE_GRID_FINE_COLUMNS = 1000;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The two catalog venue groups behind the Spot and Perps presets of the multi-venue indicators, each venue with
3
+ * the quote its catalog pair is synthesized from. ONE source of truth for both readers: the predefined catalog
4
+ * (`store/common.ts` fetchPredefinedSymbolsByCoinAndType) builds its pairs from these maps, and the venue-choice
5
+ * resolver (`venue-legs.util` presetVenues) names their venues, in this order.
6
+ */
7
+ export declare const SPOT_PRESET_VENUE_QUOTES: Readonly<Record<string, string>>;
8
+ export declare const PERP_PRESET_VENUE_QUOTES: Readonly<Record<string, string>>;
9
+ /** The catalog venue groups by preset. */
10
+ export declare const PRESET_VENUE_QUOTES: Readonly<Record<'SPOT' | 'PERP', Readonly<Record<string, string>>>>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The two catalog venue groups behind the Spot and Perps presets of the multi-venue indicators, each venue with
3
+ * the quote its catalog pair is synthesized from. ONE source of truth for both readers: the predefined catalog
4
+ * (`store/common.ts` fetchPredefinedSymbolsByCoinAndType) builds its pairs from these maps, and the venue-choice
5
+ * resolver (`venue-legs.util` presetVenues) names their venues, in this order.
6
+ */
7
+ export const SPOT_PRESET_VENUE_QUOTES = Object.freeze({
8
+ BINANCE: 'USDT',
9
+ COINBASE: '-USD',
10
+ BYBIT_SPOT: 'USDT',
11
+ OKEX: '-USDT',
12
+ BITSTAMP: 'USD',
13
+ });
14
+ export const PERP_PRESET_VENUE_QUOTES = Object.freeze({
15
+ BINANCE_FUTURES: 'USDT',
16
+ BYBIT: 'USDT',
17
+ });
18
+ /** The catalog venue groups by preset. */
19
+ export const PRESET_VENUE_QUOTES = Object.freeze({
20
+ SPOT: SPOT_PRESET_VENUE_QUOTES,
21
+ PERP: PERP_PRESET_VENUE_QUOTES,
22
+ });
@@ -0,0 +1,68 @@
1
+ export declare enum EInterval {
2
+ ONE_SECOND = "1s",
3
+ ONE_MINUTE = "1m",
4
+ FIVE_MINUTES = "5m",
5
+ FIFTEEN_MINUTES = "15m",
6
+ THIRTY_MINUTES = "30m",
7
+ ONE_HOUR = "1h",
8
+ FOUR_HOURS = "4h",
9
+ ONE_DAY = "1d",
10
+ ONE_WEEK = "1w",
11
+ ONE_MONTH = "1M",
12
+ THREE_MONTHS = "3M",
13
+ ONE_YEAR = "1Y"
14
+ }
15
+ export declare enum EChartType {
16
+ OHLCV = "TRADE_AGG",
17
+ TICKER = "TICKER_AGG",
18
+ SWAP = "SWAP",
19
+ OI = "OPEN_INTEREST_AGG",
20
+ FUNDING = "FUNDING_RATE_AGG",
21
+ LIQ = "LIQUIDATION_AGG",
22
+ PREDICTED_FUNDING = "PREDICTED_FUNDING_AGG",
23
+ LONG_SHORT_RATIO = "LONG_SHORT_RATIO_AGG",
24
+ LONG_SHORT_RATIO_POSITION = "LONG_SHORT_RATIO_POSITION",
25
+ VOLUME_RATIO = "VOLUME_RATIO",
26
+ SPOT_MARGIN_SIZE = "SPOT_MARGIN_SIZE",
27
+ SPOT_MARGIN_RATE = "SPOT_MARGIN_RATE",
28
+ SPOT_MARGIN_RATE_AGG = "SPOT_MARGIN_RATE_AGG",
29
+ BINANCE_SPOT_MARGIN_RATE_AGG = "BINANCE_SPOT_MARGIN_RATE_AGG",
30
+ CORRELATION_BETA = "CORRELATION_BETA",
31
+ DELTA_FUNDING_OI = "DELTA_FUNDING_OI",
32
+ DEFI_OPTIONS_VAULT = "DEFI_OPTIONS_VAULT",
33
+ DEFI_OPTIONS_VAULT_AGG = "DEFI_OPTIONS_VAULT_AGG",
34
+ DEFI_OPTIONS_VAULT_OPEN_INTEREST = "DEFI_OPTIONS_VAULT_OPEN_INTEREST",
35
+ DEFI_OPTIONS_VAULT_OPEN_INTEREST_AGG = "DEFI_OPTIONS_VAULT_OPEN_INTEREST_AGG",
36
+ BUY_SELL_VOLUME_RATIO = "BUY_SELL_VOLUME_RATIO",
37
+ AGGREGATED_DAILY_VOLUME = "AGGREGATED_DAILY_VOLUME",
38
+ AGGREGATED_DAILY_VOLUME_AGG = "AGGREGATED_DAILY_VOLUME_AGG",
39
+ AGGREGATED_OPEN_INTEREST = "AGGREGATED_OPEN_INTEREST",
40
+ AGGREGATED_OPEN_INTEREST_AGG = "AGGREGATED_OPEN_INTEREST_AGG",
41
+ MARKETCAP = "MARKETCAP",
42
+ MARKETCAP_AGG = "MARKETCAP_AGG",
43
+ TURNOVER_RATIO = "TURNOVER_RATIO",
44
+ DOV_STRIKE_PRICE_GRADIENT = "DOV_STRIKE_PRICE_GRADIENT",
45
+ GROUPED_TRADE_VOLUME_AGG = "GROUPED_TRADE_VOLUME_AGG",
46
+ GROUPED_OPEN_INTEREST_AGG = "GROUPED_OPEN_INTEREST_AGG",
47
+ OPTIONS_HEATMAP = "OPTIONS_HEATMAP",
48
+ OPTIONS_GEX = "OPTIONS_GEX",
49
+ OPTIONS_FLOW = "OPTIONS_FLOW",
50
+ OPTIONS_DASHBOARD = "OPTIONS_DASHBOARD",
51
+ OPTIONS_GEX_CURVE = "OPTIONS_GEX_CURVE",
52
+ OPTIONS_IV_SMILE = "OPTIONS_IV_SMILE",
53
+ OPTIONS_TERM_STRUCTURE = "OPTIONS_TERM_STRUCTURE",
54
+ OPTIONS_SURFACE = "OPTIONS_SURFACE",
55
+ OPTIONS_IMPLIED_MOVE = "OPTIONS_IMPLIED_MOVE",
56
+ OPTIONS_VOL_MATRIX = "OPTIONS_VOL_MATRIX",
57
+ OPTIONS_FLOW_EXPIRY = "OPTIONS_FLOW_EXPIRY",
58
+ OPTIONS_FLOW_PULSE = "OPTIONS_FLOW_PULSE",
59
+ ORDERBOOK_HEATMAP = "ORDERBOOK_HEATMAP",
60
+ AGGREGATED_ORDERBOOK_HEATMAP = "AGGREGATED_ORDERBOOK_HEATMAP",
61
+ OPTION_OPEN_INTEREST_AGG = "OPTION_OPEN_INTEREST_AGG",
62
+ TWAP_RATE = "TWAP_RATE",
63
+ TWAP_RATE_AGG = "TWAP_RATE_AGG",
64
+ TWAP_RATE_DASHBOARD = "TWAP_RATE_DASHBOARD",
65
+ OPTION_SUMMARY = "OPTION_SUMMARY",
66
+ ORDERBOOK = "BLOCK_BOOK_SNAPSHOT",
67
+ FRED_OBSERVATION = "FRED_OBSERVATION"
68
+ }
@@ -0,0 +1,70 @@
1
+ export var EInterval;
2
+ (function (EInterval) {
3
+ EInterval["ONE_SECOND"] = "1s";
4
+ EInterval["ONE_MINUTE"] = "1m";
5
+ EInterval["FIVE_MINUTES"] = "5m";
6
+ EInterval["FIFTEEN_MINUTES"] = "15m";
7
+ EInterval["THIRTY_MINUTES"] = "30m";
8
+ EInterval["ONE_HOUR"] = "1h";
9
+ EInterval["FOUR_HOURS"] = "4h";
10
+ EInterval["ONE_DAY"] = "1d";
11
+ EInterval["ONE_WEEK"] = "1w";
12
+ EInterval["ONE_MONTH"] = "1M";
13
+ EInterval["THREE_MONTHS"] = "3M";
14
+ EInterval["ONE_YEAR"] = "1Y";
15
+ })(EInterval || (EInterval = {}));
16
+ export var EChartType;
17
+ (function (EChartType) {
18
+ EChartType["OHLCV"] = "TRADE_AGG";
19
+ EChartType["TICKER"] = "TICKER_AGG";
20
+ EChartType["SWAP"] = "SWAP";
21
+ EChartType["OI"] = "OPEN_INTEREST_AGG";
22
+ EChartType["FUNDING"] = "FUNDING_RATE_AGG";
23
+ EChartType["LIQ"] = "LIQUIDATION_AGG";
24
+ EChartType["PREDICTED_FUNDING"] = "PREDICTED_FUNDING_AGG";
25
+ EChartType["LONG_SHORT_RATIO"] = "LONG_SHORT_RATIO_AGG";
26
+ EChartType["LONG_SHORT_RATIO_POSITION"] = "LONG_SHORT_RATIO_POSITION";
27
+ EChartType["VOLUME_RATIO"] = "VOLUME_RATIO";
28
+ EChartType["SPOT_MARGIN_SIZE"] = "SPOT_MARGIN_SIZE";
29
+ EChartType["SPOT_MARGIN_RATE"] = "SPOT_MARGIN_RATE";
30
+ EChartType["SPOT_MARGIN_RATE_AGG"] = "SPOT_MARGIN_RATE_AGG";
31
+ EChartType["BINANCE_SPOT_MARGIN_RATE_AGG"] = "BINANCE_SPOT_MARGIN_RATE_AGG";
32
+ EChartType["CORRELATION_BETA"] = "CORRELATION_BETA";
33
+ EChartType["DELTA_FUNDING_OI"] = "DELTA_FUNDING_OI";
34
+ EChartType["DEFI_OPTIONS_VAULT"] = "DEFI_OPTIONS_VAULT";
35
+ EChartType["DEFI_OPTIONS_VAULT_AGG"] = "DEFI_OPTIONS_VAULT_AGG";
36
+ EChartType["DEFI_OPTIONS_VAULT_OPEN_INTEREST"] = "DEFI_OPTIONS_VAULT_OPEN_INTEREST";
37
+ EChartType["DEFI_OPTIONS_VAULT_OPEN_INTEREST_AGG"] = "DEFI_OPTIONS_VAULT_OPEN_INTEREST_AGG";
38
+ EChartType["BUY_SELL_VOLUME_RATIO"] = "BUY_SELL_VOLUME_RATIO";
39
+ EChartType["AGGREGATED_DAILY_VOLUME"] = "AGGREGATED_DAILY_VOLUME";
40
+ EChartType["AGGREGATED_DAILY_VOLUME_AGG"] = "AGGREGATED_DAILY_VOLUME_AGG";
41
+ EChartType["AGGREGATED_OPEN_INTEREST"] = "AGGREGATED_OPEN_INTEREST";
42
+ EChartType["AGGREGATED_OPEN_INTEREST_AGG"] = "AGGREGATED_OPEN_INTEREST_AGG";
43
+ EChartType["MARKETCAP"] = "MARKETCAP";
44
+ EChartType["MARKETCAP_AGG"] = "MARKETCAP_AGG";
45
+ EChartType["TURNOVER_RATIO"] = "TURNOVER_RATIO";
46
+ EChartType["DOV_STRIKE_PRICE_GRADIENT"] = "DOV_STRIKE_PRICE_GRADIENT";
47
+ EChartType["GROUPED_TRADE_VOLUME_AGG"] = "GROUPED_TRADE_VOLUME_AGG";
48
+ EChartType["GROUPED_OPEN_INTEREST_AGG"] = "GROUPED_OPEN_INTEREST_AGG";
49
+ EChartType["OPTIONS_HEATMAP"] = "OPTIONS_HEATMAP";
50
+ EChartType["OPTIONS_GEX"] = "OPTIONS_GEX";
51
+ EChartType["OPTIONS_FLOW"] = "OPTIONS_FLOW";
52
+ EChartType["OPTIONS_DASHBOARD"] = "OPTIONS_DASHBOARD";
53
+ EChartType["OPTIONS_GEX_CURVE"] = "OPTIONS_GEX_CURVE";
54
+ EChartType["OPTIONS_IV_SMILE"] = "OPTIONS_IV_SMILE";
55
+ EChartType["OPTIONS_TERM_STRUCTURE"] = "OPTIONS_TERM_STRUCTURE";
56
+ EChartType["OPTIONS_SURFACE"] = "OPTIONS_SURFACE";
57
+ EChartType["OPTIONS_IMPLIED_MOVE"] = "OPTIONS_IMPLIED_MOVE";
58
+ EChartType["OPTIONS_VOL_MATRIX"] = "OPTIONS_VOL_MATRIX";
59
+ EChartType["OPTIONS_FLOW_EXPIRY"] = "OPTIONS_FLOW_EXPIRY";
60
+ EChartType["OPTIONS_FLOW_PULSE"] = "OPTIONS_FLOW_PULSE";
61
+ EChartType["ORDERBOOK_HEATMAP"] = "ORDERBOOK_HEATMAP";
62
+ EChartType["AGGREGATED_ORDERBOOK_HEATMAP"] = "AGGREGATED_ORDERBOOK_HEATMAP";
63
+ EChartType["OPTION_OPEN_INTEREST_AGG"] = "OPTION_OPEN_INTEREST_AGG";
64
+ EChartType["TWAP_RATE"] = "TWAP_RATE";
65
+ EChartType["TWAP_RATE_AGG"] = "TWAP_RATE_AGG";
66
+ EChartType["TWAP_RATE_DASHBOARD"] = "TWAP_RATE_DASHBOARD";
67
+ EChartType["OPTION_SUMMARY"] = "OPTION_SUMMARY";
68
+ EChartType["ORDERBOOK"] = "BLOCK_BOOK_SNAPSHOT";
69
+ EChartType["FRED_OBSERVATION"] = "FRED_OBSERVATION";
70
+ })(EChartType || (EChartType = {}));
@@ -0,0 +1,2 @@
1
+ export declare const divideValues: (first: number, second: number) => number;
2
+ export declare const getExchangeFromSymbol: (uiExchange: string, symbol: string, ovType?: string) => string;
@@ -0,0 +1,14 @@
1
+ import { NoExchangeOverlays } from '../constants/overlay-data.constants.js';
2
+ export const divideValues = (first, second) => !first || !second ? null : first / second;
3
+ // uiExchange is the exchange displayed in the UI for a symbol. BINANCE_FUTURES also displays BINANCE_DELIVERY symbols.
4
+ export const getExchangeFromSymbol = (uiExchange, symbol, ovType) => {
5
+ if (symbol && uiExchange === 'BINANCE_FUTURES' && symbol.includes('USD_'))
6
+ return 'BINANCE_DELIVERY';
7
+ if (ovType) {
8
+ if (ovType === 'AGGREGATED_DAILY_VOLUME')
9
+ return '*';
10
+ if (NoExchangeOverlays.includes(ovType))
11
+ return '*';
12
+ }
13
+ return uiExchange;
14
+ };