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

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 +516 -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
@@ -45,13 +45,41 @@ export type Scalars = {
45
45
  };
46
46
  export type AssetClass = {
47
47
  __typename?: 'AssetClass';
48
- instruments?: Maybe<Array<Maybe<Instrument>>>;
49
- name?: Maybe<Scalars['String']['output']>;
48
+ instruments: Array<Instrument>;
49
+ name: Scalars['String']['output'];
50
50
  };
51
+ export declare enum AssetClassName {
52
+ Commodities = "COMMODITIES",
53
+ Cryptocurrency = "CRYPTOCURRENCY",
54
+ Currency = "CURRENCY",
55
+ EquityShares = "EQUITY_SHARES",
56
+ Indices = "INDICES",
57
+ Rates = "RATES"
58
+ }
51
59
  export declare enum BookType {
52
60
  Order = "ORDER",
53
61
  Position = "POSITION"
54
62
  }
63
+ export type CorrelationHeatmap = {
64
+ __typename?: 'CorrelationHeatmap';
65
+ baseInstrument: Scalars['String']['output'];
66
+ heatmap: Array<Heatmap>;
67
+ };
68
+ export type CorrelationMatrix = {
69
+ __typename?: 'CorrelationMatrix';
70
+ baseTimeUnit: CorrelationTimeUnit;
71
+ matrix: Array<Matrix>;
72
+ };
73
+ export declare enum CorrelationTimeUnit {
74
+ H1 = "H1",
75
+ H4 = "H4",
76
+ H24 = "H24",
77
+ M1 = "M1",
78
+ M3 = "M3",
79
+ M6 = "M6",
80
+ W1 = "W1",
81
+ Y1 = "Y1"
82
+ }
55
83
  export declare enum CurrencyName {
56
84
  Aud = "AUD",
57
85
  Cad = "CAD",
@@ -72,6 +100,7 @@ export type CurrencyPowerBalance = {
72
100
  __typename?: 'CurrencyPowerBalance';
73
101
  currency: CurrencyName;
74
102
  power: Array<CurrencyPower>;
103
+ updatedAt: Scalars['String']['output'];
75
104
  };
76
105
  export declare enum CurrencyPowerBalanceTimeUnit {
77
106
  CurrentDay = "CURRENT_DAY",
@@ -83,6 +112,12 @@ export declare enum CurrencyPowerBalanceTimeUnit {
83
112
  PreviousDay = "PREVIOUS_DAY",
84
113
  W1 = "W1"
85
114
  }
115
+ export type CurrencyStrength = {
116
+ __typename?: 'CurrencyStrength';
117
+ currency: CurrencyName;
118
+ strengthRelation?: Maybe<Array<StrengthRelation>>;
119
+ updatedAt: Scalars['String']['output'];
120
+ };
86
121
  export declare enum DataSource {
87
122
  Ny4 = "NY4",
88
123
  Ty3 = "TY3"
@@ -95,12 +130,28 @@ export declare enum Division {
95
130
  Oel = "OEL",
96
131
  Ogm = "OGM",
97
132
  Oj = "OJ",
133
+ Ola = "OLA",
98
134
  Otms = "OTMS"
99
135
  }
136
+ export type Heatmap = {
137
+ __typename?: 'Heatmap';
138
+ instrument: Scalars['String']['output'];
139
+ timeCorrelation: Array<TimeCorrelation>;
140
+ };
100
141
  export type Instrument = {
101
142
  __typename?: 'Instrument';
102
- displayName?: Maybe<Scalars['String']['output']>;
103
- name?: Maybe<Scalars['String']['output']>;
143
+ displayName: Scalars['String']['output'];
144
+ name: Scalars['String']['output'];
145
+ };
146
+ export type InstrumentCorrelation = {
147
+ __typename?: 'InstrumentCorrelation';
148
+ instrument: Scalars['String']['output'];
149
+ value?: Maybe<Scalars['Float']['output']>;
150
+ };
151
+ export type Matrix = {
152
+ __typename?: 'Matrix';
153
+ instrument: Scalars['String']['output'];
154
+ instrumentCorrelation: Array<InstrumentCorrelation>;
104
155
  };
105
156
  export type OrderPositionBucket = {
106
157
  __typename?: 'OrderPositionBucket';
@@ -114,7 +165,7 @@ export type OrderPositionData = {
114
165
  buckets: Array<Maybe<OrderPositionBucket>>;
115
166
  dataSource?: Maybe<Scalars['String']['output']>;
116
167
  instrument: Scalars['String']['output'];
117
- price: Scalars['Float']['output'];
168
+ price?: Maybe<Scalars['Float']['output']>;
118
169
  region?: Maybe<Scalars['String']['output']>;
119
170
  time: Scalars['String']['output'];
120
171
  unixTime: Scalars['Int']['output'];
@@ -122,19 +173,30 @@ export type OrderPositionData = {
122
173
  export type Query = {
123
174
  __typename?: 'Query';
124
175
  assetClasses?: Maybe<Array<Maybe<AssetClass>>>;
176
+ correlationHeatmap: CorrelationHeatmap;
177
+ correlationMatrix: CorrelationMatrix;
125
178
  currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;
179
+ currencyStrength?: Maybe<Array<CurrencyStrength>>;
126
180
  orderPositionBooks: Array<Maybe<OrderPositionData>>;
127
181
  sentiment?: Maybe<Array<SentimentInstrument>>;
128
182
  sentimentList?: Maybe<Array<SentimentInstrument>>;
129
183
  topicalInstruments?: Maybe<Array<TopicalInstrument>>;
130
184
  topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;
131
185
  topicalInstrumentsTotalCount: Scalars['Int']['output'];
186
+ valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;
187
+ valueAtRiskChart?: Maybe<ValueAtRiskChart>;
132
188
  volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;
133
- volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;
189
+ volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;
134
190
  };
135
191
  export type QueryAssetClassesArgs = {
136
192
  division: Division;
137
193
  };
194
+ export type QueryCorrelationHeatmapArgs = {
195
+ division: Division;
196
+ };
197
+ export type QueryCorrelationMatrixArgs = {
198
+ division: Division;
199
+ };
138
200
  export type QueryCurrencyPowerBalanceArgs = {
139
201
  timeUnit: CurrencyPowerBalanceTimeUnit;
140
202
  };
@@ -154,6 +216,7 @@ export type QuerySentimentListArgs = {
154
216
  sort?: InputMaybe<Sort>;
155
217
  };
156
218
  export type QueryTopicalInstrumentsArgs = {
219
+ assetClass?: InputMaybe<AssetClassName>;
157
220
  count?: InputMaybe<Scalars['Int']['input']>;
158
221
  division?: InputMaybe<Division>;
159
222
  offset?: InputMaybe<Scalars['Int']['input']>;
@@ -164,9 +227,19 @@ export type QueryTopicalInstrumentsChartsArgs = {
164
227
  instruments?: InputMaybe<Array<Scalars['String']['input']>>;
165
228
  };
166
229
  export type QueryTopicalInstrumentsTotalCountArgs = {
230
+ assetClass?: InputMaybe<AssetClassName>;
167
231
  division?: InputMaybe<Division>;
168
232
  sort: TopicalSort;
169
233
  };
234
+ export type QueryValueAtRiskAssetClassesArgs = {
235
+ division?: InputMaybe<Division>;
236
+ };
237
+ export type QueryValueAtRiskChartArgs = {
238
+ bars: ValueAtRiskBars;
239
+ division?: InputMaybe<Division>;
240
+ duration: ValueAtRiskDuration;
241
+ instrument: Scalars['String']['input'];
242
+ };
170
243
  export type QueryVolatilityChartArgs = {
171
244
  division?: InputMaybe<Division>;
172
245
  instrument: Scalars['String']['input'];
@@ -191,16 +264,28 @@ export type SentimentInstrument = {
191
264
  displayName: Scalars['String']['output'];
192
265
  name: Scalars['String']['output'];
193
266
  sentiment: Sentiment;
267
+ updatedAt: Scalars['String']['output'];
194
268
  };
195
269
  export declare enum Sort {
196
270
  Bearish = "BEARISH",
197
271
  Bullish = "BULLISH"
198
272
  }
273
+ export type StrengthRelation = {
274
+ __typename?: 'StrengthRelation';
275
+ currency: CurrencyName;
276
+ percentage: Scalars['Float']['output'];
277
+ };
278
+ export type TimeCorrelation = {
279
+ __typename?: 'TimeCorrelation';
280
+ timeUnit: CorrelationTimeUnit;
281
+ value?: Maybe<Scalars['Float']['output']>;
282
+ };
199
283
  export type TopicalInstrument = {
200
284
  __typename?: 'TopicalInstrument';
285
+ assetClass?: Maybe<AssetClassName>;
201
286
  displayName: Scalars['String']['output'];
202
287
  name: Scalars['String']['output'];
203
- sentiment: TopicalInstrumentSentiment;
288
+ sentiment: Sentiment;
204
289
  updatedAt: Scalars['String']['output'];
205
290
  };
206
291
  export type TopicalInstrumentChart = {
@@ -208,11 +293,6 @@ export type TopicalInstrumentChart = {
208
293
  chart?: Maybe<Array<Scalars['Float']['output']>>;
209
294
  name: Scalars['String']['output'];
210
295
  };
211
- export type TopicalInstrumentSentiment = {
212
- __typename?: 'TopicalInstrumentSentiment';
213
- longPercent: Scalars['Float']['output'];
214
- shortPercent: Scalars['Float']['output'];
215
- };
216
296
  export declare enum TopicalSort {
217
297
  Bearish = "BEARISH",
218
298
  Bullish = "BULLISH",
@@ -220,31 +300,54 @@ export declare enum TopicalSort {
220
300
  Popular = "POPULAR",
221
301
  Volatile = "VOLATILE"
222
302
  }
303
+ export declare enum ValueAtRiskBars {
304
+ C100 = "C100",
305
+ C200 = "C200",
306
+ C300 = "C300"
307
+ }
308
+ export type ValueAtRiskChart = {
309
+ __typename?: 'ValueAtRiskChart';
310
+ down: ValueAtRiskChartData;
311
+ up: ValueAtRiskChartData;
312
+ };
313
+ export type ValueAtRiskChartData = {
314
+ __typename?: 'ValueAtRiskChartData';
315
+ average: Scalars['Float']['output'];
316
+ max: Scalars['Float']['output'];
317
+ median: Scalars['Float']['output'];
318
+ points?: Maybe<Array<ValueAtRiskChartPoint>>;
319
+ threshold: Scalars['Float']['output'];
320
+ };
321
+ export type ValueAtRiskChartPoint = {
322
+ __typename?: 'ValueAtRiskChartPoint';
323
+ percent: Scalars['Float']['output'];
324
+ pips: Scalars['Float']['output'];
325
+ };
326
+ export declare enum ValueAtRiskDuration {
327
+ C1 = "C1",
328
+ C2 = "C2",
329
+ C3 = "C3",
330
+ C4 = "C4",
331
+ C5 = "C5",
332
+ C10 = "C10"
333
+ }
223
334
  export type VolatilityChart = {
224
335
  __typename?: 'VolatilityChart';
225
336
  pips: Scalars['Float']['output'];
226
337
  /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */
227
338
  point: Scalars['String']['output'];
228
- };
229
- export type VolatilityChartAssetClass = {
230
- __typename?: 'VolatilityChartAssetClass';
231
- instruments: Array<VolatilityChartInstrument>;
232
- name: Scalars['String']['output'];
233
- };
234
- export type VolatilityChartInstrument = {
235
- __typename?: 'VolatilityChartInstrument';
236
- displayName: Scalars['String']['output'];
237
- name: Scalars['String']['output'];
339
+ updatedAt: Scalars['String']['output'];
238
340
  };
239
341
  export declare enum VolatilityChartTimeSpan {
342
+ /** Valid for: H */
240
343
  D5 = "D5",
241
344
  /** Valid for: H */
242
345
  D10 = "D10",
243
- /** Valid for: H */
346
+ /** Valid for: D */
244
347
  M1 = "M1",
245
348
  /** Valid for: D */
246
349
  M3 = "M3",
247
- /** Valid for: D */
350
+ /** Valid for: W */
248
351
  W5 = "W5",
249
352
  /** Valid for: W */
250
353
  W10 = "W10"
@@ -262,6 +365,7 @@ export type GetCurrencyPowerBalanceQuery = {
262
365
  currencyPowerBalance?: Array<{
263
366
  __typename?: 'CurrencyPowerBalance';
264
367
  currency: CurrencyName;
368
+ updatedAt: string;
265
369
  power: Array<{
266
370
  __typename?: 'CurrencyPower';
267
371
  point: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oanda/labs-currency-power-balance-widget",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "description": "Labs Currency Power Balance Widget",
5
5
  "main": "dist/main/index.js",
6
6
  "module": "dist/module/index.js",
@@ -13,7 +13,7 @@
13
13
  "license": "UNLICENSED",
14
14
  "dependencies": {
15
15
  "@apollo/client": "3.9.9",
16
- "@oanda/labs-widget-common": "^1.0.123",
16
+ "@oanda/labs-widget-common": "^1.0.125",
17
17
  "@oanda/mono-i18n": "10.0.1",
18
18
  "echarts": "5.5.0",
19
19
  "echarts-for-react": "3.0.2",
@@ -23,5 +23,5 @@
23
23
  "@graphql-codegen/cli": "5.0.0",
24
24
  "@graphql-codegen/client-preset": "4.1.0"
25
25
  },
26
- "gitHead": "62307b37f0909cf1d26bd37aa5b15b3d6996b668"
26
+ "gitHead": "cf14333f39f6ee09d5276dac1230b218107c24c4"
27
27
  }
@@ -1,7 +1,9 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { useQuery } from '@apollo/client';
3
+ import { useLocale } from '@oanda/mono-i18n';
3
4
  import {
4
5
  ChartError, Spinner, SpinnerSize, ThemeContext, Tooltip, Size,
6
+ LastUpdated,
5
7
  } from '@oanda/labs-widget-common';
6
8
  import { Chart } from './components/Chart';
7
9
  import { CURRENCY_POWER_BALANCE_TOOLTIP_ID } from './constants';
@@ -12,6 +14,7 @@ import { GetCurrencyPowerBalanceQuery, GetCurrencyPowerBalanceQueryVariables } f
12
14
  const ChartWithData = ({ timeUnit, currencies }: ChartWithDataProps) => {
13
15
  const { size } = useContext(ThemeContext);
14
16
  const isDesktop = size === Size.DESKTOP;
17
+ const { lang } = useLocale();
15
18
  const { loading, data, error } = useQuery<
16
19
  GetCurrencyPowerBalanceQuery,
17
20
  GetCurrencyPowerBalanceQueryVariables
@@ -42,6 +45,11 @@ const ChartWithData = ({ timeUnit, currencies }: ChartWithDataProps) => {
42
45
  </div>
43
46
  )}
44
47
  {isDesktop && <Tooltip id={CURRENCY_POWER_BALANCE_TOOLTIP_ID} />}
48
+ {!loading && !showError && (
49
+ <div className="lw-mt-2 lw-h-8">
50
+ <LastUpdated timestamp={data?.currencyPowerBalance![0]?.updatedAt} labelCallback={lang} />
51
+ </div>
52
+ )}
45
53
  </>
46
54
  );
47
55
  };
@@ -8,6 +8,7 @@ export const getCurrencyPowerBalance = gql`
8
8
  point
9
9
  price
10
10
  }
11
+ updatedAt
11
12
  }
12
13
  }
13
14
  `;
@@ -13,7 +13,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
13
13
  * Therefore it is highly recommended to use the babel or swc plugin for production.
14
14
  */
15
15
  const documents = {
16
- "\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n }\n }\n": types.GetCurrencyPowerBalanceDocument,
16
+ "\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n updatedAt\n }\n }\n": types.GetCurrencyPowerBalanceDocument,
17
17
  };
18
18
 
19
19
  /**
@@ -33,7 +33,7 @@ export function graphql(source: string): unknown;
33
33
  /**
34
34
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
35
35
  */
36
- export function graphql(source: "\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n }\n }\n"): (typeof documents)["\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n }\n }\n"];
36
+ export function graphql(source: "\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n updatedAt\n }\n }\n"): (typeof documents)["\n query GetCurrencyPowerBalance($timeUnit: CurrencyPowerBalanceTimeUnit!) {\n currencyPowerBalance(timeUnit: $timeUnit) {\n currency\n power {\n point\n price\n }\n updatedAt\n }\n }\n"];
37
37
 
38
38
  export function graphql(source: string) {
39
39
  return (documents as any)[source] ?? {};
@@ -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>;