@oanda/labs-currency-power-balance-widget 1.0.62 → 1.0.63

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 (31) hide show
  1. package/CHANGELOG.md +256 -0
  2. package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js +11 -2
  3. package/dist/main/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -1
  4. package/dist/main/gql/getCurrencyPowerBalance.js +1 -1
  5. package/dist/main/gql/getCurrencyPowerBalance.js.map +1 -1
  6. package/dist/main/gql/types/gql.js +1 -1
  7. package/dist/main/gql/types/gql.js.map +1 -1
  8. package/dist/main/gql/types/graphql.js +43 -1
  9. package/dist/main/gql/types/graphql.js.map +1 -1
  10. package/dist/main/translations/sources/en.json +2 -0
  11. package/dist/main/translations/sources/zh_TW.json +2 -0
  12. package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js +12 -3
  13. package/dist/module/CurrencyPowerBalanceWidget/ChartWithData.js.map +1 -1
  14. package/dist/module/gql/getCurrencyPowerBalance.js +1 -1
  15. package/dist/module/gql/getCurrencyPowerBalance.js.map +1 -1
  16. package/dist/module/gql/types/gql.js +1 -1
  17. package/dist/module/gql/types/gql.js.map +1 -1
  18. package/dist/module/gql/types/graphql.js +42 -0
  19. package/dist/module/gql/types/graphql.js.map +1 -1
  20. package/dist/module/translations/sources/en.json +2 -0
  21. package/dist/module/translations/sources/zh_TW.json +2 -0
  22. package/dist/types/gql/types/gql.d.ts +2 -2
  23. package/dist/types/gql/types/graphql.d.ts +128 -24
  24. package/package.json +3 -3
  25. package/src/CurrencyPowerBalanceWidget/ChartWithData.tsx +8 -0
  26. package/src/gql/getCurrencyPowerBalance.ts +1 -0
  27. package/src/gql/types/gql.ts +2 -2
  28. package/src/gql/types/graphql.ts +152 -29
  29. package/src/translations/sources/en.json +2 -0
  30. package/src/translations/sources/zh_TW.json +2 -0
  31. package/test/responsesMocks.ts +9 -0
