@orangecharts/wrun-chart-host 0.8.0 β†’ 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +3 -1
  2. package/dist/constants/feature-flags.constants.d.ts +9 -0
  3. package/dist/constants/feature-flags.constants.js +86 -16
  4. package/dist/constants/marketCapabilities.constants.d.ts +14 -9
  5. package/dist/constants/marketCapabilities.constants.js +36 -13
  6. package/dist/constants/opra-compliance.constants.d.ts +15 -0
  7. package/dist/constants/opra-compliance.constants.js +15 -0
  8. package/dist/constants/option-venues.constants.d.ts +11 -6
  9. package/dist/constants/option-venues.constants.js +5 -2
  10. package/dist/constants/scriptEditor/builtin-script-snippets.d.ts +26 -0
  11. package/dist/constants/scriptEditor/builtin-script-snippets.js +6 -0
  12. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.d.ts +15 -0
  13. package/dist/constants/scriptEditor/technicalIndicatorScriptKeys.constants.js +17 -0
  14. package/dist/constants/venue-presets.constants.d.ts +20 -20
  15. package/dist/constants/venue-presets.constants.js +24 -26
  16. package/dist/host-env.d.ts +39 -9
  17. package/dist/host-env.js +6 -0
  18. package/dist/host-ports.types.d.ts +108 -18
  19. package/dist/index.d.ts +14 -0
  20. package/dist/index.js +14 -0
  21. package/dist/interfaces/kscript-diagnostics.interface.d.ts +6 -0
  22. package/dist/interfaces/opra-realtime.interface.d.ts +13 -11
  23. package/dist/interfaces/opra-realtime.interface.js +10 -10
  24. package/dist/interfaces/replay.interface.d.ts +8 -0
  25. package/dist/interfaces/wrun-runtime.interface.d.ts +52 -15
  26. package/dist/kscript-data/controls/live-trades-merge.util.d.ts +94 -14
  27. package/dist/kscript-data/controls/live-trades-merge.util.js +132 -22
  28. package/dist/kscript-data/controls/live-trades-order-gate.util.d.ts +56 -0
  29. package/dist/kscript-data/controls/live-trades-order-gate.util.js +107 -0
  30. package/dist/market-data/billing.interface.d.ts +227 -42
  31. package/dist/market-data/billing.interface.js +60 -12
  32. package/dist/market-data/venue.d.ts +88 -6
  33. package/dist/market-data/venues/cme.contract.copy.json +66 -0
  34. package/dist/market-data/venues/cme.d.ts +126 -0
  35. package/dist/market-data/venues/cme.js +133 -0
  36. package/dist/market-data/venues/index.d.ts +165 -8
  37. package/dist/market-data/venues/index.js +48 -6
  38. package/dist/market-data/venues/opra.contract.copy.json +5 -3
  39. package/dist/market-data/venues/opra.d.ts +3 -3
  40. package/dist/market-data/venues/opra.js +5 -4
  41. package/dist/replay/replayLadder.js +3 -1
  42. package/dist/settings-templates/index.js +7 -3
  43. package/dist/settings-templates/indicator-fields.d.ts +5 -4
  44. package/dist/settings-templates/indicator-fields.js +45 -6
  45. package/dist/settings-templates/tool-rules.d.ts +27 -17
  46. package/dist/settings-templates/tool-rules.js +27 -11
  47. package/dist/settings-templates/tool-tables.generated.js +91 -31
  48. package/dist/utility/chart/book-live-bucket.util.d.ts +15 -0
  49. package/dist/utility/chart/book-live-bucket.util.js +47 -0
  50. package/dist/utility/chart/crypto-index.leaf.d.ts +2 -2
  51. package/dist/utility/chart/crypto-index.leaf.js +2 -2
  52. package/dist/utility/chart/index-mode-admission.util.js +24 -3
  53. package/dist/utility/chart/index-mode.util.d.ts +5 -2
  54. package/dist/utility/chart/index-mode.util.js +23 -13
  55. package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +35 -11
  56. package/dist/utility/chart/kscript-drawing-safe-area.util.js +145 -35
  57. package/dist/utility/chart/kscript-live-coalesce.util.d.ts +7 -2
  58. package/dist/utility/chart/kscript-live-coalesce.util.js +9 -3
  59. package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
  60. package/dist/utility/chart/kscript-standin-identity.leaf.d.ts +3 -1
  61. package/dist/utility/chart/kscript-titancharts-render-keys.constants.d.ts +32 -2
  62. package/dist/utility/chart/kscript-titancharts-render-keys.constants.js +45 -0
  63. package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -27
  64. package/dist/utility/chart/kscript-venue-policy.util.js +74 -32
  65. package/dist/utility/chart/market-session-schedule.util.d.ts +10 -0
  66. package/dist/utility/chart/market-session-schedule.util.js +16 -0
  67. package/dist/utility/chart/marketKind.util.d.ts +12 -10
  68. package/dist/utility/chart/marketKind.util.js +17 -7
  69. package/dist/utility/chart/om-panel-push-style.util.d.ts +7 -7
  70. package/dist/utility/chart/om-panel-push-style.util.js +17 -15
  71. package/dist/utility/chart/om-panel.util.js +6 -6
  72. package/dist/utility/chart/opra-read-access.leaf.d.ts +5 -3
  73. package/dist/utility/chart/opra-read-access.leaf.js +5 -3
  74. package/dist/utility/chart/profile-block-size.util.d.ts +16 -0
  75. package/dist/utility/chart/profile-block-size.util.js +7 -0
  76. package/dist/utility/chart/quote-perp.leaf.d.ts +17 -0
  77. package/dist/utility/chart/quote-perp.leaf.js +20 -0
  78. package/dist/utility/chart/rth-session.util.d.ts +3 -2
  79. package/dist/utility/chart/rth-session.util.js +2 -1
  80. package/dist/utility/chart/window-geometry.leaf.d.ts +8 -0
  81. package/dist/utility/chart/window-geometry.leaf.js +22 -6
  82. package/dist/utility/chart/wrun-run-result.util.d.ts +17 -0
  83. package/dist/utility/chart/wrun-run-result.util.js +145 -7
  84. package/dist/utility/common/transformations.util.d.ts +7 -0
  85. package/dist/utility/common/transformations.util.js +11 -0
  86. package/dist/utility/options/option-bar-anchor.util.d.ts +145 -0
  87. package/dist/utility/options/option-bar-anchor.util.js +340 -0
  88. package/dist/utility/options/option-venue.util.d.ts +21 -3
  89. package/dist/utility/options/option-venue.util.js +30 -3
  90. package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
  91. package/dist/utility/wrun/derived-roots.util.d.ts +213 -0
  92. package/dist/utility/wrun/derived-roots.util.js +471 -0
  93. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.d.ts +41 -6
  94. package/dist/utility/wrun/run-schedule/wrun-chart-gate-reader.util.js +89 -19
  95. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.d.ts +9 -4
  96. package/dist/utility/wrun/run-schedule/wrun-gate-reader-warm.util.js +47 -6
  97. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +5 -3
  98. package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +6 -4
  99. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.d.ts +2 -2
  100. package/dist/utility/wrun/run-schedule/wrun-prefix-feeds.util.js +5 -1
  101. package/dist/utility/wrun/sources/lanes/option_daily.js +5 -2
  102. package/dist/utility/wrun/sources/lanes/options_flow.js +5 -2
  103. package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +64 -19
  104. package/dist/utility/wrun/sources/opra-option-lanes.util.js +105 -35
  105. package/dist/utility/wrun/sources/row-lane-registry.js +3 -2
  106. package/dist/utility/wrun/sources/row-lanes/option_contract_flow.js +2 -1
  107. package/dist/utility/wrun/sources/row-lanes/option_contract_state.d.ts +9 -3
  108. package/dist/utility/wrun/sources/row-lanes/option_contract_state.js +15 -6
  109. package/dist/utility/wrun/sources/row-lanes/option_prints.d.ts +14 -0
  110. package/dist/utility/wrun/sources/row-lanes/option_prints.js +82 -13
  111. package/dist/utility/wrun/sources/row-lanes/option_strike_flow.js +17 -4
  112. package/dist/utility/wrun/sources/row-lanes/option_strikes.d.ts +55 -8
  113. package/dist/utility/wrun/sources/row-lanes/option_strikes.js +95 -14
  114. package/dist/utility/wrun/sources/row-lanes/option_surface.d.ts +5 -2
  115. package/dist/utility/wrun/sources/row-lanes/option_surface.js +7 -3
  116. package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -0
  117. package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +35 -14
  118. package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +70 -20
  119. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.d.ts +64 -0
  120. package/dist/utility/wrun/sources/wrun-row-lane-add-memo.util.js +89 -0
  121. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.d.ts +45 -1
  122. package/dist/utility/wrun/sources/wrun-row-lane-first-paint.util.js +114 -6
  123. package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +56 -5
  124. package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +224 -26
  125. package/dist/utility/wrun/sources/wrun-row-lanes.util.js +822 -58
  126. package/dist/utility/wrun/wrun-batched-marks.util.d.ts +16 -3
  127. package/dist/utility/wrun/wrun-batched-marks.util.js +30 -19
  128. package/dist/utility/wrun/wrun-batched-readout.util.d.ts +37 -9
  129. package/dist/utility/wrun/wrun-batched-readout.util.js +61 -15
  130. package/dist/utility/wrun/wrun-builtin-twin.util.d.ts +12 -0
  131. package/dist/utility/wrun/wrun-builtin-twin.util.js +21 -0
  132. package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -0
  133. package/dist/utility/wrun/wrun-cell-capacity.leaf.d.ts +66 -0
  134. package/dist/utility/wrun/wrun-cell-capacity.leaf.js +86 -0
  135. package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +192 -13
  136. package/dist/utility/wrun/wrun-chart-market-facts.util.js +437 -55
  137. package/dist/utility/wrun/wrun-color-facts.util.d.ts +19 -9
  138. package/dist/utility/wrun/wrun-color-facts.util.js +24 -14
  139. package/dist/utility/wrun/wrun-color-settings.util.d.ts +15 -4
  140. package/dist/utility/wrun/wrun-color-settings.util.js +31 -12
  141. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.d.ts +17 -0
  142. package/dist/utility/wrun/wrun-dollar-unit-port.leaf.js +9 -0
  143. package/dist/utility/wrun/wrun-download-meter.util.d.ts +107 -0
  144. package/dist/utility/wrun/wrun-download-meter.util.js +134 -0
  145. package/dist/utility/wrun/wrun-download-plan.util.d.ts +99 -0
  146. package/dist/utility/wrun/wrun-download-plan.util.js +118 -0
  147. package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +11 -3
  148. package/dist/utility/wrun/wrun-draft-legend-note.util.js +26 -4
  149. package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +6 -1
  150. package/dist/utility/wrun/wrun-draft-overlay.util.js +23 -3
  151. package/dist/utility/wrun/wrun-frames.d.ts +27 -6
  152. package/dist/utility/wrun/wrun-frames.js +78 -15
  153. package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +2 -2
  154. package/dist/utility/wrun/wrun-hosted-wire-caps.js +7 -0
  155. package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +7 -1
  156. package/dist/utility/wrun/wrun-hosted-wire.util.js +12 -2
  157. package/dist/utility/wrun/wrun-hud-looks.util.d.ts +51 -21
  158. package/dist/utility/wrun/wrun-hud-looks.util.js +74 -28
  159. package/dist/utility/wrun/wrun-latest-snapshot.d.ts +11 -0
  160. package/dist/utility/wrun/wrun-lifecycle-runtime.util.d.ts +8 -6
  161. package/dist/utility/wrun/wrun-lifecycle-runtime.util.js +8 -6
  162. package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -2
  163. package/dist/utility/wrun/wrun-live-intake.util.d.ts +19 -9
  164. package/dist/utility/wrun/wrun-live-intake.util.js +213 -45
  165. package/dist/utility/wrun/wrun-live-tick.util.d.ts +4 -0
  166. package/dist/utility/wrun/wrun-live-tick.util.js +246 -49
  167. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.d.ts +53 -0
  168. package/dist/utility/wrun/wrun-market-size-contract-carry.leaf.js +162 -0
  169. package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +205 -48
  170. package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +277 -34
  171. package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +51 -7
  172. package/dist/utility/wrun/wrun-market-size-defaults.util.js +340 -56
  173. package/dist/utility/wrun/wrun-opra-lane.util.d.ts +17 -4
  174. package/dist/utility/wrun/wrun-opra-lane.util.js +6 -4
  175. package/dist/utility/wrun/wrun-option-prints.util.d.ts +41 -2
  176. package/dist/utility/wrun/wrun-option-prints.util.js +80 -13
  177. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.d.ts +31 -0
  178. package/dist/utility/wrun/wrun-option-strike-flow-forecast.util.js +119 -0
  179. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.d.ts +26 -6
  180. package/dist/utility/wrun/wrun-option-strike-flow-lane.util.js +50 -11
  181. package/dist/utility/wrun/wrun-option-strike-flow.util.d.ts +109 -19
  182. package/dist/utility/wrun/wrun-option-strike-flow.util.js +222 -61
  183. package/dist/utility/wrun/wrun-option-views.util.d.ts +96 -18
  184. package/dist/utility/wrun/wrun-option-views.util.js +246 -51
  185. package/dist/utility/wrun/wrun-options-stop.util.d.ts +2 -1
  186. package/dist/utility/wrun/wrun-options-stop.util.js +3 -2
  187. package/dist/utility/wrun/wrun-output-style.util.d.ts +6 -2
  188. package/dist/utility/wrun/wrun-output-style.util.js +20 -2
  189. package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +20 -0
  190. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.d.ts +31 -14
  191. package/dist/utility/wrun/wrun-overlay-lifecycle.lazy.js +22 -0
  192. package/dist/utility/wrun/wrun-overlay-lifecycle.util.d.ts +10 -1
  193. package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +52 -4
  194. package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +7 -0
  195. package/dist/utility/wrun/wrun-overlay-recovery.util.js +25 -1
  196. package/dist/utility/wrun/wrun-overlay-result.util.d.ts +7 -1
  197. package/dist/utility/wrun/wrun-overlay-result.util.js +2 -0
  198. package/dist/utility/wrun/wrun-overlay-run.util.d.ts +134 -37
  199. package/dist/utility/wrun/wrun-overlay-run.util.js +1118 -254
  200. package/dist/utility/wrun/wrun-pack-widths.leaf.d.ts +4 -4
  201. package/dist/utility/wrun/wrun-pack-widths.leaf.js +4 -4
  202. package/dist/utility/wrun/wrun-pack.util.d.ts +7 -3
  203. package/dist/utility/wrun/wrun-pack.util.js +20 -9
  204. package/dist/utility/wrun/wrun-pane-format.util.d.ts +2 -1
  205. package/dist/utility/wrun/wrun-pane-format.util.js +7 -3
  206. package/dist/utility/wrun/wrun-panel-mount.util.d.ts +9 -0
  207. package/dist/utility/wrun/wrun-panel-mount.util.js +63 -13
  208. package/dist/utility/wrun/wrun-panel-style.util.d.ts +37 -24
  209. package/dist/utility/wrun/wrun-panel-style.util.js +100 -29
  210. package/dist/utility/wrun/wrun-param-map.util.d.ts +15 -11
  211. package/dist/utility/wrun/wrun-param-map.util.js +13 -5
  212. package/dist/utility/wrun/wrun-param-values.util.d.ts +21 -3
  213. package/dist/utility/wrun/wrun-param-values.util.js +6 -0
  214. package/dist/utility/wrun/wrun-pin-spelling.util.js +12 -11
  215. package/dist/utility/wrun/wrun-prefix-lanes.util.js +2 -2
  216. package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +50 -0
  217. package/dist/utility/wrun/wrun-refusal-surface.util.js +68 -0
  218. package/dist/utility/wrun/wrun-refusal.util.js +10 -1
  219. package/dist/utility/wrun/wrun-refused-latest.util.d.ts +10 -0
  220. package/dist/utility/wrun/wrun-refused-latest.util.js +12 -0
  221. package/dist/utility/wrun/wrun-row-source.d.ts +11 -0
  222. package/dist/utility/wrun/wrun-run-interval.util.d.ts +4 -2
  223. package/dist/utility/wrun/wrun-run-interval.util.js +9 -6
  224. package/dist/utility/wrun/wrun-script-inputs.util.d.ts +52 -1
  225. package/dist/utility/wrun/wrun-script-inputs.util.js +112 -4
  226. package/dist/utility/wrun/wrun-setting-words.util.d.ts +7 -3
  227. package/dist/utility/wrun/wrun-setting-words.util.js +13 -5
  228. package/dist/utility/wrun/wrun-socket-row-source.d.ts +27 -2
  229. package/dist/utility/wrun/wrun-socket-row-source.js +113 -8
  230. package/dist/utility/wrun/wrun-source-rows.util.d.ts +9 -1
  231. package/dist/utility/wrun/wrun-source-rows.util.js +108 -43
  232. package/dist/utility/wrun/wrun-style-words.util.js +6 -4
  233. package/dist/utility/wrun/wrun-table-chrome.util.d.ts +3 -2
  234. package/dist/utility/wrun/wrun-table-chrome.util.js +19 -11
  235. package/dist/utility/wrun/wrun-tape-per-order.util.d.ts +2 -0
  236. package/dist/utility/wrun/wrun-tape-per-order.util.js +26 -0
  237. package/dist/utility/wrun/wrun-tape-source.util.d.ts +126 -50
  238. package/dist/utility/wrun/wrun-tape-source.util.js +193 -68
  239. package/dist/utility/wrun/wrun-volume-profile-lane.util.d.ts +7 -5
  240. package/dist/utility/wrun/wrun-volume-profile-lane.util.js +8 -6
  241. package/dist/utils/replay/replay-buffer-math.d.ts +53 -2
  242. package/dist/utils/replay/replay-buffer-math.js +227 -20
  243. package/dist/workers/utils/volume-profile.worker.util.d.ts +4 -1
  244. package/dist/workers/utils/volume-profile.worker.util.js +5 -2
  245. package/dist/workers/wrun/wrun-abi-host.js +3 -2
  246. package/package.json +5 -5
