@oanda/labs-currency-strength-widget 1.0.41 → 1.0.43

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 +348 -0
  2. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js +11 -2
  3. package/dist/main/CurrencyStrengthWidget/ChartsWithData.js.map +1 -1
  4. package/dist/main/gql/getCurrencyStrength.js +1 -1
  5. package/dist/main/gql/getCurrencyStrength.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/CurrencyStrengthWidget/ChartsWithData.js +12 -3
  13. package/dist/module/CurrencyStrengthWidget/ChartsWithData.js.map +1 -1
  14. package/dist/module/gql/getCurrencyStrength.js +1 -1
  15. package/dist/module/gql/getCurrencyStrength.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 +111 -15
  24. package/package.json +3 -3
  25. package/src/CurrencyStrengthWidget/ChartsWithData.tsx +12 -1
  26. package/src/gql/getCurrencyStrength.ts +1 -0
  27. package/src/gql/types/gql.ts +2 -2
  28. package/src/gql/types/graphql.ts +133 -19
  29. package/src/translations/sources/en.json +2 -0
  30. package/src/translations/sources/zh_TW.json +2 -0
  31. package/test/mocks/currencyStrengthMock.ts +8 -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 {
@@ -66,6 +99,7 @@ export type CurrencyStrength = {
66
99
  __typename?: 'CurrencyStrength';
67
100
  currency: CurrencyName;
68
101
  strengthRelation?: Maybe<Array<StrengthRelation>>;
102
+ updatedAt: Scalars['String']['output'];
69
103
  };
70
104
 
71
105
  export enum DataSource {
@@ -81,13 +115,32 @@ export enum Division {
81
115
  Oel = 'OEL',
82
116
  Ogm = 'OGM',
83
117
  Oj = 'OJ',
118
+ Ola = 'OLA',
84
119
  Otms = 'OTMS'
85
120
  }
86
121
 
122
+ export type Heatmap = {
123
+ __typename?: 'Heatmap';
124
+ instrument: Scalars['String']['output'];
125
+ timeCorrelation: Array<TimeCorrelation>;
126
+ };
127
+
87
128
  export type Instrument = {
88
129
  __typename?: 'Instrument';
89
- displayName?: Maybe<Scalars['String']['output']>;
90
- 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>;
91
144
  };
92
145
 
93
146
  export type OrderPositionBucket = {
@@ -112,6 +165,8 @@ export type OrderPositionData = {
112
165
  export type Query = {
113
166
  __typename?: 'Query';
114
167
  assetClasses?: Maybe<Array<Maybe<AssetClass>>>;
168
+ correlationHeatmap: CorrelationHeatmap;
169
+ correlationMatrix: CorrelationMatrix;
115
170
  currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;
116
171
  currencyStrength?: Maybe<Array<CurrencyStrength>>;
117
172
  orderPositionBooks: Array<Maybe<OrderPositionData>>;
@@ -120,8 +175,10 @@ export type Query = {
120
175
  topicalInstruments?: Maybe<Array<TopicalInstrument>>;
121
176
  topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;
122
177
  topicalInstrumentsTotalCount: Scalars['Int']['output'];
178
+ valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;
179
+ valueAtRiskChart?: Maybe<ValueAtRiskChart>;
123
180
  volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;
124
- volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;
181
+ volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;
125
182
  };
126
183
 
127
184
 
@@ -130,6 +187,16 @@ export type QueryAssetClassesArgs = {
130
187
  };
131
188
 
132
189
 
190
+ export type QueryCorrelationHeatmapArgs = {
191
+ division: Division;
192
+ };
193
+
194
+
195
+ export type QueryCorrelationMatrixArgs = {
196
+ division: Division;
197
+ };
198
+
199
+
133
200
  export type QueryCurrencyPowerBalanceArgs = {
134
201
  timeUnit: CurrencyPowerBalanceTimeUnit;
135
202
  };
@@ -157,6 +224,7 @@ export type QuerySentimentListArgs = {
157
224
 
158
225
 
159
226
  export type QueryTopicalInstrumentsArgs = {
227
+ assetClass?: InputMaybe<AssetClassName>;
160
228
  count?: InputMaybe<Scalars['Int']['input']>;
161
229
  division?: InputMaybe<Division>;
162
230
  offset?: InputMaybe<Scalars['Int']['input']>;
@@ -171,11 +239,25 @@ export type QueryTopicalInstrumentsChartsArgs = {
171
239
 
172
240
 
173
241
  export type QueryTopicalInstrumentsTotalCountArgs = {
242
+ assetClass?: InputMaybe<AssetClassName>;
174
243
  division?: InputMaybe<Division>;
175
244
  sort: TopicalSort;
176
245
  };
177
246
 
178
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
+
179
261
  export type QueryVolatilityChartArgs = {
180
262
  division?: InputMaybe<Division>;
181
263
  instrument: Scalars['String']['input'];
@@ -219,8 +301,15 @@ export type StrengthRelation = {
219
301
  percentage: Scalars['Float']['output'];
220
302
  };
221
303
 
304
+ export type TimeCorrelation = {
305
+ __typename?: 'TimeCorrelation';
306
+ timeUnit: CorrelationTimeUnit;
307
+ value?: Maybe<Scalars['Float']['output']>;
308
+ };
309
+
222
310
  export type TopicalInstrument = {
223
311
  __typename?: 'TopicalInstrument';
312
+ assetClass?: Maybe<AssetClassName>;
224
313
  displayName: Scalars['String']['output'];
225
314
  name: Scalars['String']['output'];
226
315
  sentiment: Sentiment;
@@ -241,23 +330,48 @@ export enum TopicalSort {
241
330
  Volatile = 'VOLATILE'
242
331
  }
243
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
+
244
369
  export type VolatilityChart = {
245
370
  __typename?: 'VolatilityChart';
246
371
  pips: Scalars['Float']['output'];
247
372
  /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */
248
373
  point: Scalars['String']['output'];
249
- };
250
-
251
- export type VolatilityChartAssetClass = {
252
- __typename?: 'VolatilityChartAssetClass';
253
- instruments: Array<VolatilityChartInstrument>;
254
- name: Scalars['String']['output'];
255
- };
256
-
257
- export type VolatilityChartInstrument = {
258
- __typename?: 'VolatilityChartInstrument';
259
- displayName: Scalars['String']['output'];
260
- name: Scalars['String']['output'];
374
+ updatedAt: Scalars['String']['output'];
261
375
  };
262
376
 
263
377
  export enum VolatilityChartTimeSpan {
@@ -284,7 +398,7 @@ export enum VolatilityChartTimeUnit {
284
398
  export type GetCurrencyStrengthQueryVariables = Exact<{ [key: string]: never; }>;
285
399
 
286
400
 
287
- export type GetCurrencyStrengthQuery = { __typename?: 'Query', currencyStrength?: Array<{ __typename?: 'CurrencyStrength', currency: CurrencyName, strengthRelation?: Array<{ __typename?: 'StrengthRelation', currency: CurrencyName, percentage: number }> | null }> | null };
401
+ export type GetCurrencyStrengthQuery = { __typename?: 'Query', currencyStrength?: Array<{ __typename?: 'CurrencyStrength', currency: CurrencyName, updatedAt: string, strengthRelation?: Array<{ __typename?: 'StrengthRelation', currency: CurrencyName, percentage: number }> | null }> | null };
288
402
 
289
403
 
290
- export const GetCurrencyStrengthDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrencyStrength"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currencyStrength"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"strengthRelation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"percentage"}}]}}]}}]}}]} as unknown as DocumentNode<GetCurrencyStrengthQuery, GetCurrencyStrengthQueryVariables>;
404
+ export const GetCurrencyStrengthDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetCurrencyStrength"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currencyStrength"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"strengthRelation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"percentage"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]} as unknown as DocumentNode<GetCurrencyStrengthQuery, GetCurrencyStrengthQueryVariables>;
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "daily": "Daily",
3
3
  "data_unavailable": "Data unavailable",
4
+ "last_updated": "Last updated",
4
5
  "minute": "{{count}} Minute",
5
6
  "minute_plural": "{{count}} Minutes",
6
7
  "pagination_entries_range": "{{firstItemOnPage}}-{{lastItemOnPage}} of {{itemCount}} entries",
8
+ "today": "Today",
7
9
  "vs": "vs"
8
10
  }
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "daily": "每日",
3
3
  "data_unavailable": "沒有數據",
4
+ "last_updated": "最後更新",
4
5
  "minute_0": "{{count}} 分鐘",
5
6
  "pagination_entries_range": "{{itemCount}}个挂单中的{{firstItemOnPage}}-{{lastItemOnPage}}",
7
+ "today": "今日",
6
8
  "vs": "vs"
7
9
  }
@@ -31,6 +31,7 @@ const currencyStrengthMock = [
31
31
  percentage: -0.91,
32
32
  },
33
33
  ],
34
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
34
35
  },
35
36
  {
36
37
  currency: 'AUD',
@@ -64,6 +65,7 @@ const currencyStrengthMock = [
64
65
  percentage: 0.52,
65
66
  },
66
67
  ],
68
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
67
69
  },
68
70
  {
69
71
  currency: 'GBP',
@@ -97,6 +99,7 @@ const currencyStrengthMock = [
97
99
  percentage: 0.27,
98
100
  },
99
101
  ],
102
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
100
103
  },
101
104
  {
102
105
  currency: 'EUR',
@@ -130,6 +133,7 @@ const currencyStrengthMock = [
130
133
  percentage: -0.26,
131
134
  },
132
135
  ],
136
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
133
137
  },
134
138
  {
135
139
  currency: 'NZD',
@@ -163,6 +167,7 @@ const currencyStrengthMock = [
163
167
  percentage: 0.25,
164
168
  },
165
169
  ],
170
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
166
171
  },
167
172
  {
168
173
  currency: 'CAD',
@@ -196,6 +201,7 @@ const currencyStrengthMock = [
196
201
  percentage: 0.93,
197
202
  },
198
203
  ],
204
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
199
205
  },
200
206
  {
201
207
  currency: 'CHF',
@@ -229,6 +235,7 @@ const currencyStrengthMock = [
229
235
  percentage: -0.78,
230
236
  },
231
237
  ],
238
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
232
239
  },
233
240
  {
234
241
  currency: 'JPY',
@@ -262,6 +269,7 @@ const currencyStrengthMock = [
262
269
  percentage: -0.06,
263
270
  },
264
271
  ],
272
+ updatedAt: '2024-01-10T08:12:23.289997231Z',
265
273
  },
266
274
  ];
267
275