@@ -18,15 +18,47 @@ export type Scalars = {
18
18
 
19
19
  export type AssetClass = {
20
20
  __typename?: 'AssetClass';
21
- instruments?: Maybe<Array<Maybe<Instrument>>>;
22
- name?: Maybe<Scalars['String']['output']>;
21
+ instruments: Array<Instrument>;
22
+ name: Scalars['String']['output'];
23
23
  };
24
24
 
25
+ export enum AssetClassName {
26
+ Commodities = 'COMMODITIES',
27
+ Cryptocurrency = 'CRYPTOCURRENCY',
28
+ Currency = 'CURRENCY',
29
+ EquityShares = 'EQUITY_SHARES',
30
+ Indices = 'INDICES',
31
+ Rates = 'RATES'
32
+ }
33
+
25
34
  export enum BookType {
26
35
  Order = 'ORDER',
27
36
  Position = 'POSITION'
28
37
  }
29
38
 
39
+ export type CorrelationHeatmap = {
40
+ __typename?: 'CorrelationHeatmap';
41
+ baseInstrument: Scalars['String']['output'];
42
+ heatmap: Array<Heatmap>;
43
+ };
44
+
45
+ export type CorrelationMatrix = {
46
+ __typename?: 'CorrelationMatrix';
47
+ baseTimeUnit: CorrelationTimeUnit;
48
+ matrix: Array<Matrix>;
49
+ };
50
+
51
+ export enum CorrelationTimeUnit {
52
+ H1 = 'H1',
53
+ H4 = 'H4',
54
+ H24 = 'H24',
55
+ M1 = 'M1',
56
+ M3 = 'M3',
57
+ M6 = 'M6',
58
+ W1 = 'W1',
59
+ Y1 = 'Y1'
60
+ }
61
+
30
62
  export enum CurrencyName {
31
63
  Aud = 'AUD',
32
64
  Cad = 'CAD',
@@ -49,6 +81,7 @@ export type CurrencyPowerBalance = {
49
81
  __typename?: 'CurrencyPowerBalance';
50
82
  currency: CurrencyName;
51
83
  power: Array<CurrencyPower>;
84
+ updatedAt: Scalars['String']['output'];
52
85
  };
53
86
 
54
87
  export enum CurrencyPowerBalanceTimeUnit {
@@ -62,6 +95,13 @@ export enum CurrencyPowerBalanceTimeUnit {
62
95
  W1 = 'W1'
63
96
  }
64
97
 
98
+ export type CurrencyStrength = {
99
+ __typename?: 'CurrencyStrength';
100
+ currency: CurrencyName;
101
+ strengthRelation?: Maybe<Array<StrengthRelation>>;
102
+ updatedAt: Scalars['String']['output'];
103
+ };
104
+
65
105
  export enum DataSource {
66
106
  Ny4 = 'NY4',
67
107
  Ty3 = 'TY3'
@@ -75,13 +115,32 @@ export enum Division {
75
115
  Oel = 'OEL',
76
116
  Ogm = 'OGM',
77
117
  Oj = 'OJ',
118
+ Ola = 'OLA',
78
119
  Otms = 'OTMS'
79
120
  }
80
121
 
122
+ export type Heatmap = {
123
+ __typename?: 'Heatmap';
124
+ instrument: Scalars['String']['output'];
125
+ timeCorrelation: Array<TimeCorrelation>;
126
+ };
127
+
81
128
  export type Instrument = {
82
129
  __typename?: 'Instrument';
83
- displayName?: Maybe<Scalars['String']['output']>;
84
- name?: Maybe<Scalars['String']['output']>;
130
+ displayName: Scalars['String']['output'];
131
+ name: Scalars['String']['output'];
132
+ };
133
+
134
+ export type InstrumentCorrelation = {
135
+ __typename?: 'InstrumentCorrelation';
136
+ instrument: Scalars['String']['output'];
137
+ value?: Maybe<Scalars['Float']['output']>;
138
+ };
139
+
140
+ export type Matrix = {
141
+ __typename?: 'Matrix';
142
+ instrument: Scalars['String']['output'];
143
+ instrumentCorrelation: Array<InstrumentCorrelation>;
85
144
  };
86
145
 
87
146
  export type OrderPositionBucket = {
@@ -97,7 +156,7 @@ export type OrderPositionData = {
97
156
  buckets: Array<Maybe<OrderPositionBucket>>;
98
157
  dataSource?: Maybe<Scalars['String']['output']>;
99
158
  instrument: Scalars['String']['output'];
100
- price: Scalars['Float']['output'];
159
+ price?: Maybe<Scalars['Float']['output']>;
101
160
  region?: Maybe<Scalars['String']['output']>;
102
161
  time: Scalars['String']['output'];
103
162
  unixTime: Scalars['Int']['output'];
@@ -106,15 +165,20 @@ export type OrderPositionData = {
106
165
  export type Query = {
107
166
  __typename?: 'Query';
108
167
  assetClasses?: Maybe<Array<Maybe<AssetClass>>>;
168
+ correlationHeatmap: CorrelationHeatmap;
169
+ correlationMatrix: CorrelationMatrix;
109
170
  currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;
171
+ currencyStrength?: Maybe<Array<CurrencyStrength>>;
110
172
  orderPositionBooks: Array<Maybe<OrderPositionData>>;
111
173
  sentiment?: Maybe<Array<SentimentInstrument>>;
112
174
  sentimentList?: Maybe<Array<SentimentInstrument>>;
113
175
  topicalInstruments?: Maybe<Array<TopicalInstrument>>;
114
176
  topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;
115
177
  topicalInstrumentsTotalCount: Scalars['Int']['output'];
178
+ valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;
179
+ valueAtRiskChart?: Maybe<ValueAtRiskChart>;
116
180
  volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;
117
- volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;
181
+ volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;
118
182
  };
119
183
 
120
184
 
@@ -123,6 +187,16 @@ export type QueryAssetClassesArgs = {
123
187
  };
124
188
 
125
189
 
190
+ export type QueryCorrelationHeatmapArgs = {
191
+ division: Division;
192
+ };
193
+
194
+
195
+ export type QueryCorrelationMatrixArgs = {
196
+ division: Division;
197
+ };
198
+
199
+
126
200
  export type QueryCurrencyPowerBalanceArgs = {
127
201
  timeUnit: CurrencyPowerBalanceTimeUnit;
128
202
  };
@@ -150,6 +224,7 @@ export type QuerySentimentListArgs = {
150
224
 
151
225
 
152
226
  export type QueryTopicalInstrumentsArgs = {
227
+ assetClass?: InputMaybe<AssetClassName>;
153
228
  count?: InputMaybe<Scalars['Int']['input']>;
154
229
  division?: InputMaybe<Division>;
155
230
  offset?: InputMaybe<Scalars['Int']['input']>;
@@ -164,11 +239,25 @@ export type QueryTopicalInstrumentsChartsArgs = {
164
239
 
165
240
 
166
241
  export type QueryTopicalInstrumentsTotalCountArgs = {
242
+ assetClass?: InputMaybe<AssetClassName>;
167
243
  division?: InputMaybe<Division>;
168
244
  sort: TopicalSort;
169
245
  };
170
246
 
171
247
 
248
+ export type QueryValueAtRiskAssetClassesArgs = {
249
+ division?: InputMaybe<Division>;
250
+ };
251
+
252
+
253
+ export type QueryValueAtRiskChartArgs = {
254
+ bars: ValueAtRiskBars;
255
+ division?: InputMaybe<Division>;
256
+ duration: ValueAtRiskDuration;
257
+ instrument: Scalars['String']['input'];
258
+ };
259
+
260
+
172
261
  export type QueryVolatilityChartArgs = {
173
262
  division?: InputMaybe<Division>;
174
263
  instrument: Scalars['String']['input'];
@@ -198,6 +287,7 @@ export type SentimentInstrument = {
198
287
  displayName: Scalars['String']['output'];
199
288
  name: Scalars['String']['output'];
200
289
  sentiment: Sentiment;
290
+ updatedAt: Scalars['String']['output'];
201
291
  };
202
292
 
203
293
  export enum Sort {
@@ -205,11 +295,24 @@ export enum Sort {
205
295
  Bullish = 'BULLISH'
206
296
  }
207
297
 
298
+ export type StrengthRelation = {
299
+ __typename?: 'StrengthRelation';
300
+ currency: CurrencyName;
301
+ percentage: Scalars['Float']['output'];
302
+ };
303
+
304
+ export type TimeCorrelation = {
305
+ __typename?: 'TimeCorrelation';
306
+ timeUnit: CorrelationTimeUnit;
307
+ value?: Maybe<Scalars['Float']['output']>;
308
+ };
309
+
208
310
  export type TopicalInstrument = {
209
311
  __typename?: 'TopicalInstrument';
312
+ assetClass?: Maybe<AssetClassName>;
210
313
  displayName: Scalars['String']['output'];
211
314
  name: Scalars['String']['output'];
212
- sentiment: TopicalInstrumentSentiment;
315
+ sentiment: Sentiment;
213
316
  updatedAt: Scalars['String']['output'];
214
317
  };
215
318
 
@@ -219,12 +322,6 @@ export type TopicalInstrumentChart = {
219
322
  name: Scalars['String']['output'];
220
323
  };
221
324
 
222
- export type TopicalInstrumentSentiment = {
223
- __typename?: 'TopicalInstrumentSentiment';
224
- longPercent: Scalars['Float']['output'];
225
- shortPercent: Scalars['Float']['output'];
226
- };
227
-
228
325
  export enum TopicalSort {
229
326
  Bearish = 'BEARISH',
230
327
  Bullish = 'BULLISH',
@@ -233,34 +330,60 @@ export enum TopicalSort {
233
330
  Volatile = 'VOLATILE'
234
331
  }
235
332
 
333
+ export enum ValueAtRiskBars {
334
+ C100 = 'C100',
335
+ C200 = 'C200',
336
+ C300 = 'C300'
337
+ }
338
+
339
+ export type ValueAtRiskChart = {
340
+ __typename?: 'ValueAtRiskChart';
341
+ down: ValueAtRiskChartData;
342
+ up: ValueAtRiskChartData;
343
+ };
344
+
345
+ export type ValueAtRiskChartData = {
346
+ __typename?: 'ValueAtRiskChartData';
347
+ average: Scalars['Float']['output'];
348
+ max: Scalars['Float']['output'];
349
+ median: Scalars['Float']['output'];
350
+ points?: Maybe<Array<ValueAtRiskChartPoint>>;
351
+ threshold: Scalars['Float']['output'];
352
+ };
353
+
354
+ export type ValueAtRiskChartPoint = {
355
+ __typename?: 'ValueAtRiskChartPoint';
356
+ percent: Scalars['Float']['output'];
357
+ pips: Scalars['Float']['output'];
358
+ };
359
+
360
+ export enum ValueAtRiskDuration {
361
+ C1 = 'C1',
362
+ C2 = 'C2',
363
+ C3 = 'C3',
364
+ C4 = 'C4',
365
+ C5 = 'C5',
366
+ C10 = 'C10'
367
+ }
368
+
236
369
  export type VolatilityChart = {
237
370
  __typename?: 'VolatilityChart';
238
371
  pips: Scalars['Float']['output'];
239
372
  /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */
240
373
  point: Scalars['String']['output'];
241
- };
242
-
243
- export type VolatilityChartAssetClass = {
244
- __typename?: 'VolatilityChartAssetClass';
245
- instruments: Array<VolatilityChartInstrument>;
246
- name: Scalars['String']['output'];
247
- };
248
-
249
- export type VolatilityChartInstrument = {
250
- __typename?: 'VolatilityChartInstrument';
251
- displayName: Scalars['String']['output'];
252
- name: Scalars['String']['output'];
374
+ updatedAt: Scalars['String']['output'];
253
375
  };
254
376
 
255
377
  export enum VolatilityChartTimeSpan {
378
+ /** Valid for: H */
256
379
  D5 = 'D5',
257
380
  /** Valid for: H */
258
381
  D10 = 'D10',
259
- /** Valid for: H */
382
+ /** Valid for: D */
260
383
  M1 = 'M1',
261
384
  /** Valid for: D */
262
385
  M3 = 'M3',
263
- /** Valid for: D */
386
+ /** Valid for: W */
264
387
  W5 = 'W5',
265
388
  /** Valid for: W */
266
389
  W10 = 'W10'
@@ -277,7 +400,7 @@ export type GetCurrencyPowerBalanceQueryVariables = Exact<{
277
400
  }>;
278
401
 
279
402
 
280
- export type GetCurrencyPowerBalanceQuery = { __typename?: 'Query', currencyPowerBalance?: Array<{ __typename?: 'CurrencyPowerBalance', currency: CurrencyName, power: Array<{ __typename?: 'CurrencyPower', point: string, price: number }> }> | null };
403
+ export type GetCurrencyPowerBalanceQuery = { __typename?: 'Query', currencyPowerBalance?: Array<{ __typename?: 'CurrencyPowerBalance', currency: CurrencyName, updatedAt: string, power: Array<{ __typename?: 'CurrencyPower', point: string, price: number }> }> | null };
281
404
 
282
405
 
283
- export const GetCurrencyPowerBalanceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrencyPowerBalance"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"timeUnit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CurrencyPowerBalanceTimeUnit"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currencyPowerBalance"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"timeUnit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"timeUnit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"power"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"point"}},{"kind":"Field","name":{"kind":"Name","value":"price"}}]}}]}}]}}]} as unknown as DocumentNode<GetCurrencyPowerBalanceQuery, GetCurrencyPowerBalanceQueryVariables>;
406
+ export const GetCurrencyPowerBalanceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrencyPowerBalance"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"timeUnit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CurrencyPowerBalanceTimeUnit"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currencyPowerBalance"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"timeUnit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"timeUnit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"power"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"point"}},{"kind":"Field","name":{"kind":"Name","value":"price"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetCurrencyPowerBalanceQuery, GetCurrencyPowerBalanceQueryVariables>;
@@ -9,10 +9,12 @@
9
9
  "data_unavailable": "Data unavailable",
10
10
  "hour": "{{count}} Hour",
11
11
  "hour_plural": "{{count}} Hours",
12
+ "last_updated": "Last updated",
12
13
  "month": "{{count}} Month",
13
14
  "month_plural": "{{count}} Months",
14
15
  "pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries",
15
16
  "previous_business_day": "Previous Business Day",
17
+ "today": "Today",
16
18
  "week": "{{count}} Week",
17
19
  "week_plural": "{{count}} Weeks"
18
20
  }
@@ -8,8 +8,10 @@
8
8
  "current_business_day": "目前營業日",
9
9
  "data_unavailable": "沒有數據",
10
10
  "hour_0": "{{count}} 時",
11
+ "last_updated": "最後更新",
11
12
  "month_0": "{{count}} 月",
12
13
  "pagination_entries_range": "{{itemCount}}个挂单中的{{firstItemOnPage}}-{{lastItemOnPage}}",
13
14
  "previous_business_day": "前一營業日",
15
+ "today": "今日",
14
16
  "week_0": "{{count}} 週"
15
17
  }
