@oanda/labs-instruments-price-chart-widget 1.0.1

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 (150) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/codegen.ts +18 -0
  3. package/dist/main/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.js +40 -0
  4. package/dist/main/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.js.map +1 -0
  5. package/dist/main/InstrumentsPriceChartWidget/Main.js +52 -0
  6. package/dist/main/InstrumentsPriceChartWidget/Main.js.map +1 -0
  7. package/dist/main/InstrumentsPriceChartWidget/components/Chart.js +39 -0
  8. package/dist/main/InstrumentsPriceChartWidget/components/Chart.js.map +1 -0
  9. package/dist/main/InstrumentsPriceChartWidget/components/constants.js +12 -0
  10. package/dist/main/InstrumentsPriceChartWidget/components/constants.js.map +1 -0
  11. package/dist/main/InstrumentsPriceChartWidget/components/formatters.js +15 -0
  12. package/dist/main/InstrumentsPriceChartWidget/components/formatters.js.map +1 -0
  13. package/dist/main/InstrumentsPriceChartWidget/components/getOption.js +119 -0
  14. package/dist/main/InstrumentsPriceChartWidget/components/getOption.js.map +1 -0
  15. package/dist/main/InstrumentsPriceChartWidget/components/types.js +6 -0
  16. package/dist/main/InstrumentsPriceChartWidget/components/types.js.map +1 -0
  17. package/dist/main/InstrumentsPriceChartWidget/config.js +44 -0
  18. package/dist/main/InstrumentsPriceChartWidget/config.js.map +1 -0
  19. package/dist/main/InstrumentsPriceChartWidget/index.js +28 -0
  20. package/dist/main/InstrumentsPriceChartWidget/index.js.map +1 -0
  21. package/dist/main/InstrumentsPriceChartWidget/render.js +42 -0
  22. package/dist/main/InstrumentsPriceChartWidget/render.js.map +1 -0
  23. package/dist/main/InstrumentsPriceChartWidget/types.js +16 -0
  24. package/dist/main/InstrumentsPriceChartWidget/types.js.map +1 -0
  25. package/dist/main/gql/mock/getPriceCandles.js +30 -0
  26. package/dist/main/gql/mock/getPriceCandles.js.map +1 -0
  27. package/dist/main/gql/mock/handlers.js +62 -0
  28. package/dist/main/gql/mock/handlers.js.map +1 -0
  29. package/dist/main/gql/mock/schema.graphqls +59 -0
  30. package/dist/main/gql/types/fragment-masking.js +23 -0
  31. package/dist/main/gql/types/fragment-masking.js.map +1 -0
  32. package/dist/main/gql/types/gql.js +17 -0
  33. package/dist/main/gql/types/gql.js.map +1 -0
  34. package/dist/main/gql/types/graphql.js +438 -0
  35. package/dist/main/gql/types/graphql.js.map +1 -0
  36. package/dist/main/gql/types/index.js +28 -0
  37. package/dist/main/gql/types/index.js.map +1 -0
  38. package/dist/main/gql/validateInstruments.js +16 -0
  39. package/dist/main/gql/validateInstruments.js.map +1 -0
  40. package/dist/main/index.js +17 -0
  41. package/dist/main/index.js.map +1 -0
  42. package/dist/main/translations/index.js +27 -0
  43. package/dist/main/translations/index.js.map +1 -0
  44. package/dist/main/translations/sources/en.json +2 -0
  45. package/dist/main/translations/sources/es.json +2 -0
  46. package/dist/main/translations/sources/th.json +2 -0
  47. package/dist/main/translations/sources/zh_TW.json +2 -0
  48. package/dist/main/translations/translations.js +8 -0
  49. package/dist/main/translations/translations.js.map +1 -0
  50. package/dist/module/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.js +33 -0
  51. package/dist/module/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.js.map +1 -0
  52. package/dist/module/InstrumentsPriceChartWidget/Main.js +44 -0
  53. package/dist/module/InstrumentsPriceChartWidget/Main.js.map +1 -0
  54. package/dist/module/InstrumentsPriceChartWidget/components/Chart.js +29 -0
  55. package/dist/module/InstrumentsPriceChartWidget/components/Chart.js.map +1 -0
  56. package/dist/module/InstrumentsPriceChartWidget/components/constants.js +6 -0
  57. package/dist/module/InstrumentsPriceChartWidget/components/constants.js.map +1 -0
  58. package/dist/module/InstrumentsPriceChartWidget/components/formatters.js +8 -0
  59. package/dist/module/InstrumentsPriceChartWidget/components/formatters.js.map +1 -0
  60. package/dist/module/InstrumentsPriceChartWidget/components/getOption.js +112 -0
  61. package/dist/module/InstrumentsPriceChartWidget/components/getOption.js.map +1 -0
  62. package/dist/module/InstrumentsPriceChartWidget/components/types.js +2 -0
  63. package/dist/module/InstrumentsPriceChartWidget/components/types.js.map +1 -0
  64. package/dist/module/InstrumentsPriceChartWidget/config.js +39 -0
  65. package/dist/module/InstrumentsPriceChartWidget/config.js.map +1 -0
  66. package/dist/module/InstrumentsPriceChartWidget/index.js +3 -0
  67. package/dist/module/InstrumentsPriceChartWidget/index.js.map +1 -0
  68. package/dist/module/InstrumentsPriceChartWidget/render.js +39 -0
  69. package/dist/module/InstrumentsPriceChartWidget/render.js.map +1 -0
  70. package/dist/module/InstrumentsPriceChartWidget/types.js +10 -0
  71. package/dist/module/InstrumentsPriceChartWidget/types.js.map +1 -0
  72. package/dist/module/gql/mock/getPriceCandles.js +25 -0
  73. package/dist/module/gql/mock/getPriceCandles.js.map +1 -0
  74. package/dist/module/gql/mock/handlers.js +56 -0
  75. package/dist/module/gql/mock/handlers.js.map +1 -0
  76. package/dist/module/gql/mock/schema.graphqls +59 -0
  77. package/dist/module/gql/types/fragment-masking.js +15 -0
  78. package/dist/module/gql/types/fragment-masking.js.map +1 -0
  79. package/dist/module/gql/types/gql.js +9 -0
  80. package/dist/module/gql/types/gql.js.map +1 -0
  81. package/dist/module/gql/types/graphql.js +432 -0
  82. package/dist/module/gql/types/graphql.js.map +1 -0
  83. package/dist/module/gql/types/index.js +3 -0
  84. package/dist/module/gql/types/index.js.map +1 -0
  85. package/dist/module/gql/validateInstruments.js +10 -0
  86. package/dist/module/gql/validateInstruments.js.map +1 -0
  87. package/dist/module/index.js +2 -0
  88. package/dist/module/index.js.map +1 -0
  89. package/dist/module/translations/index.js +20 -0
  90. package/dist/module/translations/index.js.map +1 -0
  91. package/dist/module/translations/sources/en.json +2 -0
  92. package/dist/module/translations/sources/es.json +2 -0
  93. package/dist/module/translations/sources/th.json +2 -0
  94. package/dist/module/translations/sources/zh_TW.json +2 -0
  95. package/dist/module/translations/translations.js +2 -0
  96. package/dist/module/translations/translations.js.map +1 -0
  97. package/dist/types/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.d.ts +4 -0
  98. package/dist/types/InstrumentsPriceChartWidget/Main.d.ts +4 -0
  99. package/dist/types/InstrumentsPriceChartWidget/components/Chart.d.ts +3 -0
  100. package/dist/types/InstrumentsPriceChartWidget/components/constants.d.ts +5 -0
  101. package/dist/types/InstrumentsPriceChartWidget/components/formatters.d.ts +1 -0
  102. package/dist/types/InstrumentsPriceChartWidget/components/getOption.d.ts +2 -0
  103. package/dist/types/InstrumentsPriceChartWidget/components/types.d.ts +14 -0
  104. package/dist/types/InstrumentsPriceChartWidget/config.d.ts +10 -0
  105. package/dist/types/InstrumentsPriceChartWidget/index.d.ts +2 -0
  106. package/dist/types/InstrumentsPriceChartWidget/render.d.ts +1 -0
  107. package/dist/types/InstrumentsPriceChartWidget/types.d.ts +15 -0
  108. package/dist/types/gql/mock/getPriceCandles.d.ts +2 -0
  109. package/dist/types/gql/mock/handlers.d.ts +1 -0
  110. package/dist/types/gql/types/fragment-masking.d.ts +15 -0
  111. package/dist/types/gql/types/gql.d.ts +47 -0
  112. package/dist/types/gql/types/graphql.d.ts +468 -0
  113. package/dist/types/gql/types/index.d.ts +2 -0
  114. package/dist/types/gql/validateInstruments.d.ts +1 -0
  115. package/dist/types/index.d.ts +1 -0
  116. package/dist/types/translations/index.d.ts +4 -0
  117. package/dist/types/translations/translations.d.ts +1 -0
  118. package/index.ts +1 -0
  119. package/lokalise.config.json +18 -0
  120. package/package.json +24 -0
  121. package/src/InstrumentsPriceChartWidget/InstrumentsPriceChartWidget.tsx +40 -0
  122. package/src/InstrumentsPriceChartWidget/Main.tsx +59 -0
  123. package/src/InstrumentsPriceChartWidget/components/Chart.tsx +47 -0
  124. package/src/InstrumentsPriceChartWidget/components/constants.ts +5 -0
  125. package/src/InstrumentsPriceChartWidget/components/formatters.ts +7 -0
  126. package/src/InstrumentsPriceChartWidget/components/getOption.ts +127 -0
  127. package/src/InstrumentsPriceChartWidget/components/types.ts +19 -0
  128. package/src/InstrumentsPriceChartWidget/config.ts +47 -0
  129. package/src/InstrumentsPriceChartWidget/index.ts +2 -0
  130. package/src/InstrumentsPriceChartWidget/render.tsx +52 -0
  131. package/src/InstrumentsPriceChartWidget/types.ts +20 -0
  132. package/src/gql/mock/getPriceCandles.ts +26 -0
  133. package/src/gql/mock/handlers.ts +66 -0
  134. package/src/gql/mock/schema.graphqls +59 -0
  135. package/src/gql/types/fragment-masking.ts +86 -0
  136. package/src/gql/types/gql.ts +54 -0
  137. package/src/gql/types/graphql.ts +723 -0
  138. package/src/gql/types/index.ts +2 -0
  139. package/src/gql/validateInstruments.ts +10 -0
  140. package/src/index.ts +1 -0
  141. package/src/translations/index.ts +17 -0
  142. package/src/translations/sources/en.json +2 -0
  143. package/src/translations/sources/es.json +2 -0
  144. package/src/translations/sources/th.json +2 -0
  145. package/src/translations/sources/zh_TW.json +2 -0
  146. package/src/translations/translations.ts +1 -0
  147. package/test/Main.test.tsx +26 -0
  148. package/test/mocks/chartMock.ts +52 -0
  149. package/test/mocks/index.ts +1 -0
  150. package/tsconfig.types.json +12 -0
