@orangecharts/wrun-chart-host 0.15.0 → 0.17.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.
- package/README.md +2 -0
- package/dist/constants/economic.constants.d.ts +2 -0
- package/dist/constants/economic.constants.js +2 -0
- package/dist/constants/feature-flags.constants.d.ts +13 -5
- package/dist/constants/feature-flags.constants.js +76 -35
- package/dist/constants/feature-limits.constants.d.ts +72 -4
- package/dist/constants/feature-limits.constants.js +104 -24
- package/dist/constants/interval.constants.js +5 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.d.ts +12 -0
- package/dist/constants/kscript-data-interval-restrictions.constants.js +14 -0
- package/dist/constants/marketCapabilities.constants.d.ts +9 -0
- package/dist/constants/marketCapabilities.constants.js +39 -11
- package/dist/constants/typed-indicator-source.leaf.d.ts +7 -0
- package/dist/constants/typed-indicator-source.leaf.js +47 -0
- package/dist/constants/typed-session-history-venue.leaf.d.ts +7 -0
- package/dist/constants/typed-session-history-venue.leaf.js +9 -0
- package/dist/constants/typed-width-fold.leaf.d.ts +52 -0
- package/dist/constants/typed-width-fold.leaf.js +101 -0
- package/dist/constants/typed-width-source.leaf.d.ts +24 -0
- package/dist/constants/typed-width-source.leaf.js +126 -0
- package/dist/constants/typed-width.leaf.d.ts +57 -0
- package/dist/constants/typed-width.leaf.js +78 -0
- package/dist/host-env.d.ts +10 -0
- package/dist/host-env.js +7 -0
- package/dist/host-ports.types.d.ts +23 -17
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +35 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +66 -3
- package/dist/interfaces/wrun-runtime.interface.js +11 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +13 -0
- package/dist/kscript-data/controls/live-trades-merge.util.js +16 -1
- package/dist/market-data/billing.interface.d.ts +12 -45
- package/dist/market-data/billing.interface.js +2 -2
- package/dist/replay/replayLadder.js +7 -4
- package/dist/settings-templates/footprint-rows.d.ts +6 -0
- package/dist/settings-templates/footprint-rows.js +6 -0
- package/dist/settings-templates/frvp-fields.js +14 -0
- package/dist/settings-templates/indicator-fields.js +36 -0
- package/dist/settings-templates/tool-tables.generated.js +19 -1
- package/dist/utility/chart/__fixtures__/live-bucket-regular-golden.json +1706 -0
- package/dist/utility/chart/cache-alignment.util.d.ts +42 -0
- package/dist/utility/chart/cache-alignment.util.js +88 -18
- package/dist/utility/chart/calendar-interval.util.d.ts +83 -1
- package/dist/utility/chart/calendar-interval.util.js +152 -4
- package/dist/utility/chart/candle-bar-end.util.d.ts +11 -4
- package/dist/utility/chart/candle-bar-end.util.js +17 -6
- package/dist/utility/chart/chart-time-domain.util.d.ts +3 -0
- package/dist/utility/chart/chart-time-domain.util.js +13 -4
- package/dist/utility/chart/feed-interval.util.d.ts +4 -2
- package/dist/utility/chart/feed-interval.util.js +5 -2
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +3 -1
- package/dist/utility/chart/fetch-dedupe-policy.util.js +19 -1
- package/dist/utility/chart/footprint-display-mode.util.d.ts +2 -0
- package/dist/utility/chart/footprint-display-mode.util.js +5 -0
- package/dist/utility/chart/governed-lanes-gate.util.d.ts +46 -0
- package/dist/utility/chart/governed-lanes-gate.util.js +71 -0
- package/dist/utility/chart/governed-lanes-reader-seat.d.ts +14 -0
- package/dist/utility/chart/governed-lanes-reader-seat.js +14 -0
- package/dist/utility/chart/history-wall.util.d.ts +13 -2
- package/dist/utility/chart/history-wall.util.js +11 -4
- package/dist/utility/chart/index-mode-admission.util.js +9 -1
- package/dist/utility/chart/index-mode.util.d.ts +2 -2
- package/dist/utility/chart/index-mode.util.js +12 -6
- package/dist/utility/chart/index-otc.leaf.d.ts +37 -0
- package/dist/utility/chart/index-otc.leaf.js +68 -0
- package/dist/utility/chart/interval-ladder.util.d.ts +5 -2
- package/dist/utility/chart/interval-ladder.util.js +44 -4
- package/dist/utility/chart/interval-registry.util.d.ts +22 -1
- package/dist/utility/chart/interval-registry.util.js +50 -2
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.d.ts +32 -4
- package/dist/utility/chart/kscript-data-interval-restriction.leaf.js +22 -5
- package/dist/utility/chart/kscript-drawing-safe-area.util.d.ts +10 -0
- package/dist/utility/chart/kscript-drawing-safe-area.util.js +30 -3
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +21 -4
- package/dist/utility/chart/kscript-legend-entries.util.js +27 -5
- package/dist/utility/chart/kscript-main-grid-stages.util.js +74 -24
- package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
- package/dist/utility/chart/kscript-row-name.leaf.d.ts +13 -0
- package/dist/utility/chart/kscript-row-name.leaf.js +18 -0
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +61 -26
- package/dist/utility/chart/kscript-venue-policy.util.js +138 -37
- package/dist/utility/chart/live-bucket.util.d.ts +29 -4
- package/dist/utility/chart/live-bucket.util.js +45 -12
- package/dist/utility/chart/market-session-schedule.util.d.ts +19 -0
- package/dist/utility/chart/market-session-schedule.util.js +2 -1
- package/dist/utility/chart/market-session.util.d.ts +62 -10
- package/dist/utility/chart/market-session.util.js +93 -13
- package/dist/utility/chart/marketKind.util.d.ts +11 -12
- package/dist/utility/chart/marketKind.util.js +45 -13
- package/dist/utility/chart/mixed-mode.util.d.ts +18 -0
- package/dist/utility/chart/om-target.util.js +6 -4
- package/dist/utility/chart/price-precision.util.d.ts +20 -6
- package/dist/utility/chart/price-precision.util.js +34 -7
- package/dist/utility/chart/profile-frame-window.util.d.ts +15 -0
- package/dist/utility/chart/profile-frame-window.util.js +12 -0
- package/dist/utility/chart/rth-session.util.d.ts +3 -1
- package/dist/utility/chart/rth-session.util.js +3 -1
- package/dist/utility/chart/script-source-session.util.d.ts +43 -0
- package/dist/utility/chart/script-source-session.util.js +61 -0
- package/dist/utility/chart/typed-width-grid.util.d.ts +23 -0
- package/dist/utility/chart/typed-width-grid.util.js +203 -0
- package/dist/utility/common/transformations.util.d.ts +6 -0
- package/dist/utility/common/transformations.util.js +28 -4
- package/dist/utility/market-events/market-events.util.js +3 -0
- package/dist/utility/number-format.util.d.ts +14 -1
- package/dist/utility/number-format.util.js +22 -4
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.d.ts +24 -1
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +115 -0
- package/dist/utility/v2/v2-enums.leaf.js +5 -0
- package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +2 -1
- package/dist/utility/wrun/sources/row-lanes/dark_pool.js +4 -3
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-batched-marks.util.js +96 -17
- package/dist/utility/wrun/wrun-canvases.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-canvases.util.js +7 -12
- package/dist/utility/wrun/wrun-cap-notice.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-cap-notice.util.js +23 -0
- package/dist/utility/wrun/wrun-card-style.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-card-style.util.js +2 -2
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +23 -8
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +24 -9
- package/dist/utility/wrun/wrun-child-overlay-id.util.d.ts +10 -0
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +24 -0
- package/dist/utility/wrun/wrun-cloud-cme-stamp.util.d.ts +72 -0
- package/dist/utility/wrun/wrun-cloud-cme-stamp.util.js +151 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +10 -6
- package/dist/utility/wrun/wrun-cme-root-specs.util.js +19 -13
- package/dist/utility/wrun/wrun-color-facts.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-color-facts.util.js +8 -5
- package/dist/utility/wrun/wrun-colour-tone.lazy.d.ts +20 -0
- package/dist/utility/wrun/wrun-colour-tone.lazy.js +23 -0
- package/dist/utility/wrun/wrun-colour-tone.util.d.ts +14 -0
- package/dist/utility/wrun/wrun-colour-tone.util.js +119 -0
- package/dist/utility/wrun/wrun-dark-pool.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-dark-pool.util.js +5 -4
- package/dist/utility/wrun/wrun-frames.d.ts +1 -1
- package/dist/utility/wrun/wrun-frames.js +2 -2
- package/dist/utility/wrun/wrun-handles.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-handles.util.js +1 -1
- package/dist/utility/wrun/wrun-host.service.d.ts +32 -2
- package/dist/utility/wrun/wrun-host.service.js +44 -2
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +20 -0
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +85 -2
- package/dist/utility/wrun/wrun-hosted-wire.util.d.ts +37 -0
- package/dist/utility/wrun/wrun-hosted-wire.util.js +54 -0
- package/dist/utility/wrun/wrun-hud-looks.util.d.ts +1 -0
- package/dist/utility/wrun/wrun-hud-looks.util.js +6 -11
- package/dist/utility/wrun/wrun-integration-route.util.d.ts +24 -0
- package/dist/utility/wrun/wrun-integration-route.util.js +19 -0
- package/dist/utility/wrun/wrun-live-intake.util.js +17 -1
- package/dist/utility/wrun/wrun-live-patch.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-live-patch.util.js +10 -4
- package/dist/utility/wrun/wrun-live-tick.util.js +64 -5
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +40 -6
- package/dist/utility/wrun/wrun-market-size-defaults.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +10 -8
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +3 -0
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +17 -0
- package/dist/utility/wrun/wrun-overlay-run.util.js +318 -55
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-panel-mount.util.js +42 -13
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-pin-venues.util.js +11 -4
- package/dist/utility/wrun/wrun-refusal.util.d.ts +4 -0
- package/dist/utility/wrun/wrun-refusal.util.js +102 -13
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +5 -3
- package/dist/utility/wrun/wrun-registry-errors.util.js +5 -3
- package/dist/utility/wrun/wrun-row-source-factory.js +17 -1
- package/dist/utility/wrun/wrun-row-source.d.ts +8 -1
- package/dist/utility/wrun/wrun-run-health.util.js +1 -1
- package/dist/utility/wrun/wrun-sandbox-row-source.d.ts +1 -1
- package/dist/utility/wrun/wrun-sandbox-row-source.js +9 -0
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-session-composition.util.js +3 -2
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +12 -5
- package/dist/utility/wrun/wrun-setting-words.util.js +25 -8
- package/dist/utility/wrun/wrun-socket-row-source.d.ts +26 -1
- package/dist/utility/wrun/wrun-socket-row-source.js +125 -12
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +3 -3
- package/dist/utility/wrun/wrun-source-rows.util.js +8 -7
- package/dist/utility/wrun/wrun-style-words.util.d.ts +31 -9
- package/dist/utility/wrun/wrun-style-words.util.js +46 -15
- package/dist/utility/wrun/wrun-trades-lane.util.js +2 -1
- package/dist/utility/wrun/wrun-trap-replay.util.d.ts +42 -0
- package/dist/utility/wrun/wrun-trap-replay.util.js +63 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +6 -5
- package/dist/utility/wrun-display-name.util.d.ts +10 -0
- package/dist/utility/wrun-display-name.util.js +21 -0
- package/dist/utils/replay/replay-buffer-math.d.ts +2 -0
- package/dist/utils/replay/replay-buffer-math.js +2 -0
- package/dist/workers/constants/socket-slots.d.ts +1 -1
- package/dist/workers/utils/time.worker.util.js +2 -2
- package/dist/workers/utils/volume-profile.worker.util.d.ts +9 -0
- package/dist/workers/utils/volume-profile.worker.util.js +20 -0
- package/dist/workers/wrun/wrun-abi-host.d.ts +3 -0
- package/dist/workers/wrun/wrun-abi-host.js +82 -5
- package/dist/workers/wrun/wrun-engine-handler.js +53 -4
- package/dist/workers/wrun/wrun-trap-frames.leaf.d.ts +28 -0
- package/dist/workers/wrun/wrun-trap-frames.leaf.js +108 -0
- package/package.json +11 -11
|
@@ -184,6 +184,20 @@ export function tradesServedStartMs(nowMs, historySec, intervalMs, options = {})
|
|
|
184
184
|
? Number.NEGATIVE_INFINITY
|
|
185
185
|
: tradesBarLimitStartMs(options.windowEndMs ?? nowMs, options.barLimitSec, intervalMs, options.exchange));
|
|
186
186
|
}
|
|
187
|
+
/** The precision every tape stamp is keyed at, in ns: the gateway stores a trade's stamp in microseconds (a served
|
|
188
|
+
* row's nanoseconds always end in three zeros), while a live CME frame carries Databento's nanoseconds. */
|
|
189
|
+
export const TAPE_STAMP_PRECISION_NS = 1_000;
|
|
190
|
+
/**
|
|
191
|
+
* A trade's stamp in ms as every tape reader keys it: exact to the microsecond, the stored precision. The fills of one
|
|
192
|
+
* aggressor order share it and no other order does (the gateway's `minAmountPerOrder` key), so the package joins an
|
|
193
|
+
* order on it alone; rounded to the millisecond, orders 0.5 ms apart read as one (Discord ticket #683). Floored to the
|
|
194
|
+
* microsecond, a live print and its served row land on the SAME double, so the reconcile matches them by offset; kept
|
|
195
|
+
* to the nanosecond, the live copy of an order would sit beside its history row and draw twice.
|
|
196
|
+
*/
|
|
197
|
+
export function tradeStampMs(seconds, nanos) {
|
|
198
|
+
const micros = Number.isFinite(nanos) ? Math.floor(nanos / TAPE_STAMP_PRECISION_NS) : 0;
|
|
199
|
+
return seconds * 1000 + micros / 1000;
|
|
200
|
+
}
|
|
187
201
|
/** Null for a point the fold rejects, another channel's included; without `large`, either channel (stamp readers). */
|
|
188
202
|
export function readLiveTradePrint(newPoint, large) {
|
|
189
203
|
if (!newPoint || typeof newPoint !== 'object')
|
|
@@ -198,7 +212,8 @@ export function readLiveTradePrint(newPoint, large) {
|
|
|
198
212
|
return null;
|
|
199
213
|
}
|
|
200
214
|
const nanos = Number(trade?.timestamp?.nanoseconds ?? trade?.timestamp?.nanos ?? 0);
|
|
201
|
-
|
|
215
|
+
// The order key at the stored precision (tradeStampMs): the history worker keys the same print on the same value.
|
|
216
|
+
const tsMs = tradeStampMs(seconds, nanos);
|
|
202
217
|
if (!Number.isFinite(tsMs))
|
|
203
218
|
return null;
|
|
204
219
|
const exchange = point.series?.exchange;
|
|
@@ -94,39 +94,15 @@ export interface MarketDataChangePlanDto {
|
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* POST <basePath>/checkout -> 200: a Stripe redirect, or a refusal. 'professional_unavailable' is terminal (the UI
|
|
97
|
-
* shows "not available").
|
|
98
|
-
*
|
|
99
|
-
* 'attestation_required' or 'agreement_required'; they stay in the union and are handled defensively (the flow routes
|
|
100
|
-
* into that step).
|
|
97
|
+
* shows "not available"). Pay first, the server no longer answers 'attestation_required' or 'agreement_required'; they
|
|
98
|
+
* stay in the union and are handled defensively (the flow routes into that step).
|
|
101
99
|
*/
|
|
102
100
|
export type MarketDataCheckoutResponseDto = {
|
|
103
101
|
url: string;
|
|
104
102
|
} | {
|
|
105
103
|
refused: MarketDataPurchaseRefusalCode;
|
|
106
104
|
};
|
|
107
|
-
export type MarketDataPurchaseRefusalCode = 'professional_unavailable' | '
|
|
108
|
-
/**
|
|
109
|
-
* GET <basePath>/subscription `review`: the review of the account's answers that bears on real-time (Exhibit A Q19.2),
|
|
110
|
-
* or null. 'pending': an employer or occupation that suggests a financial firm or a registered person asks the
|
|
111
|
-
* subscriber to confirm the declaration before `deadline` (POST <basePath>/attestation/review/confirm); real-time runs
|
|
112
|
-
* until the deadline passes. 'held': an operator reviews the declaration and real-time waits. 'withdrawn': an operator
|
|
113
|
-
* withdrew real-time (`resolvedAt`); the way back is a new declaration.
|
|
114
|
-
*/
|
|
115
|
-
export interface MarketDataReviewDto {
|
|
116
|
-
state: 'pending' | 'held' | 'withdrawn';
|
|
117
|
-
reason: string;
|
|
118
|
-
openedAt: string;
|
|
119
|
-
deadline: string | null;
|
|
120
|
-
resolvedAt: string | null;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* POST <basePath>/attestation/review/confirm (no body) -> 200: the pending review confirmed; 409
|
|
124
|
-
* `<VENUE>_REVIEW_NOT_OPEN` when no review is pending (none, or one only an operator resolves).
|
|
125
|
-
*/
|
|
126
|
-
export interface MarketDataReviewConfirmDto {
|
|
127
|
-
confirmed: boolean;
|
|
128
|
-
confirmedAt: string;
|
|
129
|
-
}
|
|
105
|
+
export type MarketDataPurchaseRefusalCode = 'professional_unavailable' | 'agreement_required' | 'attestation_required';
|
|
130
106
|
/**
|
|
131
107
|
* Why the server set a subscription to end at its period end on its own: 'unqualified', the account is paid but has
|
|
132
108
|
* not completed the subscriber questions and the agreement.
|
|
@@ -180,8 +156,6 @@ export interface MarketDataOperatorGrantDto {
|
|
|
180
156
|
}
|
|
181
157
|
export interface GetMarketDataSubscriptionResponseDto {
|
|
182
158
|
subscription: MarketDataSubscriptionDto | null;
|
|
183
|
-
/** Additive (a server from before the review answers none). */
|
|
184
|
-
review?: MarketDataReviewDto | null;
|
|
185
159
|
/** Additive (a server from before operator grants on the answer answers none). */
|
|
186
160
|
grant?: MarketDataOperatorGrantDto | null;
|
|
187
161
|
}
|
|
@@ -316,14 +290,11 @@ export interface MarketDataCancelResponseDto {
|
|
|
316
290
|
}
|
|
317
291
|
export type MarketDataAttestation = MarketDataAttestationRecordDto;
|
|
318
292
|
export type MarketDataSubscription = MarketDataSubscriptionDto;
|
|
319
|
-
/** The review of the account's answers, as served (`MarketDataReviewDto`). */
|
|
320
|
-
export type MarketDataReview = MarketDataReviewDto;
|
|
321
293
|
/** The operator's grant as the store holds it: no subscription, its steps release the grant at the gate. */
|
|
322
294
|
export type MarketDataOperatorGrant = MarketDataOperatorGrantDto;
|
|
323
|
-
/** GET <basePath>/subscription in the domain: the subscription
|
|
295
|
+
/** GET <basePath>/subscription in the domain: the subscription and the operator's grant, each or none. */
|
|
324
296
|
export interface MarketDataSubscriptionAnswer {
|
|
325
297
|
subscription: MarketDataSubscription | null;
|
|
326
|
-
review: MarketDataReview | null;
|
|
327
298
|
grant: MarketDataOperatorGrant | null;
|
|
328
299
|
}
|
|
329
300
|
/** The explicit agreement record: accepted, for which version, and when. */
|
|
@@ -365,8 +336,8 @@ export declare function isMarketDataListedAgreementCurrent(current: Pick<MarketD
|
|
|
365
336
|
* A declaration on the venue's current form (a new question set means a new declaration) whose validity has not ended
|
|
366
337
|
* at `now`, either classification. The client owns expiry: `now` is the caller's clock (the store's last evaluation),
|
|
367
338
|
* never an implied Date.now(). A record without `expiresAt` reads lapsed, as does one whose `expiresAt` does not parse
|
|
368
|
-
* (ask again rather than trust it): status is reconfirmed every 12 months
|
|
369
|
-
*
|
|
339
|
+
* (ask again rather than trust it): status is reconfirmed every 12 months, and a record that names no end can never be
|
|
340
|
+
* shown to be inside its year.
|
|
370
341
|
*/
|
|
371
342
|
export declare function isMarketDataAttestationLive(venue: MarketDataVenue, attestation: MarketDataAttestation | null | undefined, now: number): boolean;
|
|
372
343
|
/** A non-professional declaration on the current form, still valid at `now`: the account may buy real-time. */
|
|
@@ -412,12 +383,12 @@ export type MarketDataCheckoutResult = {
|
|
|
412
383
|
* 'refused': the server answered and refused (any status but a 401, a 429 or a 5xx), so what the account holds may
|
|
413
384
|
* differ from what the page shows and the store reads the records again. The refusals a store acts on itself, read from
|
|
414
385
|
* the body's tag, are refusals too: 'agreement_stale' (409 `<VENUE>_AGREEMENT_STALE`: the text changed, read it
|
|
415
|
-
* again), 'attestation_required' (`<VENUE>_ATTESTATION_REQUIRED`: the declaration on file does not count)
|
|
416
|
-
* 'email_unverified' (403 `<VENUE>_EMAIL_UNVERIFIED`: the verify-email card opens)
|
|
417
|
-
*
|
|
418
|
-
*
|
|
386
|
+
* again), 'attestation_required' (`<VENUE>_ATTESTATION_REQUIRED`: the declaration on file does not count) and
|
|
387
|
+
* 'email_unverified' (403 `<VENUE>_EMAIL_UNVERIFIED`: the verify-email card opens). 'unauthorized': a 401 or an expired
|
|
388
|
+
* session. 'server': a 5xx or a rate limit, where a retry can succeed. 'network': no answer. 'aborted': the caller's
|
|
389
|
+
* own abort, no refusal at all.
|
|
419
390
|
*/
|
|
420
|
-
export type MarketDataBillingErrorKind = 'refused' | 'agreement_stale' | 'attestation_required' | 'email_unverified' | '
|
|
391
|
+
export type MarketDataBillingErrorKind = 'refused' | 'agreement_stale' | 'attestation_required' | 'email_unverified' | 'unauthorized' | 'network' | 'aborted' | 'server';
|
|
421
392
|
export declare class MarketDataBillingError extends Error {
|
|
422
393
|
readonly kind: MarketDataBillingErrorKind;
|
|
423
394
|
readonly status: number | null;
|
|
@@ -436,12 +407,8 @@ export declare class MarketDataBillingError extends Error {
|
|
|
436
407
|
export interface MarketDataBillingRepository {
|
|
437
408
|
getAttestation(signal?: AbortSignal): Promise<MarketDataAttestation | null>;
|
|
438
409
|
submitAttestation(body: MarketDataAttestationDto, signal?: AbortSignal): Promise<MarketDataAttestationSubmitResult>;
|
|
439
|
-
/** GET <basePath>/subscription: the subscription and the
|
|
410
|
+
/** GET <basePath>/subscription: the subscription and the operator's grant, each or none. */
|
|
440
411
|
getSubscription(signal?: AbortSignal): Promise<MarketDataSubscriptionAnswer>;
|
|
441
|
-
/** POST <basePath>/attestation/review/confirm: the subscriber confirms a pending review (a typed refusal throws). */
|
|
442
|
-
confirmReview(signal?: AbortSignal): Promise<{
|
|
443
|
-
confirmedAt: string;
|
|
444
|
-
}>;
|
|
445
412
|
/** Never resolves 'busy' (that is the store's own answer); a refusal resolves, a failure throws. */
|
|
446
413
|
checkout(body: MarketDataCheckoutDto | MarketDataProductCheckoutDto, options: {
|
|
447
414
|
idempotencyId: string;
|
|
@@ -54,8 +54,8 @@ export function isMarketDataListedAgreementCurrent(current, assent) {
|
|
|
54
54
|
* A declaration on the venue's current form (a new question set means a new declaration) whose validity has not ended
|
|
55
55
|
* at `now`, either classification. The client owns expiry: `now` is the caller's clock (the store's last evaluation),
|
|
56
56
|
* never an implied Date.now(). A record without `expiresAt` reads lapsed, as does one whose `expiresAt` does not parse
|
|
57
|
-
* (ask again rather than trust it): status is reconfirmed every 12 months
|
|
58
|
-
*
|
|
57
|
+
* (ask again rather than trust it): status is reconfirmed every 12 months, and a record that names no end can never be
|
|
58
|
+
* shown to be inside its year.
|
|
59
59
|
*/
|
|
60
60
|
export function isMarketDataAttestationLive(venue, attestation, now) {
|
|
61
61
|
if (!attestation || !isMarketDataFormVersionAccepted(venue, attestation.formVersion))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Replay fidelity ladder: measured retention and request-shaping constants.
|
|
2
2
|
import { RAIL_TFS, RAIL_TF_BOOK_EDGE_SEC, RAIL_TF_BUCKET_SEC, RAIL_TF_EDGE_SEC, REPLAY_LADDER_EDGES_SEC, REPLAY_STEP_TFS, REPLAY_STEP_TF_BOOK_EDGE_SEC, REPLAY_STEP_TF_BUCKET_SEC, REPLAY_STEP_TF_EDGE_SEC, } from '../constants/replay-ladder.leaf.js';
|
|
3
|
-
import { FEATURE_LIMITS, GATEWAY_TIER_MAX_BARS } from '../constants/feature-limits.constants.js';
|
|
3
|
+
import { FEATURE_LIMITS, GATEWAY_TIER_MAX_BARS, upgradeOfferTier, } from '../constants/feature-limits.constants.js';
|
|
4
4
|
import { checkIsCryptoIndex } from '../utility/chart/crypto-index.leaf.js';
|
|
5
5
|
import { checkIsBlockedOn1s } from '../utility/chart/index-mode.util.js';
|
|
6
6
|
import { standardIntervalMsAtOrBelow } from '../utility/chart/interval-registry.util.js';
|
|
@@ -223,10 +223,13 @@ export function gatewayTierMaxBars(tier, resolution) {
|
|
|
223
223
|
* wall now explains itself the way a paid one does.
|
|
224
224
|
*/
|
|
225
225
|
export function replayPlusReachesFurther(tier, reachBars, resolution) {
|
|
226
|
-
|
|
226
|
+
// The plan an upgrade prompt may offer from the viewer's own (Plus from free; none from a paid plan while
|
|
227
|
+
// Ultimate is not sold), compared against the viewer's own gateway wall.
|
|
228
|
+
const offer = upgradeOfferTier(tier);
|
|
229
|
+
if (offer === null)
|
|
227
230
|
return false;
|
|
228
|
-
return (FEATURE_LIMITS.replayReachBars
|
|
229
|
-
gatewayTierMaxBars(
|
|
231
|
+
return (FEATURE_LIMITS.replayReachBars[offer] > reachBars ||
|
|
232
|
+
gatewayTierMaxBars(offer, resolution) > gatewayTierMaxBars(tier, resolution));
|
|
230
233
|
}
|
|
231
234
|
export function gatewayTierReachMs(tier, resolution) {
|
|
232
235
|
const label = replayResolutionRequestIntervalLabel(resolution);
|
|
@@ -17,6 +17,12 @@ import type { SettingsFormModel, SettingsFormRow } from './form-rows.js';
|
|
|
17
17
|
*/
|
|
18
18
|
/** The groups a host draws, by the slot names of both web footprint dialogs. */
|
|
19
19
|
export declare const FOOTPRINT_FORM_SLOTS: readonly ["sierra-look", "footprint-columns"];
|
|
20
|
+
/**
|
|
21
|
+
* Web-only footprint slots: rows web's dialogs draw that a host's form does not describe yet. `footprint-row-split`
|
|
22
|
+
* (Split rows by, FootprintRowSplitPicker.vue) waits on the phone's engine pin; until then the phone keeps the split
|
|
23
|
+
* at none through withFootprintDisplayMode, which sets it back on every display mode pick other than Total.
|
|
24
|
+
*/
|
|
25
|
+
export declare const FOOTPRINT_WEB_ONLY_SLOTS: readonly ["footprint-row-split"];
|
|
20
26
|
export type FootprintFormSlot = (typeof FOOTPRINT_FORM_SLOTS)[number];
|
|
21
27
|
/**
|
|
22
28
|
* The rows of one group for `model`, top to bottom: `sierra-look` is the Classic Presets row; `footprint-columns` is
|
|
@@ -19,6 +19,12 @@ import { withFootprintSierraLook } from '../utility/chart/footprint-sierra-look.
|
|
|
19
19
|
*/
|
|
20
20
|
/** The groups a host draws, by the slot names of both web footprint dialogs. */
|
|
21
21
|
export const FOOTPRINT_FORM_SLOTS = ['sierra-look', 'footprint-columns'];
|
|
22
|
+
/**
|
|
23
|
+
* Web-only footprint slots: rows web's dialogs draw that a host's form does not describe yet. `footprint-row-split`
|
|
24
|
+
* (Split rows by, FootprintRowSplitPicker.vue) waits on the phone's engine pin; until then the phone keeps the split
|
|
25
|
+
* at none through withFootprintDisplayMode, which sets it back on every display mode pick other than Total.
|
|
26
|
+
*/
|
|
27
|
+
export const FOOTPRINT_WEB_ONLY_SLOTS = ['footprint-row-split'];
|
|
22
28
|
const DISPLAY_MODE_WORDS = {
|
|
23
29
|
'split-bar': 'indicators.settings.options.split',
|
|
24
30
|
'stacked-bar-delta': 'indicators.settings.options.delta',
|
|
@@ -122,6 +122,20 @@ export const FRVP_FIELD_ROWS = [
|
|
|
122
122
|
// Not a setting: the stamp the saved defaults' profile half carries in the account's style memory, written with it
|
|
123
123
|
// (FRVP_PROFILE_DEFAULTS_STAMP below). In the default lane so the memory keeps it; no panel, row or copy holds it.
|
|
124
124
|
['profileDefaultsVersion', { owner: 'profile', lanes: ['default'] }],
|
|
125
|
+
// Dynamic Profile parity (Exocharts, 2026-11-13). The profile's row text and imbalance marks, read with the session
|
|
126
|
+
// volume profile's keys and words, and the candle the box draws for its range ('none' by default).
|
|
127
|
+
['rowText', PREFERENCE],
|
|
128
|
+
['imbalance', PREFERENCE],
|
|
129
|
+
['imbalanceRatio', PREFERENCE],
|
|
130
|
+
['imbalanceBuyColor', PREFERENCE],
|
|
131
|
+
['imbalanceSellColor', PREFERENCE],
|
|
132
|
+
['rangeCandle', PREFERENCE],
|
|
133
|
+
// The box's fill (null: none) and its border: the Style tab's rows beside the boundary lines.
|
|
134
|
+
['backgroundColor', BOX_STYLE],
|
|
135
|
+
['showBorder', BOX_STYLE],
|
|
136
|
+
// The range's own figures the printed stats read (change, high, low, open interest change, liquidations, the
|
|
137
|
+
// window's ends): written by the control for the box it draws, never saved.
|
|
138
|
+
['profileRangeStats', BOX_DRAWN],
|
|
125
139
|
];
|
|
126
140
|
/**
|
|
127
141
|
* The stamp of the saved FRVP defaults' profile half in the account's style memory (the `profileDefaultsVersion` row):
|
|
@@ -513,6 +513,10 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
513
513
|
// Without this entry the reconcile pick sites silently strip the merge on
|
|
514
514
|
// the next save and panes un-merge on reload.
|
|
515
515
|
['hostPaneId', INSTANCE],
|
|
516
|
+
// Pane place (PANES-ANY-SIDE): the side, look, size, order and orientation of this indicator's pane, `{ side, look?,
|
|
517
|
+
// sizePx?, order?, flip? }`. Row-only: templates, Save as default and Reset skip it. The mount restamps it before the engine add
|
|
518
|
+
// (chart.add-indicator, pane-place.util restampPanePlace), so a build with the feature off keeps it through a save.
|
|
519
|
+
['panePlace', INSTANCE],
|
|
516
520
|
// Pane hosting axes: the member's requested axis side (left/right/hidden).
|
|
517
521
|
// The axis side lives and dies with the `hostPaneId` association. `hideLegendName` is NOT here:
|
|
518
522
|
// it is a per-indicator preference (the settings dialog's "Show indicator name").
|
|
@@ -773,9 +777,19 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
773
777
|
// Center, written either way once picked (a pick of Left must replace a saved Center); absent reads Left.
|
|
774
778
|
['candlePosition', PREFERENCE],
|
|
775
779
|
['footprintColumns', PREFERENCE],
|
|
780
|
+
// Footprint Split rows by (FOOTPRINT-ROW-SPLIT, 2026-11-14), declared after the fixture in its own change: none, time,
|
|
781
|
+
// venue or market; absent reads none.
|
|
782
|
+
['rowSplit', PREFERENCE],
|
|
776
783
|
// The Aggregated Volume Footprint's Trim empty tail rows (settings no-op audit, 2026-10-25): its template stamps
|
|
777
784
|
// the key on, and a row the user switched off must keep it off through a reload.
|
|
778
785
|
['trimZeroTails', PREFERENCE],
|
|
786
|
+
// A TPO scheme's colours per mode (TPO TimeOfDay, 2026-11-15), declared after the fixture in its own change:
|
|
787
|
+
// the bundle travels with the scheme it names (tpoSchemeBundleOf), so a template and a saved default carry it.
|
|
788
|
+
['tpoScheme', PREFERENCE],
|
|
789
|
+
// What a Split rows by pick changed, as it was (FOOTPRINT-ROW-SPLIT round 2, 2026-11-14), declared after the fixture
|
|
790
|
+
// in its own change: None puts it back. Instance state: the row keeps it through a reload; a template or a saved
|
|
791
|
+
// default never carries it onto another instance.
|
|
792
|
+
['rowSplitFrom', INSTANCE],
|
|
779
793
|
// A window's projection stamps (window-cell.util, 2026-10-23), declared after the fixture in their own change: the
|
|
780
794
|
// chart Indicator a window door copied the owner from (`{ overlayId, chartIndex }`), and the mark of a window that
|
|
781
795
|
// shows its tables alone (the window an add opens beside its chart Indicator). The row keeps both (a reload keeps
|
|
@@ -803,6 +817,9 @@ export const INDICATOR_COMMON_FIELDS = [
|
|
|
803
817
|
// The footprint anchor's read stamp (2026-11-07, footprint-anchor-tick.util): a stamped anchor only moves finer, an
|
|
804
818
|
// older read's may heal coarser. Appended here, after the rows the golden fixture knows (row-keys.golden.spec).
|
|
805
819
|
['anchorTickInference', PREFERENCE],
|
|
820
|
+
// The Fixed Range Volume Profile's range candle (2026-11-13, Dynamic Profile parity): 'none', 'body', 'outline' or
|
|
821
|
+
// 'openClose'. Declared here so the companion's workspace row keeps it; draw-only, no refetch.
|
|
822
|
+
['rangeCandle', PREFERENCE],
|
|
806
823
|
];
|
|
807
824
|
/**
|
|
808
825
|
* FEED (live series, docs/features/indicators/feeds.md): the rest of the C4 record beside `address`, `scope` and
|
|
@@ -900,6 +917,21 @@ const OPTIONS_GEX_FIELDS = [
|
|
|
900
917
|
const ORDERBOOK_PROFILE_FIELDS = [
|
|
901
918
|
['groupingMode', { lanes: ['row', 'template', 'default'], unset: 'dynamic' }],
|
|
902
919
|
];
|
|
920
|
+
/**
|
|
921
|
+
* The TPO block shape ('square' or 'wide', the Block shape row, 2026-11-16). A row that never picked holds no key and
|
|
922
|
+
* draws wide: untouched workspace rows are never rewritten (the row lane writes no unset). A template or a saved
|
|
923
|
+
* default captured from such a row carries 'wide' (`unset`), so applied over a square TPO it restores wide instead of
|
|
924
|
+
* leaving square (the Order Book Profile's `groupingMode` rule). Scoped to the two TPO types: with an unset value a
|
|
925
|
+
* shared row would write 'wide' into every other indicator's template.
|
|
926
|
+
*/
|
|
927
|
+
const TPO_FIELDS = [
|
|
928
|
+
['blockShape', { lanes: ['row', 'template', 'default'], unset: 'wide' }],
|
|
929
|
+
// The Volume only pick turned the volume on (updateTpoBlockDisplaySettings): it travels with the display and the
|
|
930
|
+
// volume switch it explains. A capture from a TPO that holds none writes false, so it never keeps a stale true.
|
|
931
|
+
// A template saved before 2026-11-17 holds no value and cannot say who turned its volume on: applied over a TPO
|
|
932
|
+
// whose own pick turned the volume on, that TPO's note stands (review 2026-11-17, left as is: no reader can tell).
|
|
933
|
+
['volumeOnlyTurnedVolumeOn', { lanes: ['row', 'template', 'default'], unset: false }],
|
|
934
|
+
];
|
|
903
935
|
/** The VRVP own-window scope rows (see INDICATOR_TYPE_FIELDS below). */
|
|
904
936
|
const VISIBLE_RANGE_PROFILE_FIELDS = [
|
|
905
937
|
['profileWindow', PREFERENCE],
|
|
@@ -927,6 +959,8 @@ export const INDICATOR_TYPE_FIELDS = {
|
|
|
927
959
|
VISIBLE_RANGE_VOLUME_PROFILE: VISIBLE_RANGE_PROFILE_FIELDS,
|
|
928
960
|
AGGREGATED_VISIBLE_RANGE_VOLUME_PROFILE: VISIBLE_RANGE_PROFILE_FIELDS,
|
|
929
961
|
ORDERBOOK_PROFILE: ORDERBOOK_PROFILE_FIELDS,
|
|
962
|
+
TIME_PRICE_OPPORTUNITY: TPO_FIELDS,
|
|
963
|
+
AGGREGATED_TIME_PRICE_OPPORTUNITY: TPO_FIELDS,
|
|
930
964
|
OPEN_INTEREST_PROFILE: METRIC_PROFILE_FIELDS,
|
|
931
965
|
LIQUIDATION_PROFILE: METRIC_PROFILE_FIELDS,
|
|
932
966
|
OPTIONS_HEATMAP: OPTIONS_HEATMAP_FIELDS,
|
|
@@ -988,4 +1022,6 @@ export const INDICATOR_TYPE_FIELDS = {
|
|
|
988
1022
|
['lines', META_PREFERENCE],
|
|
989
1023
|
['plots', META_DERIVED],
|
|
990
1024
|
],
|
|
1025
|
+
/** Net Longs & Shorts: Per candle or Running total (OpenInterestPositionsSettings.vue `meta.display`). */
|
|
1026
|
+
OPEN_INTEREST_POSITIONS: [['display', META_PREFERENCE]],
|
|
991
1027
|
};
|
|
@@ -736,12 +736,21 @@ export const TOOL_DEFAULT_STYLE = {
|
|
|
736
736
|
lineStyle: 'solid',
|
|
737
737
|
fontSize: 14,
|
|
738
738
|
textPosition: 'center',
|
|
739
|
-
textVerticalPosition: '
|
|
739
|
+
textVerticalPosition: 'middle',
|
|
740
740
|
fontWeight: 400,
|
|
741
741
|
fontStyle: 'normal',
|
|
742
742
|
fillBackground: true,
|
|
743
743
|
fillColor: '#4DA3FF26',
|
|
744
744
|
middleLine: true,
|
|
745
|
+
parallelLevels: [
|
|
746
|
+
{ value: -0.25, enabled: false },
|
|
747
|
+
{ value: 0, enabled: true },
|
|
748
|
+
{ value: 0.25, enabled: false },
|
|
749
|
+
{ value: 0.5, enabled: true, lineStyle: 'dashed' },
|
|
750
|
+
{ value: 0.75, enabled: false },
|
|
751
|
+
{ value: 1, enabled: true },
|
|
752
|
+
{ value: 1.25, enabled: false },
|
|
753
|
+
],
|
|
745
754
|
},
|
|
746
755
|
Path: { color: '#4DA3FF', lineStyle: 'solid', lineWidth: 1.5 },
|
|
747
756
|
Pencil: { color: '#4DA3FF', lineStyle: 'solid', lineWidth: 2, smoothing: 10 },
|
|
@@ -1329,6 +1338,14 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1329
1338
|
'profileStatsPosition',
|
|
1330
1339
|
'levelLineWidth',
|
|
1331
1340
|
'levelLineStyle',
|
|
1341
|
+
'rowText',
|
|
1342
|
+
'imbalance',
|
|
1343
|
+
'imbalanceRatio',
|
|
1344
|
+
'imbalanceBuyColor',
|
|
1345
|
+
'imbalanceSellColor',
|
|
1346
|
+
'rangeCandle',
|
|
1347
|
+
'backgroundColor',
|
|
1348
|
+
'showBorder',
|
|
1332
1349
|
],
|
|
1333
1350
|
FlagMark: ['color', 'visibleIntervalsMs'],
|
|
1334
1351
|
FlatTopBottom: [
|
|
@@ -1515,6 +1532,7 @@ export const TOOL_TEMPLATE_KEYS = {
|
|
|
1515
1532
|
'fillBackground',
|
|
1516
1533
|
'fillColor',
|
|
1517
1534
|
'middleLine',
|
|
1535
|
+
'parallelLevels',
|
|
1518
1536
|
'text',
|
|
1519
1537
|
'visibleIntervalsMs',
|
|
1520
1538
|
],
|