@@ -38,6 +38,7 @@ const mockResponse = [{
38
38
  price: 1.65,
39
39
  },
40
40
  ],
41
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
41
42
  },
42
43
  {
43
44
  currency: 'CHF',
@@ -67,6 +68,7 @@ const mockResponse = [{
67
68
  price: -9.15,
68
69
  },
69
70
  ],
71
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
70
72
  },
71
73
  {
72
74
  currency: 'AUD',
@@ -96,6 +98,7 @@ const mockResponse = [{
96
98
  price: 4.31,
97
99
  },
98
100
  ],
101
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
99
102
  },
100
103
  {
101
104
  currency: 'CAD',
@@ -125,6 +128,7 @@ const mockResponse = [{
125
128
  price: -9.75,
126
129
  },
127
130
  ],
131
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
128
132
  },
129
133
  {
130
134
  currency: 'EUR',
@@ -154,6 +158,7 @@ const mockResponse = [{
154
158
  price: 1.4,
155
159
  },
156
160
  ],
161
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
157
162
  },
158
163
  {
159
164
  currency: 'JPY',
@@ -183,6 +188,7 @@ const mockResponse = [{
183
188
  price: 6.27,
184
189
  },
185
190
  ],
191
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
186
192
  },
187
193
  {
188
194
  currency: 'USD',
@@ -212,6 +218,7 @@ const mockResponse = [{
212
218
  price: 4.31,
213
219
  },
214
220
  ],
221
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
215
222
  },
216
223
  {
217
224
  currency: 'GBP',
@@ -239,8 +246,10 @@ const mockResponse = [{
239
246
  {
240
247
  point: '2023-10-27T18:00:00Z',
241
248
  price: 1.31,
249
+
242
250
  },
243
251
  ],
252
+ updatedAt: '2023-10-28T00:00:29.250105730Z',
244
253
  },
245
254
  ],
246
255
  },