@orangecharts/wrun-chart-host 0.16.0 → 0.18.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/feature-flags.constants.d.ts +2 -9
- package/dist/constants/feature-flags.constants.js +20 -98
- package/dist/constants/feature-limits.constants.d.ts +2 -2
- package/dist/constants/feature-limits.constants.js +8 -6
- 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 +7 -5
- package/dist/constants/typed-width-fold.leaf.js +7 -5
- package/dist/host-env.d.ts +2 -0
- package/dist/host-ports.types.d.ts +12 -17
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/interfaces/kscript-diagnostics.interface.d.ts +7 -0
- package/dist/interfaces/wrun-runtime.interface.d.ts +6 -3
- package/dist/market-data/venues/index.d.ts +128 -143
- package/dist/market-data/venues/index.js +2 -2
- package/dist/market-data/venues/stocks.d.ts +1 -1
- package/dist/market-data/venues/stocks.js +2 -4
- package/dist/settings-templates/indicator-fields.js +5 -0
- package/dist/utility/chart/cme-user-scripts-gate.util.d.ts +8 -8
- package/dist/utility/chart/cme-user-scripts-gate.util.js +8 -8
- package/dist/utility/chart/governed-lanes-gate.util.d.ts +6 -6
- package/dist/utility/chart/governed-lanes-gate.util.js +6 -6
- 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 +50 -0
- package/dist/utility/chart/index-otc.leaf.js +86 -0
- package/dist/utility/chart/kscript-provenance-keys.util.js +6 -0
- 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/marketKind.util.d.ts +10 -5
- package/dist/utility/chart/marketKind.util.js +39 -5
- package/dist/utility/chart/mixed-mode.util.d.ts +1 -0
- package/dist/utility/chart/server-built-bars.util.d.ts +4 -0
- package/dist/utility/chart/server-built-bars.util.js +18 -0
- package/dist/utility/market-events/market-events.util.js +3 -0
- package/dist/utility/scriptEditor/wrun-runtime-diagnostics.leaf.js +2 -0
- package/dist/utility/v2/v2-enums.leaf.js +2 -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 +6 -2
- package/dist/utility/wrun/wrun-batched-marks.util.js +37 -6
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +15 -8
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +11 -8
- 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-dark-pool.util.js +1 -1
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +1 -1
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +3 -0
- package/dist/utility/wrun/wrun-live-intake.util.js +6 -0
- package/dist/utility/wrun/wrun-live-tick.util.js +5 -1
- 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-run.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-overlay-run.util.js +50 -14
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-pin-venues.util.js +6 -3
- package/dist/utility/wrun/wrun-run-health.util.js +1 -1
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-session-composition.util.js +3 -2
- package/package.json +5 -5
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The index and yield venue: 22 licensed instruments (stock indices, the dollar index, a volatility index and four US
|
|
3
|
+
* Treasury yields) under one exchange. The backend prints each as raw TICKER points and serves its candles as
|
|
4
|
+
* TICKER_AGG (open/high/low/close, no volume), from 1m up; no trades, volume or book exist behind them. The backend
|
|
5
|
+
* owner fixed the name and the number (`INDICES_OTC`, 182, pb-common 12.86.0).
|
|
6
|
+
*
|
|
7
|
+
* A leaf on purpose, with no imports, like quote-perp.leaf: the market-kind table (`marketKind.util`) and the ticker
|
|
8
|
+
* hub (`index-mode.util`) both read it, and web code asks `checkIsIndexOtc` here, never through those two modules,
|
|
9
|
+
* which over a hundred specs mock with partial factories. The symbol set and the unit live here too: the icon
|
|
10
|
+
* resolver and the price text read them on the boot path, so a second leaf would join the boot closure anyway.
|
|
11
|
+
*/
|
|
12
|
+
export declare const INDEX_OTC_EXCHANGES: readonly ["INDICES_OTC"];
|
|
13
|
+
/**
|
|
14
|
+
* The index and yield venue (`INDEX_OTC_EXCHANGES`), the `'marketIndex'` market kind. Case-insensitive like the kind
|
|
15
|
+
* table, and a foreign shape (a persisted object, a number) is no venue, never a throw.
|
|
16
|
+
*/
|
|
17
|
+
export declare function checkIsIndexOtc(exchange: string | undefined | null): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The words of the refusal a read of the venue gets while its release flag is off for the session
|
|
20
|
+
* (workers/series/unreleased-venues builds it; the main fetch reads it to ask again once the flag is on).
|
|
21
|
+
*/
|
|
22
|
+
export declare const INDEX_OTC_UNRELEASED_REFUSAL = "is not released for this session";
|
|
23
|
+
/**
|
|
24
|
+
* Our own names for the 22 instruments. The vendor's tickers and the index owners' names never reach the UI; display
|
|
25
|
+
* names come from the backend directory.
|
|
26
|
+
*/
|
|
27
|
+
export declare const INDEX_OTC_SYMBOLS: readonly ["US500", "US100", "US30", "US2000", "UK100", "DE40", "EU50", "FR40", "IT40", "ES35", "NL30", "CH20", "JP225", "HK50", "AU200", "IN50", "DXY", "VIX", "US02Y", "US05Y", "US10Y", "US30Y"];
|
|
28
|
+
/** The US Treasury yields: their values are percent, every other instrument is points with no currency sign. */
|
|
29
|
+
export declare const INDEX_OTC_PERCENT_SYMBOLS: readonly ["US02Y", "US05Y", "US10Y", "US30Y"];
|
|
30
|
+
export type IndexOtcUnit = 'points' | 'percent';
|
|
31
|
+
/** One of our 22 instrument names (`INDEX_OTC_SYMBOLS`). Case-insensitive; a foreign shape is false. */
|
|
32
|
+
export declare function isIndexOtcSymbol(symbol: string | undefined | null): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The unit an instrument's value is in. Case-insensitive; anything that is not a yield reads `'points'`, so an
|
|
35
|
+
* unknown symbol never gains a percent sign.
|
|
36
|
+
*/
|
|
37
|
+
export declare function indexOtcUnit(symbol: string | undefined | null): IndexOtcUnit;
|
|
38
|
+
/**
|
|
39
|
+
* From this bar width up (one day), the venue's bars are the server's official bars: a day keyed at 00:00 UTC of its
|
|
40
|
+
* trade date, weeks and months rolled up from official days, today's bar rewritten by the server about every 15
|
|
41
|
+
* minutes. Live prints run around the clock on most of the instruments, so a bar built from them would hold
|
|
42
|
+
* overnight prices the official bar never has.
|
|
43
|
+
*/
|
|
44
|
+
export declare const INDEX_OTC_SERVER_BUILT_BARS_FROM_MS = 86400000;
|
|
45
|
+
/**
|
|
46
|
+
* Whether bars of `exchange` at this bar width are the server's alone: no live print may create or change one, and
|
|
47
|
+
* the newest bar is read again from the server. True only for the index and yield venue at one day and wider; a
|
|
48
|
+
* missing or non-finite width is false, so an unknown interval keeps today's behaviour.
|
|
49
|
+
*/
|
|
50
|
+
export declare function barsAreServerBuilt(exchange: string | undefined | null, intervalMs: number | undefined | null): boolean;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The index and yield venue: 22 licensed instruments (stock indices, the dollar index, a volatility index and four US
|
|
3
|
+
* Treasury yields) under one exchange. The backend prints each as raw TICKER points and serves its candles as
|
|
4
|
+
* TICKER_AGG (open/high/low/close, no volume), from 1m up; no trades, volume or book exist behind them. The backend
|
|
5
|
+
* owner fixed the name and the number (`INDICES_OTC`, 182, pb-common 12.86.0).
|
|
6
|
+
*
|
|
7
|
+
* A leaf on purpose, with no imports, like quote-perp.leaf: the market-kind table (`marketKind.util`) and the ticker
|
|
8
|
+
* hub (`index-mode.util`) both read it, and web code asks `checkIsIndexOtc` here, never through those two modules,
|
|
9
|
+
* which over a hundred specs mock with partial factories. The symbol set and the unit live here too: the icon
|
|
10
|
+
* resolver and the price text read them on the boot path, so a second leaf would join the boot closure anyway.
|
|
11
|
+
*/
|
|
12
|
+
export const INDEX_OTC_EXCHANGES = ['INDICES_OTC'];
|
|
13
|
+
const INDEX_OTC_EXCHANGES_SET = new Set(INDEX_OTC_EXCHANGES);
|
|
14
|
+
/**
|
|
15
|
+
* The index and yield venue (`INDEX_OTC_EXCHANGES`), the `'marketIndex'` market kind. Case-insensitive like the kind
|
|
16
|
+
* table, and a foreign shape (a persisted object, a number) is no venue, never a throw.
|
|
17
|
+
*/
|
|
18
|
+
export function checkIsIndexOtc(exchange) {
|
|
19
|
+
return typeof exchange === 'string' && INDEX_OTC_EXCHANGES_SET.has(exchange.toUpperCase());
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The words of the refusal a read of the venue gets while its release flag is off for the session
|
|
23
|
+
* (workers/series/unreleased-venues builds it; the main fetch reads it to ask again once the flag is on).
|
|
24
|
+
*/
|
|
25
|
+
export const INDEX_OTC_UNRELEASED_REFUSAL = 'is not released for this session';
|
|
26
|
+
/**
|
|
27
|
+
* Our own names for the 22 instruments. The vendor's tickers and the index owners' names never reach the UI; display
|
|
28
|
+
* names come from the backend directory.
|
|
29
|
+
*/
|
|
30
|
+
export const INDEX_OTC_SYMBOLS = [
|
|
31
|
+
'US500',
|
|
32
|
+
'US100',
|
|
33
|
+
'US30',
|
|
34
|
+
'US2000',
|
|
35
|
+
'UK100',
|
|
36
|
+
'DE40',
|
|
37
|
+
'EU50',
|
|
38
|
+
'FR40',
|
|
39
|
+
'IT40',
|
|
40
|
+
'ES35',
|
|
41
|
+
'NL30',
|
|
42
|
+
'CH20',
|
|
43
|
+
'JP225',
|
|
44
|
+
'HK50',
|
|
45
|
+
'AU200',
|
|
46
|
+
'IN50',
|
|
47
|
+
'DXY',
|
|
48
|
+
'VIX',
|
|
49
|
+
'US02Y',
|
|
50
|
+
'US05Y',
|
|
51
|
+
'US10Y',
|
|
52
|
+
'US30Y',
|
|
53
|
+
];
|
|
54
|
+
/** The US Treasury yields: their values are percent, every other instrument is points with no currency sign. */
|
|
55
|
+
export const INDEX_OTC_PERCENT_SYMBOLS = ['US02Y', 'US05Y', 'US10Y', 'US30Y'];
|
|
56
|
+
const INDEX_OTC_SYMBOLS_SET = new Set(INDEX_OTC_SYMBOLS);
|
|
57
|
+
const INDEX_OTC_PERCENT_SYMBOLS_SET = new Set(INDEX_OTC_PERCENT_SYMBOLS);
|
|
58
|
+
/** One of our 22 instrument names (`INDEX_OTC_SYMBOLS`). Case-insensitive; a foreign shape is false. */
|
|
59
|
+
export function isIndexOtcSymbol(symbol) {
|
|
60
|
+
return typeof symbol === 'string' && INDEX_OTC_SYMBOLS_SET.has(symbol.toUpperCase());
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The unit an instrument's value is in. Case-insensitive; anything that is not a yield reads `'points'`, so an
|
|
64
|
+
* unknown symbol never gains a percent sign.
|
|
65
|
+
*/
|
|
66
|
+
export function indexOtcUnit(symbol) {
|
|
67
|
+
return typeof symbol === 'string' && INDEX_OTC_PERCENT_SYMBOLS_SET.has(symbol.toUpperCase()) ? 'percent' : 'points';
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* From this bar width up (one day), the venue's bars are the server's official bars: a day keyed at 00:00 UTC of its
|
|
71
|
+
* trade date, weeks and months rolled up from official days, today's bar rewritten by the server about every 15
|
|
72
|
+
* minutes. Live prints run around the clock on most of the instruments, so a bar built from them would hold
|
|
73
|
+
* overnight prices the official bar never has.
|
|
74
|
+
*/
|
|
75
|
+
export const INDEX_OTC_SERVER_BUILT_BARS_FROM_MS = 86_400_000;
|
|
76
|
+
/**
|
|
77
|
+
* Whether bars of `exchange` at this bar width are the server's alone: no live print may create or change one, and
|
|
78
|
+
* the newest bar is read again from the server. True only for the index and yield venue at one day and wider; a
|
|
79
|
+
* missing or non-finite width is false, so an unknown interval keeps today's behaviour.
|
|
80
|
+
*/
|
|
81
|
+
export function barsAreServerBuilt(exchange, intervalMs) {
|
|
82
|
+
return (checkIsIndexOtc(exchange) &&
|
|
83
|
+
typeof intervalMs === 'number' &&
|
|
84
|
+
Number.isFinite(intervalMs) &&
|
|
85
|
+
intervalMs >= INDEX_OTC_SERVER_BUILT_BARS_FROM_MS);
|
|
86
|
+
}
|
|
@@ -63,6 +63,12 @@ export const KSCRIPT_RESERVED_PROVENANCE_KEYS = new Set([
|
|
|
63
63
|
// as a plane script and the console marks its output, so a same-named input
|
|
64
64
|
// must never clear it.
|
|
65
65
|
'metaCmeExchange',
|
|
66
|
+
// The pane place (PANES-ANY-SIDE, pane-place.util `panePlace`): where the
|
|
67
|
+
// script's own pane sits (Top, Bottom, Clean, Left, Right). A package param
|
|
68
|
+
// of this name must never move or reshape its own pane, and the place must
|
|
69
|
+
// never save over a same-named input. The control carries it by name
|
|
70
|
+
// through every rebuild (restampPanePlace).
|
|
71
|
+
'panePlace',
|
|
66
72
|
]);
|
|
67
73
|
export function isReservedKScriptProvenanceKey(name) {
|
|
68
74
|
return typeof name === 'string' && KSCRIPT_RESERVED_PROVENANCE_KEYS.has(name);
|
|
@@ -35,6 +35,25 @@ export interface GovernedFuturesScheduleStatus {
|
|
|
35
35
|
/** Closed iff inside the weekend halt (Fri 16:00 -> Sun 17:00) or a Mon-Thu daily halt. */
|
|
36
36
|
export declare function isGovernedFuturesScheduleOpen(nowMs: number): boolean;
|
|
37
37
|
export declare function getGovernedFuturesScheduleStatus(nowMs: number): GovernedFuturesScheduleStatus;
|
|
38
|
+
/**
|
|
39
|
+
* CME moves products onto 24/7 trading one product at a time, not venue-wide:
|
|
40
|
+
* cryptocurrency futures and options (standard + micro, plus the Bitcoin
|
|
41
|
+
* Friday weeklies) since 2026-05-29, the 1-Ounce Gold future since
|
|
42
|
+
* 2026-07-24; the 10-barrel WTI contract is announced for 2026-08-30. Spot-
|
|
43
|
+
* quoted futures are excluded by CME and stay on the weekly cycle. For these
|
|
44
|
+
* roots the Globex cycle above is wrong on its face (the 2026-08-22 report:
|
|
45
|
+
* BTC1! "Closed" on a Saturday while its book streamed): their only scheduled
|
|
46
|
+
* halt is the Saturday 02:00-04:00 CT maintenance window. The weekday
|
|
47
|
+
* 16:00-16:02 CT two-minute window is deliberately ignored: too short to
|
|
48
|
+
* announce, and a "Closed" flash every afternoon would be noise.
|
|
49
|
+
*
|
|
50
|
+
* Static on purpose, like the cycle itself (a constant, not a maintained
|
|
51
|
+
* dataset). Roots were checked against a Saturday L3/book feed before being
|
|
52
|
+
* listed; add a root only with that evidence (the NCI/MCI crypto-index pair is
|
|
53
|
+
* listed on exactly that evidence: order flow on 2026-08-22 13:15Z).
|
|
54
|
+
* The bar-grid parity fixture (src/fixtures/bar-grid-parity/typed-session.json) lists these roots.
|
|
55
|
+
*/
|
|
56
|
+
export declare const CME_ALWAYS_ON_ROOTS: ReadonlySet<string>;
|
|
38
57
|
/** Futures root of a continuous (`BTC1!`), monthly (`BTCQ6`, `1OZV6`) or
|
|
39
58
|
* weekly (`BFFQ628`) CME symbol; null when the symbol has no such shape. */
|
|
40
59
|
export declare function cmeFuturesRootOf(symbol: unknown): string | null;
|
|
@@ -153,8 +153,9 @@ export function getGovernedFuturesScheduleStatus(nowMs) {
|
|
|
153
153
|
* dataset). Roots were checked against a Saturday L3/book feed before being
|
|
154
154
|
* listed; add a root only with that evidence (the NCI/MCI crypto-index pair is
|
|
155
155
|
* listed on exactly that evidence: order flow on 2026-08-22 13:15Z).
|
|
156
|
+
* The bar-grid parity fixture (src/fixtures/bar-grid-parity/typed-session.json) lists these roots.
|
|
156
157
|
*/
|
|
157
|
-
const CME_ALWAYS_ON_ROOTS = new Set([
|
|
158
|
+
export const CME_ALWAYS_ON_ROOTS = new Set([
|
|
158
159
|
// Cryptocurrency futures + options: standard and micro, Bitcoin Friday weeklies.
|
|
159
160
|
'BTC',
|
|
160
161
|
'MBT',
|
|
@@ -7,11 +7,13 @@ import { type OmTargetMetadata } from './om-target.util.js';
|
|
|
7
7
|
* prediction markets (`'hip4'`), economic series (`'economic'`: FRED and
|
|
8
8
|
* the ECONOMICS catalog publishers, which the engine still knows as `'fred'`),
|
|
9
9
|
* the crypto-wide indices (`'cryptoIndex'`: CRYPTOCAP's BTC.D, TOTAL, ...)
|
|
10
|
-
*
|
|
11
|
-
* Variational, quote-perp.leaf)
|
|
12
|
-
*
|
|
10
|
+
* the perpetual venues that publish quotes, never trades (`'quotePerp'`:
|
|
11
|
+
* Variational, quote-perp.leaf) and the index and yield venue (`'marketIndex'`:
|
|
12
|
+
* stock indices, the dollar and volatility indices and US Treasury yields,
|
|
13
|
+
* index-otc.leaf). TitanCharts does not know these kinds; anything handed
|
|
14
|
+
* into the engine narrows through `toTitanMarketKind`.
|
|
13
15
|
*/
|
|
14
|
-
export type VenueMarketKind = Exclude<MarketKind, 'fred'> | 'economic' | 'futures' | 'hip4' | 'options' | 'cryptoIndex' | 'quotePerp';
|
|
16
|
+
export type VenueMarketKind = Exclude<MarketKind, 'fred'> | 'economic' | 'futures' | 'hip4' | 'options' | 'cryptoIndex' | 'quotePerp' | 'marketIndex';
|
|
15
17
|
/** Which wire path serves an economic series (see `economicSource`). */
|
|
16
18
|
export type EconomicSource = 'fred' | 'observation';
|
|
17
19
|
/**
|
|
@@ -130,7 +132,10 @@ export declare function checkIsForexCommodityOrFutures(exchange: string | undefi
|
|
|
130
132
|
* price move, every 5 s per coin) onto uniform bars from 1m up, the crypto
|
|
131
133
|
* treatment's own shape, gap policy included. `'quotePerp'` maps to
|
|
132
134
|
* `'crypto'` too: its perpetuals quote around the clock onto uniform minute
|
|
133
|
-
* bars.
|
|
135
|
+
* bars. `'marketIndex'` maps to `'forex'`: its instruments quote in
|
|
136
|
+
* sessions with closes and weekends onto irregular bars, the forex treatment's
|
|
137
|
+
* shape, and the engine has no index kind. FE-internal code always sees the
|
|
138
|
+
* honest venue kind.
|
|
134
139
|
*/
|
|
135
140
|
export declare function toTitanMarketKind(kind: VenueMarketKind): MarketKind;
|
|
136
141
|
export declare function venueOmitsVolumeOverlay(exchange: string | undefined | null, symbol?: string | null): boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { MARKET_CAPABILITIES, ONCHAIN_POOL_CAPABILITIES, } from '../../constants/marketCapabilities.constants.js';
|
|
1
|
+
import { MARKET_CAPABILITIES, NO_ORDERBOOK_EXCHANGES, ONCHAIN_POOL_CAPABILITIES, } from '../../constants/marketCapabilities.constants.js';
|
|
2
2
|
import { isBlkExchange } from '../blk-market.util.js';
|
|
3
3
|
import { ECONOMIC_EXCHANGES, FRED_EXCHANGE, PUBLISHER_ONLY_EXCHANGES } from '../../constants/economic.constants.js';
|
|
4
4
|
import { CRYPTO_INDEX_EXCHANGES } from './crypto-index.leaf.js';
|
|
5
5
|
import { QUOTE_PERP_EXCHANGES } from './quote-perp.leaf.js';
|
|
6
|
+
import { INDEX_OTC_EXCHANGES } from './index-otc.leaf.js';
|
|
6
7
|
import { isCmeGoverned, normalizeExchangeCode } from './cme-realtime.util.js';
|
|
7
8
|
import { isGovernedPlaneExchange } from '../v2/gate-plane.util.js';
|
|
8
9
|
import { isOmTargetPane } from './om-target.util.js';
|
|
@@ -93,6 +94,11 @@ const EXCHANGE_TO_KIND = {
|
|
|
93
94
|
// (quote-perp.leaf owns the list). Unlisted, they read as crypto and ask for
|
|
94
95
|
// trades the gateway never serves them.
|
|
95
96
|
...Object.fromEntries(QUOTE_PERP_EXCHANGES.map((code) => [code, 'quotePerp'])),
|
|
97
|
+
// Stock indices, the dollar and volatility indices and US Treasury yields:
|
|
98
|
+
// TICKER candles and prints with market closes and weekends, no trades,
|
|
99
|
+
// volume or book (index-otc.leaf owns the list). Unlisted, they read as
|
|
100
|
+
// crypto and ask for trades the gateway never serves them.
|
|
101
|
+
...Object.fromEntries(INDEX_OTC_EXCHANGES.map((code) => [code, 'marketIndex'])),
|
|
96
102
|
// Polymarket
|
|
97
103
|
POLYMARKET: 'polymarket',
|
|
98
104
|
// Hip3 (Hyperliquid synthetic derivatives)
|
|
@@ -205,7 +211,14 @@ export function isSessionBoundMarketKind(exchange) {
|
|
|
205
211
|
/** Kind-level form of the session-bound split, for call sites that already
|
|
206
212
|
* hold a resolved `VenueMarketKind` (one set, never re-declared). */
|
|
207
213
|
export function isSessionBoundKind(kind) {
|
|
208
|
-
|
|
214
|
+
// The index and yield venue closes like forex (market closes, weekends), so
|
|
215
|
+
// an old cached bar there is the market's current state too.
|
|
216
|
+
return (kind === 'futures' ||
|
|
217
|
+
kind === 'options' ||
|
|
218
|
+
kind === 'commodity' ||
|
|
219
|
+
kind === 'tradfi' ||
|
|
220
|
+
kind === 'forex' ||
|
|
221
|
+
kind === 'marketIndex');
|
|
209
222
|
}
|
|
210
223
|
/**
|
|
211
224
|
* Venues that trade around the clock (crypto spot and perps, on-chain pools,
|
|
@@ -220,6 +233,16 @@ export function isContinuousTradingKind(kind) {
|
|
|
220
233
|
export function isContinuousTradingVenue(exchange) {
|
|
221
234
|
return isContinuousTradingKind(getMarketKind(exchange));
|
|
222
235
|
}
|
|
236
|
+
// One bookless copy per kind's capabilities, so a caller comparing by identity sees a stable object.
|
|
237
|
+
const booklessCapabilities = new Map();
|
|
238
|
+
function withoutOrderbook(capabilities) {
|
|
239
|
+
let bookless = booklessCapabilities.get(capabilities);
|
|
240
|
+
if (!bookless) {
|
|
241
|
+
bookless = { ...capabilities, supportsOrderbook: false };
|
|
242
|
+
booklessCapabilities.set(capabilities, bookless);
|
|
243
|
+
}
|
|
244
|
+
return bookless;
|
|
245
|
+
}
|
|
223
246
|
export function getCapabilities(exchange) {
|
|
224
247
|
// On-chain pools keep the crypto kind (every kind-keyed path treats them as
|
|
225
248
|
// crypto) but not its book and profile surfaces: blk serves neither.
|
|
@@ -227,7 +250,13 @@ export function getCapabilities(exchange) {
|
|
|
227
250
|
return ONCHAIN_POOL_CAPABILITIES;
|
|
228
251
|
// The registry carries every VenueMarketKind (its 'futures' entry IS
|
|
229
252
|
// CME_FUTURES_CAPABILITIES), so the kind lookup needs no special case.
|
|
230
|
-
|
|
253
|
+
const capabilities = MARKET_CAPABILITIES[getMarketKind(exchange)];
|
|
254
|
+
// An exchange on the no-book list keeps its kind and every other surface.
|
|
255
|
+
const code = normalizeExchangeCode(exchange);
|
|
256
|
+
if (capabilities.supportsOrderbook && code !== null && NO_ORDERBOOK_EXCHANGES.includes(code)) {
|
|
257
|
+
return withoutOrderbook(capabilities);
|
|
258
|
+
}
|
|
259
|
+
return capabilities;
|
|
231
260
|
}
|
|
232
261
|
/**
|
|
233
262
|
* Whether an interval switch must re-run every mounted indicator's
|
|
@@ -300,7 +329,10 @@ export function checkIsForexCommodityOrFutures(exchange) {
|
|
|
300
329
|
* price move, every 5 s per coin) onto uniform bars from 1m up, the crypto
|
|
301
330
|
* treatment's own shape, gap policy included. `'quotePerp'` maps to
|
|
302
331
|
* `'crypto'` too: its perpetuals quote around the clock onto uniform minute
|
|
303
|
-
* bars.
|
|
332
|
+
* bars. `'marketIndex'` maps to `'forex'`: its instruments quote in
|
|
333
|
+
* sessions with closes and weekends onto irregular bars, the forex treatment's
|
|
334
|
+
* shape, and the engine has no index kind. FE-internal code always sees the
|
|
335
|
+
* honest venue kind.
|
|
304
336
|
*/
|
|
305
337
|
export function toTitanMarketKind(kind) {
|
|
306
338
|
if (kind === 'futures' || kind === 'options')
|
|
@@ -311,6 +343,8 @@ export function toTitanMarketKind(kind) {
|
|
|
311
343
|
return 'fred';
|
|
312
344
|
if (kind === 'cryptoIndex' || kind === 'quotePerp')
|
|
313
345
|
return 'crypto';
|
|
346
|
+
if (kind === 'marketIndex')
|
|
347
|
+
return 'forex';
|
|
314
348
|
return kind;
|
|
315
349
|
}
|
|
316
350
|
export function venueOmitsVolumeOverlay(exchange, symbol) {
|
|
@@ -319,7 +353,7 @@ export function venueOmitsVolumeOverlay(exchange, symbol) {
|
|
|
319
353
|
if (checkIsEconomic(exchange) || checkIsForexOrCommodity(exchange))
|
|
320
354
|
return true;
|
|
321
355
|
const kind = getMarketKind(exchange);
|
|
322
|
-
return kind === 'cryptoIndex' || kind === 'quotePerp';
|
|
356
|
+
return kind === 'cryptoIndex' || kind === 'quotePerp' || kind === 'marketIndex';
|
|
323
357
|
}
|
|
324
358
|
export function checkIsDex(exchange) {
|
|
325
359
|
return getMarketKind(exchange) === 'dex';
|
|
@@ -69,6 +69,7 @@ export interface BaseOhlcvPayload {
|
|
|
69
69
|
sided?: boolean;
|
|
70
70
|
category?: number;
|
|
71
71
|
typedFold?: TypedFoldAsk;
|
|
72
|
+
typedHistory?: 'server';
|
|
72
73
|
}
|
|
73
74
|
/** The fold a custom size the app builds asks of the worker: types only, so the boot path carries none of it. */
|
|
74
75
|
export interface TypedFoldAsk {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The chart-level reading of "these bars are the server's" (`barsAreServerBuilt` in index-otc.leaf): a chart's bars
|
|
3
|
+
* are server-built when its own venue is, or when any leg of its series formula is. A formula chart names only its
|
|
4
|
+
* first leg in `exchange`, and one leg with overnight prints is enough to put overnight prices into the formula's
|
|
5
|
+
* daily bar, so every door that decides for a whole chart (the main live fold, the poll, replay) asks here.
|
|
6
|
+
*
|
|
7
|
+
* The legs are walked by `transformationsTouchVenue`, the same walk the fetch path and the licence doors use, so a
|
|
8
|
+
* leg the chart loads is a leg this sees.
|
|
9
|
+
*/
|
|
10
|
+
import { transformationsTouchVenue } from '../common/transformations.util.js';
|
|
11
|
+
import { barsAreServerBuilt } from './index-otc.leaf.js';
|
|
12
|
+
export function chartBarsAreServerBuilt(market, intervalMs) {
|
|
13
|
+
if (!market)
|
|
14
|
+
return false;
|
|
15
|
+
if (barsAreServerBuilt(market.exchange, intervalMs))
|
|
16
|
+
return true;
|
|
17
|
+
return transformationsTouchVenue(market.transformations, (exchange) => barsAreServerBuilt(exchange, intervalMs));
|
|
18
|
+
}
|
|
@@ -8,6 +8,9 @@ export function assetClassForMarketKind(kind) {
|
|
|
8
8
|
case 'futures':
|
|
9
9
|
case 'commodity':
|
|
10
10
|
case 'forex':
|
|
11
|
+
case 'marketIndex':
|
|
12
|
+
// Index and yield charts move on the same macro calendar as forex, so they take its bucket; the default arm
|
|
13
|
+
// would file them under crypto.
|
|
11
14
|
return 'cme';
|
|
12
15
|
case 'tradfi':
|
|
13
16
|
return 'tradfi';
|
|
@@ -387,6 +387,8 @@ export function normalizeRuntimeDiagnostics(value, options = {}) {
|
|
|
387
387
|
...(raw.opra === true ? { opra: true } : {}),
|
|
388
388
|
// The CME mark (computed over CME data) the same way.
|
|
389
389
|
...(raw.cme === true ? { cme: true } : {}),
|
|
390
|
+
// The index and yield venue's mark (computed over its display-only data) the same way.
|
|
391
|
+
...(raw.indexOtc === true ? { indexOtc: true } : {}),
|
|
390
392
|
},
|
|
391
393
|
];
|
|
392
394
|
});
|
|
@@ -35,6 +35,7 @@ export const AggregationInterval = numericEnum({
|
|
|
35
35
|
FIFTEEN_SECONDS: 23,
|
|
36
36
|
THIRTY_SECONDS: 24,
|
|
37
37
|
HALF_YEAR: 25,
|
|
38
|
+
CUSTOM: 26,
|
|
38
39
|
});
|
|
39
40
|
export const AssetClass = numericEnum({
|
|
40
41
|
UNKNOWN_ASSET_CLASS: 0,
|
|
@@ -210,6 +211,7 @@ export const Exchange = numericEnum({
|
|
|
210
211
|
VARIATIONAL_SWAP: 179,
|
|
211
212
|
FRED: 180,
|
|
212
213
|
CFTC: 181,
|
|
214
|
+
INDICES_OTC: 182,
|
|
213
215
|
});
|
|
214
216
|
export const Representation = numericEnum({
|
|
215
217
|
UNKNOWN_REPRESENTATION: 0,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { WrunRowLaneDescriptor } from '../wrun-row-lane.types.js';
|
|
2
2
|
/** f64s per print: `[offset_ms, price, size, usd, side, present]`. */
|
|
3
3
|
export declare const WRUN_DARK_POOL_WIDTH = 6;
|
|
4
|
-
/** How far back the source holds prints (the
|
|
4
|
+
/** How far back the source holds prints (the 90 day large table's reach less a one-day margin, 89 days, equal to
|
|
5
|
+
* `DARK_POOL_LARGE_REACH_MS`): the lane's one horizon. */
|
|
5
6
|
export declare const WRUN_DARK_POOL_HORIZON_MS: number;
|
|
6
7
|
/** The overflow words, the default first. */
|
|
7
8
|
export declare const WRUN_DARK_POOL_OVERFLOW: readonly string[];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* - `governed: 'stocks'`: the identity and the own fetch read the chart port (wrun-dark-pool.util, loaded inside them):
|
|
6
6
|
* refused by name off a US stock tape market, on a tape the venue policy closes to the run, and on Price only, before
|
|
7
7
|
* any fetch.
|
|
8
|
-
* - Horizon: `WRUN_DARK_POOL_HORIZON_MS` (the
|
|
8
|
+
* - Horizon: `WRUN_DARK_POOL_HORIZON_MS` (the large table's 89 days); older bars and a capped day's bars are served in part.
|
|
9
9
|
* - Knobs: `max_cells` and `overflow` ("refuse" | "largest": the most dollars). No floor knob. Live: the poll reconcile.
|
|
10
10
|
* docs/features/data/us-stocks-tape.md, "Dark pool prints on the chart". LIGHT at module load.
|
|
11
11
|
*/
|
|
@@ -16,8 +16,9 @@ export const WRUN_DARK_POOL_WIDTH = 6;
|
|
|
16
16
|
const OFFSET = 0;
|
|
17
17
|
const USD = 3;
|
|
18
18
|
const PRESENT = 5;
|
|
19
|
-
/** How far back the source holds prints (the
|
|
20
|
-
|
|
19
|
+
/** How far back the source holds prints (the 90 day large table's reach less a one-day margin, 89 days, equal to
|
|
20
|
+
* `DARK_POOL_LARGE_REACH_MS`): the lane's one horizon. */
|
|
21
|
+
export const WRUN_DARK_POOL_HORIZON_MS = 89 * 86_400_000;
|
|
21
22
|
/** The overflow words, the default first. */
|
|
22
23
|
export const WRUN_DARK_POOL_OVERFLOW = Object.freeze(['refuse', 'largest']);
|
|
23
24
|
const isTuple = (cell) => Array.isArray(cell) && cell.length === WRUN_DARK_POOL_WIDTH && cell.every((value) => Number.isFinite(value));
|
|
@@ -258,8 +258,12 @@ export declare function wrunBatchedMarksLevelOf(tc: unknown): number;
|
|
|
258
258
|
* on an engine without that release's `flags` renderer is refused by name ("Needs a newer chart"), as an unknown
|
|
259
259
|
* look is by the layout gate, never drawn as another look. So is one that needs the Big Trades looks round's engine
|
|
260
260
|
* (look 5 Glass, look 6 Solid, or the size beside the mark, `text.place` 1) on an engine whose marks pack reads below
|
|
261
|
-
* level 2 (`marksLevel`, `wrunBatchedMarksLevelOf`; 0 when the caller passes none)
|
|
262
|
-
*
|
|
261
|
+
* level 2 (`marksLevel`, `wrunBatchedMarksLevelOf`; 0 when the caller passes none), and one whose size is written
|
|
262
|
+
* inside the mark where it fits (`text.place` 2, `fit`, the size inside round) on one below level 3, and one whose
|
|
263
|
+
* size may be written rounded inside the mark (`text.place` 3 `fit_short` or 4 `fit_only`, the four size positions
|
|
264
|
+
* round) on one below level 4: that engine would draw it as the old inside text with no warning. The newest need is
|
|
265
|
+
* named first. A flags child is never judged here: the gate already asked the engine for its kind. The reason is
|
|
266
|
+
* diagnostic text, never copy.
|
|
263
267
|
*/
|
|
264
268
|
export declare function wrunBatchedEngineVerdict(child: Pick<WrunBatchedChildOverlay, 'kind' | 'settings'>, hasPlotRenderer: (type: string) => boolean, marksLevel?: number): string | null;
|
|
265
269
|
export interface WrunBatchedChildConfig {
|
|
@@ -372,10 +372,17 @@ const DIAMOND_LOOK = MARK_LOOKS.indexOf('diamond');
|
|
|
372
372
|
const GLASS_LOOK = MARK_LOOKS.indexOf('glass');
|
|
373
373
|
const SOLID_LOOK = MARK_LOOKS.indexOf('solid');
|
|
374
374
|
const MARK_TEXT_MODES = ['off', 'largest', 'all'];
|
|
375
|
-
/** Where a mark's size is written (`text.place
|
|
376
|
-
*
|
|
377
|
-
|
|
375
|
+
/** Where a mark's size is written (`text.place`): 0 inside the mark (today's drawing), 1 beside it (the Big Trades
|
|
376
|
+
* looks round), 2 `fit`, inside the mark where the full number fits, else beside it (the Big Trades size inside
|
|
377
|
+
* round), 3 `fit_short`, as `fit` but rounded inside when only the rounded number fits ("$21M" for "$20.5M"), and
|
|
378
|
+
* 4 `fit_only`, as `fit_short` but never beside: a mark too small even for the rounded number shows none (the Big
|
|
379
|
+
* Trades four size positions round). */
|
|
380
|
+
const MARK_TEXT_PLACES = ['inside', 'beside', 'fit', 'fit_short', 'fit_only'];
|
|
381
|
+
/** Places an older engine does not draw as declared, so the mount refuses them by name (`wrunBatchedEngineVerdict`). */
|
|
378
382
|
const BESIDE_PLACE = MARK_TEXT_PLACES.indexOf('beside');
|
|
383
|
+
const FIT_PLACE = MARK_TEXT_PLACES.indexOf('fit');
|
|
384
|
+
const FIT_SHORT_PLACE = MARK_TEXT_PLACES.indexOf('fit_short');
|
|
385
|
+
const FIT_ONLY_PLACE = MARK_TEXT_PLACES.indexOf('fit_only');
|
|
379
386
|
const MARK_X_WORDS = ['bar', 'offset'];
|
|
380
387
|
/** The size laws: sqrt and linear, and log (the dark pool round's, with the `min_px` / `max_px` bounds). */
|
|
381
388
|
const MARK_SIZE_LAWS = ['sqrt', 'linear', 'log'];
|
|
@@ -628,7 +635,9 @@ function markCaptionFloorPx(declaredPx, scale) {
|
|
|
628
635
|
* `max_px` bounds when declared, `markSizeOf`), `x` 0..1
|
|
629
636
|
* (Candle center, Trade time), `opacity_pct` 10..80, the caption (`text.mode` 0 Off, 1 Big
|
|
630
637
|
* bubbles, 2 All; its format, a word of the one list, the smallest bubble that holds one: declared
|
|
631
|
-
* at the default Bubble size, handed scaled to this one; and `place`, 0 inside the mark
|
|
638
|
+
* at the default Bubble size, handed scaled to this one; and `place`, 0 inside the mark, 1 beside it, 2 `fit`,
|
|
639
|
+
* inside where it fits, else beside, 3 `fit_short`, as `fit` with the rounded number inside when only it fits, or
|
|
640
|
+
* 4 `fit_only`, as `fit_short` but never beside). A key
|
|
632
641
|
* left out, or an option that is none of its values (look, x, law, the caption's mode, format and place),
|
|
633
642
|
* takes the kit's default (LOOK_DEFAULTS.marks); a number past its range is clamped. The market's
|
|
634
643
|
* dollar unit (`valuePerUnit`, proven: finite and above zero) rides at the top for the `units`
|
|
@@ -899,6 +908,13 @@ const DIAMOND_ENGINE_PLOT = 'flags';
|
|
|
899
908
|
/** The marks pack level that draws Glass (look 5), Solid (look 6) and the size beside the mark (`text.place` 1):
|
|
900
909
|
* the engine's batchedMarks pack sets `packHooks.batchedMarksLevel` to it; an older engine leaves it absent. */
|
|
901
910
|
const BIG_TRADES_LOOKS_LEVEL = 2;
|
|
911
|
+
/** The marks pack level that also draws the size inside the mark where it fits, else beside it (`text.place` 2,
|
|
912
|
+
* `fit`): the Big Trades size inside round's engine sets `packHooks.batchedMarksLevel` to 3. */
|
|
913
|
+
const SIZE_FIT_LEVEL = 3;
|
|
914
|
+
/** The marks pack level that also draws the rounded size inside the mark when only the rounded number fits
|
|
915
|
+
* (`text.place` 3, `fit_short`, else beside) and the size inside or not at all (`text.place` 4, `fit_only`): the Big
|
|
916
|
+
* Trades four size positions round's engine sets `packHooks.batchedMarksLevel` to 4. */
|
|
917
|
+
const SIZE_SHORT_LEVEL = 4;
|
|
902
918
|
/** The batched marks level a chart's engine draws (`tc.packHooks.batchedMarksLevel`, set by its batchedMarks pack):
|
|
903
919
|
* 0 when the chart carries none (an engine before the Big Trades looks round). */
|
|
904
920
|
export function wrunBatchedMarksLevelOf(tc) {
|
|
@@ -913,13 +929,28 @@ export function wrunBatchedMarksLevelOf(tc) {
|
|
|
913
929
|
* on an engine without that release's `flags` renderer is refused by name ("Needs a newer chart"), as an unknown
|
|
914
930
|
* look is by the layout gate, never drawn as another look. So is one that needs the Big Trades looks round's engine
|
|
915
931
|
* (look 5 Glass, look 6 Solid, or the size beside the mark, `text.place` 1) on an engine whose marks pack reads below
|
|
916
|
-
* level 2 (`marksLevel`, `wrunBatchedMarksLevelOf`; 0 when the caller passes none)
|
|
917
|
-
*
|
|
932
|
+
* level 2 (`marksLevel`, `wrunBatchedMarksLevelOf`; 0 when the caller passes none), and one whose size is written
|
|
933
|
+
* inside the mark where it fits (`text.place` 2, `fit`, the size inside round) on one below level 3, and one whose
|
|
934
|
+
* size may be written rounded inside the mark (`text.place` 3 `fit_short` or 4 `fit_only`, the four size positions
|
|
935
|
+
* round) on one below level 4: that engine would draw it as the old inside text with no warning. The newest need is
|
|
936
|
+
* named first. A flags child is never judged here: the gate already asked the engine for its kind. The reason is
|
|
937
|
+
* diagnostic text, never copy.
|
|
918
938
|
*/
|
|
919
939
|
export function wrunBatchedEngineVerdict(child, hasPlotRenderer, marksLevel = 0) {
|
|
920
940
|
if (child.kind !== 'marks')
|
|
921
941
|
return null;
|
|
922
942
|
const text = isRecord(child.settings.text) ? child.settings.text : {};
|
|
943
|
+
const shortNeed = text.place === FIT_SHORT_PLACE
|
|
944
|
+
? 'text.place 3 (fit_short)'
|
|
945
|
+
: text.place === FIT_ONLY_PLACE
|
|
946
|
+
? 'text.place 4 (fit_only)'
|
|
947
|
+
: null;
|
|
948
|
+
if (shortNeed !== null && marksLevel < SIZE_SHORT_LEVEL) {
|
|
949
|
+
return `${shortNeed} needs the chart engine whose marks pack draws level ${SIZE_SHORT_LEVEL}`;
|
|
950
|
+
}
|
|
951
|
+
if (text.place === FIT_PLACE && marksLevel < SIZE_FIT_LEVEL) {
|
|
952
|
+
return `text.place 2 (fit) needs the chart engine whose marks pack draws level ${SIZE_FIT_LEVEL}`;
|
|
953
|
+
}
|
|
923
954
|
const looksNeed = child.settings.look === GLASS_LOOK
|
|
924
955
|
? 'look 5 (glass)'
|
|
925
956
|
: child.settings.look === SOLID_LOOK
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
* (CME_ROOT_SPECS), an economic venue 6. A crypto venue settles
|
|
24
24
|
* no kind on its own (it lists stock, ETF and metal perpetuals
|
|
25
25
|
* too), so a coin there reads 1 once the row answers, 0 before.
|
|
26
|
-
* point_value the CME contract's point value (CME_ROOT_SPECS
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* point_value the CME contract's point value (CME_ROOT_SPECS: US
|
|
27
|
+
* dollars per whole point of the quoted price on every
|
|
28
|
+
* root, ZC 50 for a cent of corn; 0 for a root off the
|
|
29
|
+
* table and for an option contract); 0 on ICE and
|
|
29
30
|
* PLATTS, whose multipliers the chart does not hold; 1 on every
|
|
30
31
|
* other market the chart serves, all priced per unit (spot,
|
|
31
32
|
* perpetuals, stocks, ETFs, forex, indices, metals, prediction
|
|
@@ -114,6 +115,11 @@ export interface WrunMarketDirectoryRow {
|
|
|
114
115
|
coin?: unknown;
|
|
115
116
|
underlyingSymbol?: unknown;
|
|
116
117
|
}
|
|
118
|
+
/** om `packages/cli/src/shared/session-venues.ts` CME_FAMILY_EXCHANGES (the
|
|
119
|
+
* chart's governed codes, isCmeGoverned, are all in it). Exported read-only for
|
|
120
|
+
* the point value golden (src/fixtures/wrun-cme-point-values/golden.json), which
|
|
121
|
+
* states the venues a CME root's point value answers on. */
|
|
122
|
+
export declare const CME_FAMILY_EXCHANGES: ReadonlySet<string>;
|
|
117
123
|
export { CME_ROOT_SPECS, type CmeRootSpec } from './wrun-cme-root-specs.util.js';
|
|
118
124
|
/** The CME Group exchange a futures root lists on (`CME_ROOT_SPECS`), or undefined for a root off the table. */
|
|
119
125
|
export declare function wrunCmeRootExchange(root: string): CmeExchangeDto | undefined;
|
|
@@ -137,8 +143,8 @@ export declare const WRUN_DOLLAR_MULTIPLIER_UNPROVEN_CODE = "wrun_dollar_multipl
|
|
|
137
143
|
* chart's own exchange and the venue table:
|
|
138
144
|
*
|
|
139
145
|
* CME a CME-governed chart reads the chain of its own root: the root's point value (CME_ROOT_SPECS, ES 50,
|
|
140
|
-
* NQ 20) when the root is
|
|
141
|
-
* grain
|
|
146
|
+
* NQ 20) when the root is priced in US dollars (wrunCmeRootDollarPointValue); a root off the table, or a
|
|
147
|
+
* CBOT grain (priced in US cents, kept off the dollar features), is 0.
|
|
142
148
|
* OPRA a chart whose options list on OPRA (the venue table over the options seam's market, `optionsExchange`
|
|
143
149
|
* else the chart's own: an OPRA contract chart, a US stock or ETF chart, a stock twin while the opra flag
|
|
144
150
|
* is lit): 100.
|
|
@@ -345,8 +351,9 @@ export declare function wrunStrategyPointValue(market: WrunFactsMarket | undefin
|
|
|
345
351
|
* ours or a venue list:
|
|
346
352
|
*
|
|
347
353
|
* pointValue the US dollars one whole point of price is worth on one contract of a point-valued product: every CME
|
|
348
|
-
* Group future (ES 50, 6A 100,000, ZN 1,000, and per US cent on the cents-
|
|
349
|
-
* 600), the number the large-print writer prices the table's copies
|
|
354
|
+
* Group future (ES 50, 6A 100,000, ZN 1,000, and per US cent on the cents-priced grains: ZC 50, ZL
|
|
355
|
+
* 600, the same numbers as CME_ROOT_SPECS), the number the large-print writer prices the table's copies
|
|
356
|
+
* with; null elsewhere. A
|
|
350
357
|
* point-valued product's stored amount is contracts and live-feed never multiplies it, so its COIN arm
|
|
351
358
|
* is contracts too.
|
|
352
359
|
* quote the quote asset its normalized symbol names (`BTC-USDT` quotes USDT).
|
|
@@ -405,7 +412,7 @@ export type WrunMarketDollarUnit = {
|
|
|
405
412
|
*
|
|
406
413
|
* - A CME Group contract counts contracts on the COIN arm (live-feed never multiplies a point-valued product), so its
|
|
407
414
|
* unit is the instrument registry's point value, in US dollars per point (`warmWrunMarketTradeUnits`: ES 50, 6A
|
|
408
|
-
* 100,000, a cents-
|
|
415
|
+
* 100,000, a cents-priced grain per cent, ZC 50 and ZL 600), the number the large-print writer prices the table's
|
|
409
416
|
* copies with. An option contract, or a contract the registry holds no point value for, cannot be priced.
|
|
410
417
|
* - Every other market counts its base asset on the COIN arm (live-feed applied each instrument's contract multiplier
|
|
411
418
|
* and its inverse flag), so its unit is the market facts' point value (1, `market.point_value()`; 0 on ICE and
|