@@ -0,0 +1,723 @@
1
+ /* eslint-disable */
2
+ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
3
+ export type Maybe<T> = T | null;
4
+ export type InputMaybe<T> = Maybe<T>;
5
+ export type Exact<T extends { [key: string]: unknown }> = {
6
+ [K in keyof T]: T[K];
7
+ };
8
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
9
+ [SubKey in K]?: Maybe<T[SubKey]>;
10
+ };
11
+ export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
+ [SubKey in K]: Maybe<T[SubKey]>;
13
+ };
14
+ export type MakeEmpty<
15
+ T extends { [key: string]: unknown },
16
+ K extends keyof T,
17
+ > = { [_ in K]?: never };
18
+ export type Incremental<T> =
19
+ | T
20
+ | {
21
+ [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
22
+ };
23
+ /** All built-in and custom scalars, mapped to their actual values */
24
+ export type Scalars = {
25
+ ID: { input: string; output: string };
26
+ String: { input: string; output: string };
27
+ Boolean: { input: boolean; output: boolean };
28
+ Int: { input: number; output: number };
29
+ Float: { input: number; output: number };
30
+ };
31
+
32
+ export type AssetClass = {
33
+ __typename?: 'AssetClass';
34
+ instruments: Array<Instrument>;
35
+ name: Scalars['String']['output'];
36
+ };
37
+
38
+ export enum AssetClassName {
39
+ Commodities = 'COMMODITIES',
40
+ Cryptocurrency = 'CRYPTOCURRENCY',
41
+ Currency = 'CURRENCY',
42
+ EquityShares = 'EQUITY_SHARES',
43
+ Etfs = 'ETFS',
44
+ Indices = 'INDICES',
45
+ Rates = 'RATES',
46
+ }
47
+
48
+ export enum BookType {
49
+ Order = 'ORDER',
50
+ Position = 'POSITION',
51
+ }
52
+
53
+ export type Candle = {
54
+ __typename?: 'Candle';
55
+ high: Scalars['Float']['output'];
56
+ };
57
+
58
+ export type CandlesData = {
59
+ __typename?: 'CandlesData';
60
+ candle: Candle;
61
+ time: Scalars['String']['output'];
62
+ timeSpan: TimeSpan;
63
+ unixTime: Scalars['Int']['output'];
64
+ };
65
+
66
+ export type CorrelationHeatmap = {
67
+ __typename?: 'CorrelationHeatmap';
68
+ baseInstrument: Instrument;
69
+ heatmap: Array<Heatmap>;
70
+ };
71
+
72
+ export type CorrelationMatrix = {
73
+ __typename?: 'CorrelationMatrix';
74
+ baseTimeUnit: CorrelationTimeUnit;
75
+ matrix: Array<Matrix>;
76
+ };
77
+
78
+ export enum CorrelationTimeUnit {
79
+ H1 = 'H1',
80
+ H4 = 'H4',
81
+ H24 = 'H24',
82
+ M1 = 'M1',
83
+ M3 = 'M3',
84
+ M6 = 'M6',
85
+ W1 = 'W1',
86
+ Y1 = 'Y1',
87
+ }
88
+
89
+ export enum CurrencyName {
90
+ Aud = 'AUD',
91
+ Cad = 'CAD',
92
+ Chf = 'CHF',
93
+ Eur = 'EUR',
94
+ Gbp = 'GBP',
95
+ Jpy = 'JPY',
96
+ Nzd = 'NZD',
97
+ Usd = 'USD',
98
+ }
99
+
100
+ export type CurrencyPower = {
101
+ __typename?: 'CurrencyPower';
102
+ /** UTC Timestamp */
103
+ point: Scalars['String']['output'];
104
+ price: Scalars['Float']['output'];
105
+ };
106
+
107
+ export type CurrencyPowerBalance = {
108
+ __typename?: 'CurrencyPowerBalance';
109
+ currency: CurrencyName;
110
+ power: Array<CurrencyPower>;
111
+ updatedAt: Scalars['String']['output'];
112
+ };
113
+
114
+ export enum CurrencyPowerBalanceTimeUnit {
115
+ CurrentDay = 'CURRENT_DAY',
116
+ H4 = 'H4',
117
+ H8 = 'H8',
118
+ H24 = 'H24',
119
+ M1 = 'M1',
120
+ M3 = 'M3',
121
+ PreviousDay = 'PREVIOUS_DAY',
122
+ W1 = 'W1',
123
+ }
124
+
125
+ export type CurrencyStrength = {
126
+ __typename?: 'CurrencyStrength';
127
+ currency: CurrencyName;
128
+ strengthRelation?: Maybe<Array<StrengthRelation>>;
129
+ updatedAt: Scalars['String']['output'];
130
+ };
131
+
132
+ export enum DataSource {
133
+ Ny4 = 'NY4',
134
+ Ty3 = 'TY3',
135
+ }
136
+
137
+ export enum Division {
138
+ Oap = 'OAP',
139
+ Oau = 'OAU',
140
+ Oc = 'OC',
141
+ Ocan = 'OCAN',
142
+ Oel = 'OEL',
143
+ Ogm = 'OGM',
144
+ Oj = 'OJ',
145
+ Opt = 'OPT',
146
+ Otms = 'OTMS',
147
+ }
148
+
149
+ export enum Granularity {
150
+ Day_1 = 'DAY_1',
151
+ Hour_1 = 'HOUR_1',
152
+ Hour_4 = 'HOUR_4',
153
+ Minute_5 = 'MINUTE_5',
154
+ Minute_15 = 'MINUTE_15',
155
+ Minute_30 = 'MINUTE_30',
156
+ }
157
+
158
+ export type Heatmap = {
159
+ __typename?: 'Heatmap';
160
+ instrument: Instrument;
161
+ timeCorrelation: Array<TimeCorrelation>;
162
+ };
163
+
164
+ export type Instrument = {
165
+ __typename?: 'Instrument';
166
+ displayName: Scalars['String']['output'];
167
+ name: Scalars['String']['output'];
168
+ };
169
+
170
+ export type InstrumentCorrelation = {
171
+ __typename?: 'InstrumentCorrelation';
172
+ instrument: Instrument;
173
+ value?: Maybe<Scalars['Float']['output']>;
174
+ };
175
+
176
+ export enum InstrumentDataSource {
177
+ Mt5 = 'MT5',
178
+ V20 = 'V20',
179
+ }
180
+
181
+ export type InstrumentTableResult = {
182
+ __typename?: 'InstrumentTableResult';
183
+ instruments: Array<Instrument>;
184
+ totalCount: Scalars['Int']['output'];
185
+ };
186
+
187
+ export type Matrix = {
188
+ __typename?: 'Matrix';
189
+ instrument: Instrument;
190
+ instrumentCorrelation: Array<InstrumentCorrelation>;
191
+ };
192
+
193
+ export type OrderPositionBucket = {
194
+ __typename?: 'OrderPositionBucket';
195
+ longCountPercent: Scalars['Float']['output'];
196
+ price: Scalars['Float']['output'];
197
+ shortCountPercent: Scalars['Float']['output'];
198
+ };
199
+
200
+ export type OrderPositionData = {
201
+ __typename?: 'OrderPositionData';
202
+ bucketWidth: Scalars['Float']['output'];
203
+ buckets: Array<Maybe<OrderPositionBucket>>;
204
+ dataSource?: Maybe<Scalars['String']['output']>;
205
+ instrument: Scalars['String']['output'];
206
+ price?: Maybe<Scalars['Float']['output']>;
207
+ region?: Maybe<Scalars['String']['output']>;
208
+ time: Scalars['String']['output'];
209
+ unixTime: Scalars['Int']['output'];
210
+ };
211
+
212
+ export type Query = {
213
+ __typename?: 'Query';
214
+ assetClasses?: Maybe<Array<Maybe<AssetClass>>>;
215
+ correlationHeatmap: CorrelationHeatmap;
216
+ correlationMatrix: CorrelationMatrix;
217
+ currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;
218
+ currencyStrength?: Maybe<Array<CurrencyStrength>>;
219
+ getPriceCandles: Array<CandlesData>;
220
+ isAllowedPartner?: Maybe<Scalars['Boolean']['output']>;
221
+ mapInstrumentNames?: Maybe<Array<Maybe<Instrument>>>;
222
+ orderPositionBooks: Array<Maybe<OrderPositionData>>;
223
+ resolveInstrumentsByDivision?: Maybe<Array<Instrument>>;
224
+ resolveInstrumentsWithFilters?: Maybe<InstrumentTableResult>;
225
+ sentiment?: Maybe<Array<SentimentInstrument>>;
226
+ sentimentList?: Maybe<Array<SentimentInstrument>>;
227
+ topicalInstruments?: Maybe<Array<TopicalInstrument>>;
228
+ topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;
229
+ topicalInstrumentsTotalCount: Scalars['Int']['output'];
230
+ valueAtRiskAssetClasses?: Maybe<Array<AssetClass>>;
231
+ valueAtRiskChart?: Maybe<ValueAtRiskChart>;
232
+ volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;
233
+ volatilityChartAssetClasses?: Maybe<Array<AssetClass>>;
234
+ };
235
+
236
+ export type QueryAssetClassesArgs = {
237
+ division: Division;
238
+ };
239
+
240
+ export type QueryCorrelationHeatmapArgs = {
241
+ division: Division;
242
+ instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
243
+ timeSpans?: InputMaybe<Array<InputMaybe<CorrelationTimeUnit>>>;
244
+ };
245
+
246
+ export type QueryCorrelationMatrixArgs = {
247
+ division: Division;
248
+ instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
249
+ };
250
+
251
+ export type QueryCurrencyPowerBalanceArgs = {
252
+ timeUnit: CurrencyPowerBalanceTimeUnit;
253
+ };
254
+
255
+ export type QueryGetPriceCandlesArgs = {
256
+ division?: InputMaybe<Division>;
257
+ granularity: Granularity;
258
+ instrument: Scalars['String']['input'];
259
+ timeSpan: TimeSpan;
260
+ };
261
+
262
+ export type QueryIsAllowedPartnerArgs = {
263
+ url: Scalars['String']['input'];
264
+ };
265
+
266
+ export type QueryMapInstrumentNamesArgs = {
267
+ division?: InputMaybe<Division>;
268
+ instruments: Array<InputMaybe<Scalars['String']['input']>>;
269
+ };
270
+
271
+ export type QueryOrderPositionBooksArgs = {
272
+ bookType: BookType;
273
+ dataSource?: InputMaybe<DataSource>;
274
+ instrument: Scalars['String']['input'];
275
+ recentHours?: InputMaybe<Scalars['Int']['input']>;
276
+ region?: InputMaybe<Region>;
277
+ };
278
+
279
+ export type QueryResolveInstrumentsByDivisionArgs = {
280
+ division: Division;
281
+ instruments: Array<InputMaybe<Scalars['String']['input']>>;
282
+ };
283
+
284
+ export type QueryResolveInstrumentsWithFiltersArgs = {
285
+ assetClass?: InputMaybe<Array<InputMaybe<AssetClassName>>>;
286
+ count?: InputMaybe<Scalars['Int']['input']>;
287
+ dataSource?: InputMaybe<InstrumentDataSource>;
288
+ division: Division;
289
+ instruments?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
290
+ offset?: InputMaybe<Scalars['Int']['input']>;
291
+ searchPattern?: InputMaybe<Scalars['String']['input']>;
292
+ };
293
+
294
+ export type QuerySentimentArgs = {
295
+ division?: InputMaybe<Division>;
296
+ name: Scalars['String']['input'];
297
+ };
298
+
299
+ export type QuerySentimentListArgs = {
300
+ division?: InputMaybe<Division>;
301
+ sort?: InputMaybe<Sort>;
302
+ };
303
+
304
+ export type QueryTopicalInstrumentsArgs = {
305
+ assetClass?: InputMaybe<AssetClassName>;
306
+ count?: InputMaybe<Scalars['Int']['input']>;
307
+ division?: InputMaybe<Division>;
308
+ offset?: InputMaybe<Scalars['Int']['input']>;
309
+ sort: TopicalSort;
310
+ };
311
+
312
+ export type QueryTopicalInstrumentsChartsArgs = {
313
+ division?: InputMaybe<Division>;
314
+ instruments?: InputMaybe<Array<Scalars['String']['input']>>;
315
+ };
316
+
317
+ export type QueryTopicalInstrumentsTotalCountArgs = {
318
+ assetClass?: InputMaybe<AssetClassName>;
319
+ division?: InputMaybe<Division>;
320
+ sort: TopicalSort;
321
+ };
322
+
323
+ export type QueryValueAtRiskAssetClassesArgs = {
324
+ division?: InputMaybe<Division>;
325
+ };
326
+
327
+ export type QueryValueAtRiskChartArgs = {
328
+ bars: ValueAtRiskBars;
329
+ division?: InputMaybe<Division>;
330
+ duration: ValueAtRiskDuration;
331
+ instrument: Scalars['String']['input'];
332
+ };
333
+
334
+ export type QueryVolatilityChartArgs = {
335
+ division?: InputMaybe<Division>;
336
+ instrument: Scalars['String']['input'];
337
+ timeSpan: VolatilityChartTimeSpan;
338
+ timeUnit: VolatilityChartTimeUnit;
339
+ };
340
+
341
+ export type QueryVolatilityChartAssetClassesArgs = {
342
+ division?: InputMaybe<Division>;
343
+ };
344
+
345
+ export enum Region {
346
+ Amer = 'AMER',
347
+ Apac = 'APAC',
348
+ Emea = 'EMEA',
349
+ }
350
+
351
+ export type Sentiment = {
352
+ __typename?: 'Sentiment';
353
+ longPercent: Scalars['Float']['output'];
354
+ shortPercent: Scalars['Float']['output'];
355
+ };
356
+
357
+ export type SentimentInstrument = {
358
+ __typename?: 'SentimentInstrument';
359
+ displayName: Scalars['String']['output'];
360
+ name: Scalars['String']['output'];
361
+ sentiment: Sentiment;
362
+ updatedAt: Scalars['String']['output'];
363
+ };
364
+
365
+ export enum Sort {
366
+ Bearish = 'BEARISH',
367
+ Bullish = 'BULLISH',
368
+ }
369
+
370
+ export type StrengthRelation = {
371
+ __typename?: 'StrengthRelation';
372
+ currency: CurrencyName;
373
+ percentage: Scalars['Float']['output'];
374
+ };
375
+
376
+ export type TimeCorrelation = {
377
+ __typename?: 'TimeCorrelation';
378
+ timeUnit: CorrelationTimeUnit;
379
+ value?: Maybe<Scalars['Float']['output']>;
380
+ };
381
+
382
+ export enum TimeSpan {
383
+ Day_1 = 'DAY_1',
384
+ Day_2 = 'DAY_2',
385
+ Hour_1 = 'HOUR_1',
386
+ Hour_12 = 'HOUR_12',
387
+ Month_1 = 'MONTH_1',
388
+ Month_3 = 'MONTH_3',
389
+ Month_6 = 'MONTH_6',
390
+ Week_1 = 'WEEK_1',
391
+ Week_2 = 'WEEK_2',
392
+ Week_3 = 'WEEK_3',
393
+ Year_1 = 'YEAR_1',
394
+ }
395
+
396
+ export type TopicalInstrument = {
397
+ __typename?: 'TopicalInstrument';
398
+ assetClass?: Maybe<AssetClassName>;
399
+ displayName: Scalars['String']['output'];
400
+ name: Scalars['String']['output'];
401
+ sentiment: Sentiment;
402
+ updatedAt: Scalars['String']['output'];
403
+ };
404
+
405
+ export type TopicalInstrumentChart = {
406
+ __typename?: 'TopicalInstrumentChart';
407
+ chart?: Maybe<Array<Scalars['Float']['output']>>;
408
+ name: Scalars['String']['output'];
409
+ };
410
+
411
+ export enum TopicalSort {
412
+ Bearish = 'BEARISH',
413
+ Bullish = 'BULLISH',
414
+ Hot = 'HOT',
415
+ Popular = 'POPULAR',
416
+ Volatile = 'VOLATILE',
417
+ }
418
+
419
+ export enum ValueAtRiskBars {
420
+ C100 = 'C100',
421
+ C200 = 'C200',
422
+ C300 = 'C300',
423
+ }
424
+
425
+ export type ValueAtRiskChart = {
426
+ __typename?: 'ValueAtRiskChart';
427
+ down: ValueAtRiskChartData;
428
+ up: ValueAtRiskChartData;
429
+ };
430
+
431
+ export type ValueAtRiskChartData = {
432
+ __typename?: 'ValueAtRiskChartData';
433
+ average: Scalars['Float']['output'];
434
+ max: Scalars['Float']['output'];
435
+ median: Scalars['Float']['output'];
436
+ points?: Maybe<Array<ValueAtRiskChartPoint>>;
437
+ threshold: Scalars['Float']['output'];
438
+ };
439
+
440
+ export type ValueAtRiskChartPoint = {
441
+ __typename?: 'ValueAtRiskChartPoint';
442
+ percent: Scalars['Float']['output'];
443
+ pips: Scalars['Float']['output'];
444
+ };
445
+
446
+ export enum ValueAtRiskDuration {
447
+ C1 = 'C1',
448
+ C2 = 'C2',
449
+ C3 = 'C3',
450
+ C4 = 'C4',
451
+ C5 = 'C5',
452
+ C10 = 'C10',
453
+ }
454
+
455
+ export type VolatilityChart = {
456
+ __typename?: 'VolatilityChart';
457
+ pips: Scalars['Float']['output'];
458
+ /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */
459
+ point: Scalars['String']['output'];
460
+ updatedAt: Scalars['String']['output'];
461
+ };
462
+
463
+ export enum VolatilityChartTimeSpan {
464
+ /** Valid for: H */
465
+ D5 = 'D5',
466
+ /** Valid for: H */
467
+ D10 = 'D10',
468
+ /** Valid for: D */
469
+ M1 = 'M1',
470
+ /** Valid for: D */
471
+ M3 = 'M3',
472
+ /** Valid for: W */
473
+ W5 = 'W5',
474
+ /** Valid for: W */
475
+ W10 = 'W10',
476
+ }
477
+
478
+ export enum VolatilityChartTimeUnit {
479
+ D = 'D',
480
+ H = 'H',
481
+ W = 'W',
482
+ }
483
+
484
+ export type GetPriceCandlesQueryVariables = Exact<{
485
+ division?: InputMaybe<Division>;
486
+ instrument: Scalars['String']['input'];
487
+ granularity: Granularity;
488
+ timeSpan: TimeSpan;
489
+ }>;
490
+
491
+ export type GetPriceCandlesQuery = {
492
+ __typename?: 'Query';
493
+ getPriceCandles: Array<{
494
+ __typename?: 'CandlesData';
495
+ time: string;
496
+ unixTime: number;
497
+ timeSpan: TimeSpan;
498
+ candle: { __typename?: 'Candle'; high: number };
499
+ }>;
500
+ };
501
+
502
+ export type ValidateInstrumentsQueryVariables = Exact<{
503
+ instruments:
504
+ | Array<InputMaybe<Scalars['String']['input']>>
505
+ | InputMaybe<Scalars['String']['input']>;
506
+ division?: InputMaybe<Division>;
507
+ }>;
508
+
509
+ export type ValidateInstrumentsQuery = {
510
+ __typename?: 'Query';
511
+ mapInstrumentNames?: Array<{
512
+ __typename?: 'Instrument';
513
+ name: string;
514
+ displayName: string;
515
+ } | null> | null;
516
+ };
517
+
518
+ export const GetPriceCandlesDocument = {
519
+ kind: 'Document',
520
+ definitions: [
521
+ {
522
+ kind: 'OperationDefinition',
523
+ operation: 'query',
524
+ name: { kind: 'Name', value: 'GetPriceCandles' },
525
+ variableDefinitions: [
526
+ {
527
+ kind: 'VariableDefinition',
528
+ variable: {
529
+ kind: 'Variable',
530
+ name: { kind: 'Name', value: 'division' },
531
+ },
532
+ type: {
533
+ kind: 'NamedType',
534
+ name: { kind: 'Name', value: 'Division' },
535
+ },
536
+ },
537
+ {
538
+ kind: 'VariableDefinition',
539
+ variable: {
540
+ kind: 'Variable',
541
+ name: { kind: 'Name', value: 'instrument' },
542
+ },
543
+ type: {
544
+ kind: 'NonNullType',
545
+ type: {
546
+ kind: 'NamedType',
547
+ name: { kind: 'Name', value: 'String' },
548
+ },
549
+ },
550
+ },
551
+ {
552
+ kind: 'VariableDefinition',
553
+ variable: {
554
+ kind: 'Variable',
555
+ name: { kind: 'Name', value: 'granularity' },
556
+ },
557
+ type: {
558
+ kind: 'NonNullType',
559
+ type: {
560
+ kind: 'NamedType',
561
+ name: { kind: 'Name', value: 'Granularity' },
562
+ },
563
+ },
564
+ },
565
+ {
566
+ kind: 'VariableDefinition',
567
+ variable: {
568
+ kind: 'Variable',
569
+ name: { kind: 'Name', value: 'timeSpan' },
570
+ },
571
+ type: {
572
+ kind: 'NonNullType',
573
+ type: {
574
+ kind: 'NamedType',
575
+ name: { kind: 'Name', value: 'TimeSpan' },
576
+ },
577
+ },
578
+ },
579
+ ],
580
+ selectionSet: {
581
+ kind: 'SelectionSet',
582
+ selections: [
583
+ {
584
+ kind: 'Field',
585
+ name: { kind: 'Name', value: 'getPriceCandles' },
586
+ arguments: [
587
+ {
588
+ kind: 'Argument',
589
+ name: { kind: 'Name', value: 'division' },
590
+ value: {
591
+ kind: 'Variable',
592
+ name: { kind: 'Name', value: 'division' },
593
+ },
594
+ },
595
+ {
596
+ kind: 'Argument',
597
+ name: { kind: 'Name', value: 'instrument' },
598
+ value: {
599
+ kind: 'Variable',
600
+ name: { kind: 'Name', value: 'instrument' },
601
+ },
602
+ },
603
+ {
604
+ kind: 'Argument',
605
+ name: { kind: 'Name', value: 'granularity' },
606
+ value: {
607
+ kind: 'Variable',
608
+ name: { kind: 'Name', value: 'granularity' },
609
+ },
610
+ },
611
+ {
612
+ kind: 'Argument',
613
+ name: { kind: 'Name', value: 'timeSpan' },
614
+ value: {
615
+ kind: 'Variable',
616
+ name: { kind: 'Name', value: 'timeSpan' },
617
+ },
618
+ },
619
+ ],
620
+ selectionSet: {
621
+ kind: 'SelectionSet',
622
+ selections: [
623
+ { kind: 'Field', name: { kind: 'Name', value: 'time' } },
624
+ { kind: 'Field', name: { kind: 'Name', value: 'unixTime' } },
625
+ {
626
+ kind: 'Field',
627
+ name: { kind: 'Name', value: 'candle' },
628
+ selectionSet: {
629
+ kind: 'SelectionSet',
630
+ selections: [
631
+ { kind: 'Field', name: { kind: 'Name', value: 'high' } },
632
+ ],
633
+ },
634
+ },
635
+ { kind: 'Field', name: { kind: 'Name', value: 'timeSpan' } },
636
+ ],
637
+ },
638
+ },
639
+ ],
640
+ },
641
+ },
642
+ ],
643
+ } as unknown as DocumentNode<
644
+ GetPriceCandlesQuery,
645
+ GetPriceCandlesQueryVariables
646
+ >;
647
+ export const ValidateInstrumentsDocument = {
648
+ kind: 'Document',
649
+ definitions: [
650
+ {
651
+ kind: 'OperationDefinition',
652
+ operation: 'query',
653
+ name: { kind: 'Name', value: 'validateInstruments' },
654
+ variableDefinitions: [
655
+ {
656
+ kind: 'VariableDefinition',
657
+ variable: {
658
+ kind: 'Variable',
659
+ name: { kind: 'Name', value: 'instruments' },
660
+ },
661
+ type: {
662
+ kind: 'NonNullType',
663
+ type: {
664
+ kind: 'ListType',
665
+ type: {
666
+ kind: 'NamedType',
667
+ name: { kind: 'Name', value: 'String' },
668
+ },
669
+ },
670
+ },
671
+ },
672
+ {
673
+ kind: 'VariableDefinition',
674
+ variable: {
675
+ kind: 'Variable',
676
+ name: { kind: 'Name', value: 'division' },
677
+ },
678
+ type: {
679
+ kind: 'NamedType',
680
+ name: { kind: 'Name', value: 'Division' },
681
+ },
682
+ },
683
+ ],
684
+ selectionSet: {
685
+ kind: 'SelectionSet',
686
+ selections: [
687
+ {
688
+ kind: 'Field',
689
+ name: { kind: 'Name', value: 'mapInstrumentNames' },
690
+ arguments: [
691
+ {
692
+ kind: 'Argument',
693
+ name: { kind: 'Name', value: 'instruments' },
694
+ value: {
695
+ kind: 'Variable',
696
+ name: { kind: 'Name', value: 'instruments' },
697
+ },
698
+ },
699
+ {
700
+ kind: 'Argument',
701
+ name: { kind: 'Name', value: 'division' },
702
+ value: {
703
+ kind: 'Variable',
704
+ name: { kind: 'Name', value: 'division' },
705
+ },
706
+ },
707
+ ],
708
+ selectionSet: {
709
+ kind: 'SelectionSet',
710
+ selections: [
711
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
712
+ { kind: 'Field', name: { kind: 'Name', value: 'displayName' } },
713
+ ],
714
+ },
715
+ },
716
+ ],
717
+ },
718
+ },
719
+ ],
720
+ } as unknown as DocumentNode<
721
+ ValidateInstrumentsQuery,
722
+ ValidateInstrumentsQueryVariables
723
+ >;