@@ -15,6 +15,10 @@
15
15
  * What stays per-venue CODE, never a field here: the questionnaire's wording (a content module keyed by venue,
16
16
  * src/components/dialogs/market-data/questionnaires/), the agreement text and the legal disclosure strings (OPRA's
17
17
  * delay notice lives once, in src/constants/opra-compliance.constants.ts). Worker-safe: types and data only.
18
+ *
19
+ * Every field a second policy needed (CME: several products, professionals sold, attest first, plan changes, the data
20
+ * terms as a registration, the two-way declaration, the addendum and the postal address) is optional, and absent means
21
+ * the behaviour the OPRA card always had: a card that names none of them is served exactly as before.
18
22
  */
19
23
  import type { FeatureFlagKey } from '../constants/feature-flags.constants.js';
20
24
  /** The two declarations a subscriber can make; each product names which of them may hold it. */
@@ -27,13 +31,23 @@ export type MarketDataIdentityField = 'legalName' | 'employer' | 'occupation' |
27
31
  export interface MarketDataProduct {
28
32
  /** The catalog name: the Stripe line item a checkout sells and a payment return names (`opra_rt_1m`). */
29
33
  readonly name: string;
34
+ /**
35
+ * The product's wire key on a venue that sells several (CME: `l1`, `depth`, `depth_pro`): what a checkout and a plan
36
+ * change name and what a subscription answers it holds (`level` on the wire). Absent on a one-product venue (OPRA),
37
+ * whose checkout names no product.
38
+ */
39
+ readonly key?: string;
30
40
  /** The gate plan the product grants (`p1`). */
31
41
  readonly plan: string;
42
+ /** Orders the venue's products: a change to a higher level is an upgrade, to a lower one a downgrade. */
43
+ readonly level?: number;
32
44
  /** The declarations that may hold it. */
33
45
  readonly classifications: readonly MarketDataClassification[];
34
46
  readonly interval: MarketDataBillingInterval;
35
47
  /** The catalog price, display only: once a subscription exists, the server's price is authoritative. */
36
48
  readonly priceUsd: number;
49
+ /** The product's own plan card on a venue that sells several (absent: the venue's `planCard`). */
50
+ readonly planCard?: MarketDataPlanCard;
37
51
  }
