@tradecanvas/commons 1.48.0 → 1.49.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.
@@ -10,7 +10,9 @@ export interface MarketConfig {
10
10
  exchange?: StockExchange;
11
11
  currency?: string;
12
12
  pricePrecision?: number;
13
+ /** The board lot (100 shares on HOSE): the widget's order ticket asks for whole lots above one. */
13
14
  volumeUnit?: number;
15
+ /** The smallest price move, and the step below the first of `priceSteps`. */
14
16
  priceStep?: number;
15
17
  /**
16
18
  * Steps that depend on the price, lowest band first (HOSE: 10, 50 or 100
@@ -21,18 +23,26 @@ export interface MarketConfig {
21
23
  timeZone?: string;
22
24
  /** Currency per point of a futures contract (VN30F: 100,000 dong). */
23
25
  contractMultiplier?: number;
26
+ /** The day's ceiling and floor, a percentage either side of the reference price. */
24
27
  priceLimits?: {
25
28
  enabled: boolean;
29
+ /** How far above the reference price the ceiling is, % (7 on HOSE). */
26
30
  ceilingPercent?: number;
31
+ /** How far below the reference price the floor is, % (7 on HOSE). */
27
32
  floorPercent?: number;
33
+ /** The price the limits are counted from, the last session's close; `chart.setPriceLimits(price)` sets it. */
28
34
  referencePrice?: number;
29
35
  };
36
+ /** The day's sessions, their times in the exchange's `timeZone`. */
30
37
  sessions?: TradingSession[];
38
+ /** The colours of rising, falling and unchanged prices, and of the ceiling, floor and reference price. */
31
39
  colorScheme?: MarketColorScheme;
32
40
  }
33
41
  export interface TradingSession {
34
42
  name: string;
43
+ /** When it starts, `'HH:mm'` (`'09:00'`), in the zone `getCurrentSession` is given: the market's `timeZone`. */
35
44
  startTime: string;
45
+ /** When it ends, `'HH:mm'` (`'11:30'`): the first minute no longer in it. */
36
46
  endTime: string;
37
47
  /** `preOpen` / `preClose`: the opening and closing auctions; `postClose`: trading after the close. */
38
48
  type: 'preOpen' | 'continuous' | 'preClose' | 'postClose' | 'closed';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/market/types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