38
52
  /** One qualification question: a stable machine id (the record's key, never translated text), its qualifying answer. */
39
53
  export interface MarketDataQuestion {
@@ -60,6 +74,33 @@ export interface MarketDataQuestionnaire {
60
74
  readonly validityDays: number;
61
75
  /** How long before the expiry the management page asks for the renewal. */
62
76
  readonly renewalWindowDays: number;
77
+ /**
78
+ * The form versions a record may carry and still read as this form (absent: `formVersion` only). CME accepts its
79
+ * live records: `v1`, and '' for a release that stored no version.
80
+ */
81
+ readonly acceptedFormVersions?: readonly string[];
82
+ /**
83
+ * How the form asks the questions (absent: 'rows'). 'rows': each question, or group, with its own Yes/No (OPRA).
84
+ * 'two-way': one explicit choice between non-professional and professional, recorded as every question answered
85
+ * with its qualifying answer or every one against it; the conditions are reference text (CME's live form).
86
+ */
87
+ readonly presentation?: 'rows' | 'two-way';
88
+ /**
89
+ * A subscriber addendum the declaration accepts, for either classification: the answer id it is recorded under
90
+ * (always true: the form cannot submit without it) and its version (the server records the version).
91
+ */
92
+ readonly addendum?: {
93
+ readonly id: string;
94
+ readonly version: string;
95
+ };
96
+ /**
97
+ * The address asked as postal fields (street, optional second line, city, optional region, postal code) and recorded
98
+ * under `answerId` inside the answers, beside the one-line `address` and the ISO `country` the identity carries
99
+ * (absent: the one-line address only, OPRA).
100
+ */
101
+ readonly postalAddress?: {
102
+ readonly answerId: string;
103
+ };
63
104
  }
64
105
  /** The venue's subscriber agreement: an explicit, versioned acceptance, never inferred from a grant or a payment. */
65
106
  export interface MarketDataAgreementPolicy {
@@ -69,6 +110,13 @@ export interface MarketDataAgreementPolicy {
69
110
  readonly url: string;
70
111
  /** Whether delayed display needs the acceptance too (false: the agreement binds real time only). */
71
112
  readonly delayedRequiresAcceptance: boolean;
113
+ /**
114
+ * How an acceptance is recorded (absent: 'assent'). 'assent': the agreement step's explicit, hashed assent (K2), a
115
+ * purchase step (OPRA). 'registration': the venue's data terms, served by `GET <basePath>/agreement` and recorded as
116
+ * the account's registration (`POST <basePath>/data-terms` naming the version); the venue's own delayed-data wall
117
+ * accepts them, so they are never a purchase step (CME: the data-terms wall, `delayedRequiresAcceptance`).
118
+ */
119
+ readonly recordedAs?: 'assent' | 'registration';
72
120
  }
73
121
  /** The product terms the plan card shows as written (never translated, like the CME bundle names). */
74
122
  export interface MarketDataPlanCard {
@@ -76,6 +124,10 @@ export interface MarketDataPlanCard {
76
124
  readonly level: string;
77
125
  readonly market: string;
78
126
  readonly region: string;
127
+ /** Every market a bundle covers, one chip each (absent: the one `market`). */
128
+ readonly markets?: readonly string[];
129
+ /** The copy path of the card's one-line description under the venue's namespace (absent: the venue's plan line). */
130
+ readonly descPath?: string;
79
131
  }
80
132
  /**
81
133
  * The surfaces that carry a venue's delay disclosure wherever its delayed data shows (docs/features/search/
@@ -90,17 +142,44 @@ export interface MarketDataVenue {
90
142
  readonly productGroups: readonly string[];
91
143
  /** The venue's API base path (`/opra`; a new venue mounts at `/market-data/<venue>`). */
92
144
  readonly basePath: string;
93
- /** What the venue sells; the purchase flow sells the first (one plan). */
145
+ /**
146
+ * What the venue sells. One product: the purchase flow sells it (OPRA). Several: the plan picker offers the ones the
147
+ * account's classification may hold, in level order, and a checkout names the one picked (`key`).
148
+ */
94
149
  readonly products: readonly MarketDataProduct[];
95
150
  readonly planCard: MarketDataPlanCard;
96
151
  /** The prefix of every Stripe line item of the venue: a return carrying it is the venue's, valid or malformed. */
97
152
  readonly paymentItemPrefix: string;
98
- /** 'refuse': a professional declaration is recorded and ends the purchase in "not available", never a re-price. */
153
+ /**
154
+ * 'refuse': a professional declaration is recorded and ends the purchase in "not available", never a re-price.
155
+ * 'sell': a professional buys the products its classification may hold, at their price (CME: depth_pro).
156
+ */
99
157
  readonly professionalPolicy: 'refuse' | 'sell';
100
- /** 'refuse': no role is consulted, an internal account buys like any other and the server's refusal stands. */
101
- readonly internalRolePolicy: 'refuse' | 'dev';
102
- /** The checkout needs neither the declaration nor the agreement: they bind real-time access, not the payment. */
158
+ /**
159
+ * No role is consulted either way, an internal account buys like any other. 'refuse': the server's refusal stands.
160
+ * 'report': the server records an internal account's grant as staff (`dev: true`) and the gate reports it (CME).
161
+ */
162
+ readonly internalRolePolicy: 'refuse' | 'report';
163
+ /**
164
+ * true: the checkout needs neither the declaration nor the agreement, they bind real-time access, not the payment
165
+ * (OPRA). false: the declaration comes first and the price follows the classification it makes (attest first, CME).
166
+ */
103
167
  readonly payFirst: boolean;
168
+ /**
169
+ * A subscriber changes plan in place (absent: one plan, no change): `POST <basePath>/subscription/change-plan` and
170
+ * `POST <basePath>/subscription/restore` (a pending downgrade or a period-end cancel cleared). The two rules the
171
+ * page's change notes state: a downgrade waits for the period end (`downgradeAtPeriodEnd`), an upgrade applies now
172
+ * and is prorated (`prorateUpgrades`).
173
+ */
174
+ readonly planChanges?: {
175
+ readonly downgradeAtPeriodEnd: boolean;
176
+ readonly prorateUpgrades: boolean;
177
+ };
178
+ /**
179
+ * true: a declaration that changes the classification of a subscriber is answered with the product the new
180
+ * classification may hold (`offer`, plan 12.6 A11), which the plan page preselects. Absent: the venue offers none.
181
+ */
182
+ readonly offers?: boolean;
104
183
  readonly questionnaire: MarketDataQuestionnaire;
105
184
  readonly agreement: MarketDataAgreementPolicy;
106
185
  /** The delayed tier's nominal delay (the gate's delayed window). */
@@ -109,7 +188,10 @@ export interface MarketDataVenue {
109
188
  readonly disclosure: {
110
189
  readonly kind: 'translated' | 'verbatim';
111
190
  };
112
- /** The frontend flag the venue's doors ride (a no-op while it is dark); null for none. */
191
+ /**
192
+ * The frontend flag the venue's doors ride (a no-op while it is dark); null for none. A card the registry carries dark
193
+ * (`FLAG_GATED_MARKET_DATA_VENUES`) is listed by the registry only while this flag reads on.
194
+ */
113
195
  readonly flagKey: FeatureFlagKey | null;
114
196
  /** The locale namespace every string of the venue lives under (OPRA keeps `opraRealtimeData`). */
115
197
  readonly i18nNamespace: string;
@@ -0,0 +1,66 @@
1
+ {
2
+ "revision": "2026-10-23.1",
3
+ "key": "cme",
4
+ "productGroups": ["CME", "CBOT", "NYMEX", "COMEX"],
5
+ "products": [
6
+ {
7
+ "name": "cme_bundle_l1_1m",
8
+ "plan": "p1",
9
+ "classifications": ["non_professional"],
10
+ "interval": "1m",
11
+ "id": "l1",
12
+ "level": 1
13
+ },
14
+ {
15
+ "name": "cme_bundle_depth_1m",
16
+ "plan": "p2",
17
+ "classifications": ["non_professional"],
18
+ "interval": "1m",
19
+ "id": "depth",
20
+ "level": 2
21
+ },
22
+ {
23
+ "name": "cme_bundle_depth_pro_1m",
24
+ "plan": "p2",
25
+ "classifications": ["professional"],
26
+ "interval": "1m",
27
+ "id": "depth_pro",
28
+ "level": 3
29
+ }
30
+ ],
31
+ "formVersion": "v1",
32
+ "questions": [
33
+ { "id": "individual_own_account", "qualifying": true },
34
+ { "id": "personal_non_business_use", "qualifying": true },
35
+ { "id": "not_registered_or_qualified", "qualifying": true },
36
+ { "id": "not_advisor_or_asset_manager", "qualifying": true },
37
+ { "id": "no_redistribution_or_business_application", "qualifying": true }
38
+ ],
39
+ "identityFields": [
40
+ "legalName",
41
+ "employer",
42
+ "occupation",
43
+ "country",
44
+ "address"
45
+ ],
46
+ "identityLimits": { "text": 200, "address": 300 },
47
+ "agreement": {
48
+ "recordedAs": "registration",
49
+ "version": "cme-data-terms-v1",
50
+ "url": "/api/v1/market-data/cme/agreement"
51
+ },
52
+ "delaySeconds": 600,
53
+ "basePath": "/market-data/cme",
54
+ "acceptedFormVersions": ["v1", ""],
55
+ "presentation": "two-way",
56
+ "addendum": {
57
+ "id": "ila_subscriber_addendum_2026_06_accepted",
58
+ "version": "v1"
59
+ },
60
+ "postalAddressAnswer": "postal_address",
61
+ "professionalPolicy": { "kind": "sellable", "products": ["depth_pro"] },
62
+ "internalPolicy": "report",
63
+ "checkoutOrder": "attest-first",
64
+ "planChanges": { "downgradeAtPeriodEnd": true, "prorateUpgrades": true },
65
+ "offers": true
66
+ }
@@ -0,0 +1,126 @@
1
+ export declare const CME_VENUE: {
2
+ readonly key: "cme";
3
+ readonly displayName: "CME Group";
4
+ readonly productGroups: readonly ["CME", "CBOT", "NYMEX", "COMEX"];
5
+ readonly basePath: "/market-data/cme";
6
+ readonly products: readonly [{
7
+ readonly name: "cme_bundle_l1_1m";
8
+ readonly key: "l1";
9
+ readonly plan: "p1";
10
+ readonly level: 1;
11
+ readonly classifications: readonly ["non_professional"];
12
+ readonly interval: "1m";
13
+ readonly priceUsd: 7;
14
+ readonly planCard: {
15
+ readonly name: "Real-time L1";
16
+ readonly level: "LEVEL 1";
17
+ readonly market: "CME";
18
+ readonly markets: readonly ["CME", "CBOT", "COMEX", "NYMEX"];
19
+ readonly region: "πŸ‡ΊπŸ‡Έ USA";
20
+ readonly descPath: "subscription.l1Desc";
21
+ };
22
+ }, {
23
+ readonly name: "cme_bundle_depth_1m";
24
+ readonly key: "depth";
25
+ readonly plan: "p2";
26
+ readonly level: 2;
27
+ readonly classifications: readonly ["non_professional"];
28
+ readonly interval: "1m";
29
+ readonly priceUsd: 45;
30
+ readonly planCard: {
31
+ readonly name: "Real-time depth";
32
+ readonly level: "LEVEL 2";
33
+ readonly market: "CME";
34
+ readonly markets: readonly ["CME", "CBOT", "COMEX", "NYMEX"];
35
+ readonly region: "πŸ‡ΊπŸ‡Έ USA";
36
+ readonly descPath: "subscription.depthDesc";
37
+ };
38
+ }, {
39
+ readonly name: "cme_bundle_depth_pro_1m";
40
+ readonly key: "depth_pro";
41
+ readonly plan: "p2";
42
+ readonly level: 3;
43
+ readonly classifications: readonly ["professional"];
44
+ readonly interval: "1m";
45
+ readonly priceUsd: 538;
46
+ readonly planCard: {
47
+ readonly name: "Real-time depth";
48
+ readonly level: "LEVEL 2";
49
+ readonly market: "CME";
50
+ readonly markets: readonly ["CME", "CBOT", "COMEX", "NYMEX"];
51
+ readonly region: "πŸ‡ΊπŸ‡Έ USA";
52
+ readonly descPath: "subscription.depthDesc";
53
+ };
54
+ }];
55
+ readonly planCard: {
56
+ readonly name: "Real-time L1";
57
+ readonly level: "LEVEL 1";
58
+ readonly market: "CME";
59
+ readonly markets: readonly ["CME", "CBOT", "COMEX", "NYMEX"];
60
+ readonly region: "πŸ‡ΊπŸ‡Έ USA";
61
+ readonly descPath: "subscription.l1Desc";
62
+ };
63
+ readonly paymentItemPrefix: "cme_";
64
+ readonly professionalPolicy: "sell";
65
+ readonly internalRolePolicy: "report";
66
+ readonly payFirst: false;
67
+ readonly planChanges: {
68
+ readonly downgradeAtPeriodEnd: true;
69
+ readonly prorateUpgrades: true;
70
+ };
71
+ readonly offers: true;
72
+ readonly questionnaire: {
73
+ readonly formVersion: "v1";
74
+ readonly acceptedFormVersions: readonly ["v1", ""];
75
+ readonly presentation: "two-way";
76
+ readonly questions: readonly [{
77
+ readonly id: "individual_own_account";
78
+ readonly qualifying: true;
79
+ }, {
80
+ readonly id: "personal_non_business_use";
81
+ readonly qualifying: true;
82
+ }, {
83
+ readonly id: "not_registered_or_qualified";
84
+ readonly qualifying: true;
85
+ }, {
86
+ readonly id: "not_advisor_or_asset_manager";
87
+ readonly qualifying: true;
88
+ }, {
89
+ readonly id: "no_redistribution_or_business_application";
90
+ readonly qualifying: true;
91
+ }];
92
+ readonly groups: readonly [];
93
+ readonly addendum: {
94
+ readonly id: "ila_subscriber_addendum_2026_06_accepted";
95
+ readonly version: "v1";
96
+ };
97
+ readonly postalAddress: {
98
+ readonly answerId: "postal_address";
99
+ };
100
+ readonly identityFields: readonly ["legalName", "employer", "occupation", "country", "address"];
101
+ readonly identityLimits: {
102
+ readonly legalName: 200;
103
+ readonly employer: 200;
104
+ readonly occupation: 200;
105
+ readonly country: 2;
106
+ readonly address: 300;
107
+ };
108
+ readonly validityDays: 365;
109
+ readonly renewalWindowDays: 30;
110
+ };
111
+ readonly agreement: {
112
+ readonly recordedAs: "registration";
113
+ readonly version: "cme-data-terms-v1";
114
+ readonly url: "/api/v1/market-data/cme/agreement";
115
+ readonly delayedRequiresAcceptance: true;
116
+ };
117
+ readonly delayMinutes: 10;
118
+ readonly disclosure: {
119
+ readonly kind: "translated";
120
+ };
121
+ readonly flagKey: "cme-engine";
122
+ readonly i18nNamespace: "cmeRealtimeData";
123
+ readonly storeId: "cmeMarketData";
124
+ readonly surfaces: readonly ["contract-chart-delay-chip", "contract-chart-delay-card", "chart-source-line", "watchlist-panel", "watchlist-cell-tooltip", "purchase-live-price"];
125
+ readonly contractRevision: "2026-10-23.1";
126
+ };
@@ -0,0 +1,133 @@
1
+ /**
2
+ * CME Group's venue card (the four DCMs CME, CBOT, NYMEX and COMEX as one bundle): the frontend descriptor of the CME
3
+ * deal on the venue-generic market-data plane (docs/features/market-data/plane.md, "CME on the plane"; plan 12.1 and
4
+ * 12.2 KB1). Carried DARK: the registry lists it only while the `cme-engine` flag reads on
5
+ * (`FLAG_GATED_MARKET_DATA_VENUES`, `marketDataVenueIsServed`), so with the flag off every CME surface keeps the legacy
6
+ * flow on `/cme/*` and nothing here is read. Pinned against the backend's contract export (`cme.contract.copy.json`
7
+ * beside this file, a copy of orange's cme.contract.json) and the gate's release mirror (`gate-mirror.copy.yaml` beside
8
+ * the spec) by tests/packages/wrun-chart-host/market-data/venues/cme.contract.spec.ts.
9
+ *
10
+ * Three products in level order (l1 then depth for non-professionals, depth_pro for professionals only), each its own
11
+ * Stripe line and plan card; professionals are sold (at the depth_pro price), the declaration comes first (attest
12
+ * first: the price follows the classification), plans change in place, the data terms are the registration the
13
+ * delayed-data wall records (never a purchase step), and the declaration is today's two-way choice recording the five
14
+ * live condition ids, the ILA Subscriber Addendum and the postal address. The ids and the addendum are the live form's
15
+ * (src/constants/cme-realtime.constants.ts: CME_NON_PROFESSIONAL_CONDITION_IDS, CME_ILA_ADDENDUM_ANSWER_ID,
16
+ * CME_POSTAL_ADDRESS_ANSWER_ID), so a record made here reads like one made by the legacy form.
17
+ */
18
+ import { FeatureFlag } from '../../constants/feature-flags.constants.js';
19
+ /** Every DCM the bundle covers, in the order the CME surfaces list them. */
20
+ const CME_BUNDLE_MARKETS = ['CME', 'CBOT', 'COMEX', 'NYMEX'];
21
+ const L1_CARD = {
22
+ name: 'Real-time L1',
23
+ level: 'LEVEL 1',
24
+ market: 'CME',
25
+ markets: CME_BUNDLE_MARKETS,
26
+ region: 'πŸ‡ΊπŸ‡Έ USA',
27
+ descPath: 'subscription.l1Desc',
28
+ };
29
+ const DEPTH_CARD = {
30
+ name: 'Real-time depth',
31
+ level: 'LEVEL 2',
32
+ market: 'CME',
33
+ markets: CME_BUNDLE_MARKETS,
34
+ region: 'πŸ‡ΊπŸ‡Έ USA',
35
+ descPath: 'subscription.depthDesc',
36
+ };
37
+ export const CME_VENUE = {
38
+ key: 'cme',
39
+ displayName: 'CME Group',
40
+ // The gate release's product groups (venue mirror `cme.product_groups`).
41
+ productGroups: ['CME', 'CBOT', 'NYMEX', 'COMEX'],
42
+ basePath: '/market-data/cme',
43
+ // Monthly only (plan section 8: no annual pricing); an annual subscriber of the legacy lane keeps its own interval,
44
+ // which the subscription answers. Display prices: the server subscription price is authoritative once one exists.
45
+ // These are the ONE copy of the CME prices (src/constants/cme-realtime.constants.ts reads them), checked against the
46
+ // live Stripe prices on 2026-10-23: unit_amount 700, 4500 and 53800 ("L2 Depth, pro").
47
+ products: [
48
+ {
49
+ name: 'cme_bundle_l1_1m',
50
+ key: 'l1',
51
+ plan: 'p1',
52
+ level: 1,
53
+ classifications: ['non_professional'],
54
+ interval: '1m',
55
+ priceUsd: 7,
56
+ planCard: L1_CARD,
57
+ },
58
+ {
59
+ name: 'cme_bundle_depth_1m',
60
+ key: 'depth',
61
+ plan: 'p2',
62
+ level: 2,
63
+ classifications: ['non_professional'],
64
+ interval: '1m',
65
+ priceUsd: 45,
66
+ planCard: DEPTH_CARD,
67
+ },
68
+ {
69
+ name: 'cme_bundle_depth_pro_1m',
70
+ key: 'depth_pro',
71
+ plan: 'p2',
72
+ level: 3,
73
+ classifications: ['professional'],
74
+ interval: '1m',
75
+ priceUsd: 538,
76
+ planCard: DEPTH_CARD,
77
+ },
78
+ ],
79
+ planCard: L1_CARD,
80
+ paymentItemPrefix: 'cme_',
81
+ professionalPolicy: 'sell',
82
+ internalRolePolicy: 'report',
83
+ payFirst: false,
84
+ planChanges: { downgradeAtPeriodEnd: true, prorateUpgrades: true },
85
+ offers: true,
86
+ questionnaire: {
87
+ // The server's stored form (plan 12.1 D8): the five live ids under `v1`, and '' for a record a release stored with
88
+ // no version. A new question set is a new version, asked again at renewal, never a demotion.
89
+ formVersion: 'v1',
90
+ acceptedFormVersions: ['v1', ''],
91
+ presentation: 'two-way',
92
+ questions: [
93
+ { id: 'individual_own_account', qualifying: true },
94
+ { id: 'personal_non_business_use', qualifying: true },
95
+ { id: 'not_registered_or_qualified', qualifying: true },
96
+ { id: 'not_advisor_or_asset_manager', qualifying: true },
97
+ { id: 'no_redistribution_or_business_application', qualifying: true },
98
+ ],
99
+ groups: [],
100
+ addendum: { id: 'ila_subscriber_addendum_2026_06_accepted', version: 'v1' },
101
+ postalAddress: { answerId: 'postal_address' },
102
+ identityFields: ['legalName', 'employer', 'occupation', 'country', 'address'],
103
+ identityLimits: { legalName: 200, employer: 200, occupation: 200, country: 2, address: 300 },
104
+ validityDays: 365,
105
+ renewalWindowDays: 30,
106
+ },
107
+ // The data terms (plan 12.1 D7): served by `GET /market-data/cme/agreement` with this version and recorded as the
108
+ // registration by the CME data-terms wall; they gate delayed display too, so they are the wall's, never a step.
109
+ agreement: {
110
+ recordedAs: 'registration',
111
+ version: 'cme-data-terms-v1',
112
+ url: '/api/v1/market-data/cme/agreement',
113
+ delayedRequiresAcceptance: true,
114
+ },
115
+ // The gate's delayed window (600 s).
116
+ delayMinutes: 10,
117
+ // CME's delay line is translated copy ("{mins} min delay"), never a verbatim phrase.
118
+ disclosure: { kind: 'translated' },
119
+ flagKey: FeatureFlag.CmeEngine,
120
+ // The CME strings stay where they are (no namespace move): the generic flow reads `cmeRealtimeData.*`.
121
+ i18nNamespace: 'cmeRealtimeData',
122
+ // Never `cmeRealtime`: that id is the served-access store's, which stays.
123
+ storeId: 'cmeMarketData',
124
+ surfaces: [
125
+ 'contract-chart-delay-chip',
126
+ 'contract-chart-delay-card',
127
+ 'chart-source-line',
128
+ 'watchlist-panel',
129
+ 'watchlist-cell-tooltip',
130
+ 'purchase-live-price',
131
+ ],
132
+ contractRevision: '2026-10-23.1',
133
+ };