@oanda/labs-order-book-widget 1.0.173 → 1.0.174

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 (94) hide show
  1. package/CHANGELOG.md +684 -0
  2. package/dist/main/OrderBookWidget/ChartWithData.js +4 -4
  3. package/dist/main/OrderBookWidget/ChartWithData.js.map +1 -1
  4. package/dist/main/OrderBookWidget/Main.js +11 -11
  5. package/dist/main/OrderBookWidget/Main.js.map +1 -1
  6. package/dist/main/OrderBookWidget/OrderBookWidget.js +9 -9
  7. package/dist/main/OrderBookWidget/OrderBookWidget.js.map +1 -1
  8. package/dist/main/OrderBookWidget/components/Chart/Chart.js +14 -14
  9. package/dist/main/OrderBookWidget/components/Chart/Chart.js.map +1 -1
  10. package/dist/main/OrderBookWidget/components/Chart/formatters.js.map +1 -1
  11. package/dist/main/OrderBookWidget/components/Chart/getOption.js.map +1 -1
  12. package/dist/main/OrderBookWidget/components/Chart/types.js.map +1 -1
  13. package/dist/main/OrderBookWidget/config.js.map +1 -1
  14. package/dist/main/OrderBookWidget/render.js +9 -9
  15. package/dist/main/OrderBookWidget/render.js.map +1 -1
  16. package/dist/main/OrderBookWidget/types.js.map +1 -1
  17. package/dist/main/gql/getOrderPositionBooks.js +5 -1
  18. package/dist/main/gql/getOrderPositionBooks.js.map +1 -1
  19. package/dist/main/gql/types/fragment-masking.js.map +1 -1
  20. package/dist/main/gql/types/gql.js +1 -1
  21. package/dist/main/gql/types/gql.js.map +1 -1
  22. package/dist/main/gql/types/graphql.js +114 -114
  23. package/dist/main/gql/types/graphql.js.map +1 -1
  24. package/dist/main/gql/types/index.js.map +1 -1
  25. package/dist/main/index.js +8 -8
  26. package/dist/main/index.js.map +1 -1
  27. package/dist/main/translations/index.js +1 -1
  28. package/dist/main/translations/index.js.map +1 -1
  29. package/dist/main/translations/translations.js.map +1 -1
  30. package/dist/module/OrderBookWidget/ChartWithData.js +4 -4
  31. package/dist/module/OrderBookWidget/ChartWithData.js.map +1 -1
  32. package/dist/module/OrderBookWidget/Main.js +10 -10
  33. package/dist/module/OrderBookWidget/Main.js.map +1 -1
  34. package/dist/module/OrderBookWidget/OrderBookWidget.js +9 -9
  35. package/dist/module/OrderBookWidget/OrderBookWidget.js.map +1 -1
  36. package/dist/module/OrderBookWidget/components/Chart/Chart.js +14 -14
  37. package/dist/module/OrderBookWidget/components/Chart/Chart.js.map +1 -1
  38. package/dist/module/OrderBookWidget/components/Chart/formatters.js.map +1 -1
  39. package/dist/module/OrderBookWidget/components/Chart/getOption.js +1 -1
  40. package/dist/module/OrderBookWidget/components/Chart/getOption.js.map +1 -1
  41. package/dist/module/OrderBookWidget/components/Chart/types.js.map +1 -1
  42. package/dist/module/OrderBookWidget/config.js +1 -1
  43. package/dist/module/OrderBookWidget/config.js.map +1 -1
  44. package/dist/module/OrderBookWidget/render.js +10 -10
  45. package/dist/module/OrderBookWidget/render.js.map +1 -1
  46. package/dist/module/OrderBookWidget/types.js.map +1 -1
  47. package/dist/module/gql/getOrderPositionBooks.js +5 -1
  48. package/dist/module/gql/getOrderPositionBooks.js.map +1 -1
  49. package/dist/module/gql/types/fragment-masking.js.map +1 -1
  50. package/dist/module/gql/types/gql.js +1 -1
  51. package/dist/module/gql/types/gql.js.map +1 -1
  52. package/dist/module/gql/types/graphql.js +114 -114
  53. package/dist/module/gql/types/graphql.js.map +1 -1
  54. package/dist/module/gql/types/index.js +2 -2
  55. package/dist/module/gql/types/index.js.map +1 -1
  56. package/dist/module/index.js +1 -1
  57. package/dist/module/index.js.map +1 -1
  58. package/dist/module/translations/index.js +1 -1
  59. package/dist/module/translations/index.js.map +1 -1
  60. package/dist/module/translations/translations.js.map +1 -1
  61. package/dist/types/OrderBookWidget/ChartWithData.d.ts +2 -2
  62. package/dist/types/OrderBookWidget/Main.d.ts +1 -1
  63. package/dist/types/OrderBookWidget/OrderBookWidget.d.ts +1 -1
  64. package/dist/types/OrderBookWidget/components/Chart/Chart.d.ts +1 -1
  65. package/dist/types/OrderBookWidget/components/Chart/formatters.d.ts +1 -1
  66. package/dist/types/OrderBookWidget/components/Chart/getOption.d.ts +1 -1
  67. package/dist/types/OrderBookWidget/components/Chart/types.d.ts +2 -2
  68. package/dist/types/OrderBookWidget/config.d.ts +1 -1
  69. package/dist/types/OrderBookWidget/types.d.ts +2 -2
  70. package/dist/types/gql/types/gql.d.ts +2 -2
  71. package/dist/types/gql/types/index.d.ts +2 -2
  72. package/dist/types/index.d.ts +1 -1
  73. package/dist/types/translations/index.d.ts +2 -2
  74. package/package.json +3 -3
  75. package/src/OrderBookWidget/ChartWithData.tsx +40 -39
  76. package/src/OrderBookWidget/Main.tsx +48 -30
  77. package/src/OrderBookWidget/OrderBookWidget.tsx +8 -8
  78. package/src/OrderBookWidget/components/Chart/Chart.tsx +41 -29
  79. package/src/OrderBookWidget/components/Chart/formatters.ts +11 -4
  80. package/src/OrderBookWidget/components/Chart/getOption.ts +205 -188
  81. package/src/OrderBookWidget/components/Chart/types.ts +10 -13
  82. package/src/OrderBookWidget/config.ts +76 -53
  83. package/src/OrderBookWidget/render.tsx +81 -52
  84. package/src/OrderBookWidget/types.ts +3 -2
  85. package/src/gql/getOrderPositionBooks.ts +5 -1
  86. package/src/gql/types/fragment-masking.ts +41 -21
  87. package/src/gql/types/gql.ts +7 -3
  88. package/src/gql/types/graphql.ts +165 -44
  89. package/src/gql/types/index.ts +2 -2
  90. package/src/index.ts +1 -1
  91. package/src/translations/index.ts +4 -4
  92. package/src/translations/translations.ts +1 -3
  93. package/test/Main.test.tsx +12 -9
  94. package/test/chartOptions.test.ts +18 -12
@@ -1,23 +1,28 @@
1
- import { colorPalette, getGridLines, getZoomControls } from '@oanda/labs-widget-common';
2
1
  import {
3
- INITIAL_BARS,
4
- CHART_WIDTH,
2
+ colorPalette,
3
+ getGridLines,
4
+ getZoomControls,
5
+ } from '@oanda/labs-widget-common';
6
+
7
+ import {
5
8
  CHART_HEIGHT_DESKTOP,
6
9
  CHART_HEIGHT_MOBILE,
10
+ CHART_WIDTH,
11
+ INITIAL_BARS,
7
12
  X_LABEL_SIZE,
8
13
  Y_LABEL_SIZE_DESKTOP,
9
14
  Y_LABEL_SIZE_MOBILE,
10
15
  ZOOM_CONTROL_HEIGHT,
11
16
  } from './constants';
12
- import { GetOptionType, GetResponsiveOptionsProps } from './types';
13
17
  import { tooltipFormatter } from './formatters';
18
+ import type { GetOptionType, GetResponsiveOptionsProps } from './types';
14
19
 
15
- export const getResponsiveOption = (
16
- {
17
- isDark, isOrderBook, isDesktop, lang,
18
- }
19
- : GetResponsiveOptionsProps,
20
- ) => {
20
+ export const getResponsiveOption = ({
21
+ isDark,
22
+ isOrderBook,
23
+ isDesktop,
24
+ lang,
25
+ }: GetResponsiveOptionsProps) => {
21
26
  const desktopGridLines = getGridLines({
22
27
  isDark,
23
28
  chartWidth: CHART_WIDTH,
@@ -136,221 +141,233 @@ export const getResponsiveOption = (
136
141
  };
137
142
 
138
143
  export const getOption: GetOptionType = ({
139
- data, precision, isDark, isOrderBook, isDesktop, lang,
144
+ data,
145
+ precision,
146
+ isDark,
147
+ isOrderBook,
148
+ isDesktop,
149
+ lang,
140
150
  }) => {
141
151
  const buckets = data.orderPositionBooks[0]?.buckets || [];
142
152
  const bucketWidth = data.orderPositionBooks[0]?.bucketWidth!;
143
153
  const price = data.orderPositionBooks[0]?.price!;
144
154
  const bucketPrecision = bucketWidth.toString().split('.')[1].length || 0;
145
155
 
146
- const dataset = buckets.map((item) => ([
156
+ const dataset = buckets.map((item) => [
147
157
  item!.price,
148
158
  Number(item!.longCountPercent),
149
159
  Number(item!.shortCountPercent) * -1,
150
- ]));
160
+ ]);
151
161
 
152
- const zoomInitialStartValue = price - (bucketWidth * INITIAL_BARS * 0.5);
153
- const zoomInitialEndValue = price + (bucketWidth * INITIAL_BARS * 0.5);
162
+ const zoomInitialStartValue = price - bucketWidth * INITIAL_BARS * 0.5;
163
+ const zoomInitialEndValue = price + bucketWidth * INITIAL_BARS * 0.5;
154
164
 
155
165
  const max = Math.max(...dataset.map((item) => item[1]));
156
166
  const min = Math.abs(Math.min(...dataset.map((item) => item[2])));
157
167
 
158
168
  const range = max > min ? max : min;
159
169
 
160
- return (
161
- {
162
- animation: false,
163
- color: [
164
- colorPalette.bottleGreenLight,
165
- isDark ? colorPalette.orange : colorPalette.raspberryDark,
166
- ],
167
- title: {
168
- text: lang(isOrderBook ? 'open_orders' : 'open_positions').toUpperCase(),
169
- padding: 20,
170
- textStyle: {
171
- fontSize: 14,
172
- },
173
- },
174
- toolbox: {
175
- feature: getZoomControls({
176
- resetStartValue: zoomInitialStartValue,
177
- resetEndValue: zoomInitialEndValue,
178
- }),
170
+ return {
171
+ animation: false,
172
+ color: [
173
+ colorPalette.bottleGreenLight,
174
+ isDark ? colorPalette.orange : colorPalette.raspberryDark,
175
+ ],
176
+ title: {
177
+ text: lang(isOrderBook ? 'open_orders' : 'open_positions').toUpperCase(),
178
+ padding: 20,
179
+ textStyle: {
180
+ fontSize: 14,
179
181
  },
180
- dataZoom: [
181
- {
182
- type: 'inside',
183
- realtime: true,
184
- startValue: zoomInitialStartValue,
185
- endValue: zoomInitialEndValue,
182
+ },
183
+ toolbox: {
184
+ feature: getZoomControls({
185
+ resetStartValue: zoomInitialStartValue,
186
+ resetEndValue: zoomInitialEndValue,
187
+ }),
188
+ },
189
+ dataZoom: [
190
+ {
191
+ type: 'inside',
192
+ realtime: true,
193
+ startValue: zoomInitialStartValue,
194
+ endValue: zoomInitialEndValue,
186
195
 
187
- yAxisIndex: 0,
188
- minValueSpan: 10 * bucketWidth,
189
- },
190
- ],
191
- tooltip: {
192
- trigger: 'axis',
193
- axisPointer: {
194
- axis: 'y',
195
- },
196
- formatter: (val) => tooltipFormatter({
196
+ yAxisIndex: 0,
197
+ minValueSpan: 10 * bucketWidth,
198
+ },
199
+ ],
200
+ tooltip: {
201
+ trigger: 'axis',
202
+ axisPointer: {
203
+ axis: 'y',
204
+ },
205
+ formatter: (val) =>
206
+ tooltipFormatter({
197
207
  data: (val as { data: number[] }[])[0].data,
198
208
  precision: bucketPrecision,
199
209
  isOrderBook,
200
210
  lang,
201
211
  }),
202
- extraCssText: 'z-index: 1',
203
- },
204
- grid: [
205
- {
206
- name: 'main-grid',
207
- top: '48px',
208
- left: '0px',
209
- right: `${isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE}px`,
210
- bottom: `${isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT}px`,
211
- },
212
- ],
213
- xAxis: {
214
- type: 'value',
215
- min: Math.floor(range * -1.1),
216
- max: Math.ceil(range * 1.1),
217
- axisTick: { show: false },
218
- axisLine: { show: false },
219
- axisLabel: {
220
- padding: [7, 12, 0, 12],
221
- formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),
222
- hideOverlap: true,
223
- alignMaxLabel: 'right',
224
- alignMinLabel: 'left',
225
- },
212
+ extraCssText: 'z-index: 1',
213
+ },
214
+ grid: [
215
+ {
216
+ name: 'main-grid',
217
+ top: '48px',
218
+ left: '0px',
219
+ right: `${isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE}px`,
220
+ bottom: `${isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT}px`,
226
221
  },
227
- yAxis: {
228
- type: 'value',
229
- position: 'right',
230
- axisLine: { show: false },
231
- axisTick: { show: false },
232
- axisLabel: {
233
- overflow: 'truncate',
234
- width: (isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE) - 10,
235
- margin: isDesktop ? 10 : 0,
236
- showMaxLabel: false,
237
- showMinLabel: false,
238
- padding: [0, 0, 0, 10],
239
- formatter: (value) => value.toFixed(bucketPrecision),
240
- },
222
+ ],
223
+ xAxis: {
224
+ type: 'value',
225
+ min: Math.floor(range * -1.1),
226
+ max: Math.ceil(range * 1.1),
227
+ axisTick: { show: false },
228
+ axisLine: { show: false },
229
+ axisLabel: {
230
+ padding: [7, 12, 0, 12],
231
+ formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),
232
+ hideOverlap: true,
233
+ alignMaxLabel: 'right',
234
+ alignMinLabel: 'left',
241
235
  },
242
- dataset: {
243
- source: dataset,
236
+ },
237
+ yAxis: {
238
+ type: 'value',
239
+ position: 'right',
240
+ axisLine: { show: false },
241
+ axisTick: { show: false },
242
+ axisLabel: {
243
+ overflow: 'truncate',
244
+ width: (isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE) - 10,
245
+ margin: isDesktop ? 10 : 0,
246
+ showMaxLabel: false,
247
+ showMinLabel: false,
248
+ padding: [0, 0, 0, 10],
249
+ formatter: (value) => value.toFixed(bucketPrecision),
244
250
  },
245
- series: [
246
- {
247
- type: 'custom',
248
- name: 'sell-short',
249
- id: 'sell-short',
250
- clip: true,
251
- encode: {
252
- x: 1,
253
- y: 0,
254
- tooltip: 1,
255
- },
256
- renderItem: (params, api) => {
257
- const yValue = api.value(0);
258
- const xStart = api.coord([api.value(1), yValue]);
259
- const xEnd = api.coord([0, yValue]);
260
- const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;
261
- const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;
251
+ },
252
+ dataset: {
253
+ source: dataset,
254
+ },
255
+ series: [
256
+ {
257
+ type: 'custom',
258
+ name: 'sell-short',
259
+ id: 'sell-short',
260
+ clip: true,
261
+ encode: {
262
+ x: 1,
263
+ y: 0,
264
+ tooltip: 1,
265
+ },
266
+ renderItem: (params, api) => {
267
+ const yValue = api.value(0);
268
+ const xStart = api.coord([api.value(1), yValue]);
269
+ const xEnd = api.coord([0, yValue]);
270
+ const bucketWidthHeight = api.size
271
+ ? (api.size([0, bucketWidth]) as number[])[1]
272
+ : 0;
273
+ const height =
274
+ bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;
262
275
 
263
- const rectShape = {
264
- x: xStart[0] + 0.5,
265
- y: xStart[1] - height / 2,
266
- width: xEnd[0] - xStart[0],
267
- height,
268
- };
276
+ const rectShape = {
277
+ x: xStart[0] + 0.5,
278
+ y: xStart[1] - height / 2,
279
+ width: xEnd[0] - xStart[0],
280
+ height,
281
+ };
269
282
 
270
- return {
271
- type: 'rect',
272
- shape: rectShape,
273
- emphasis: {
274
- style: {
275
- fill: colorPalette.bottleGreenLight,
276
- },
277
- },
283
+ return {
284
+ type: 'rect',
285
+ shape: rectShape,
286
+ emphasis: {
278
287
  style: {
279
- fill: api.visual('color'),
288
+ fill: colorPalette.bottleGreenLight,
280
289
  },
281
- };
282
- },
290
+ },
291
+ style: {
292
+ fill: api.visual('color'),
293
+ },
294
+ };
283
295
  },
284
- {
285
- type: 'custom',
286
- name: 'buy-long',
287
- id: 'buy-long',
288
- clip: true,
289
- encode: {
290
- x: 1,
291
- y: 0,
292
- tooltip: 2,
293
- },
294
- renderItem: (params, api) => {
295
- const yValue = api.value(0);
296
- const xStart = api.coord([api.value(2), yValue]);
297
- const xEnd = api.coord([0, yValue]);
298
- const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;
299
- const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;
296
+ },
297
+ {
298
+ type: 'custom',
299
+ name: 'buy-long',
300
+ id: 'buy-long',
301
+ clip: true,
302
+ encode: {
303
+ x: 1,
304
+ y: 0,
305
+ tooltip: 2,
306
+ },
307
+ renderItem: (params, api) => {
308
+ const yValue = api.value(0);
309
+ const xStart = api.coord([api.value(2), yValue]);
310
+ const xEnd = api.coord([0, yValue]);
311
+ const bucketWidthHeight = api.size
312
+ ? (api.size([0, bucketWidth]) as number[])[1]
313
+ : 0;
314
+ const height =
315
+ bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;
300
316
 
301
- const rectShape = {
302
- x: xStart[0] - 0.5,
303
- y: xStart[1] - height / 2,
304
- width: xEnd[0] - xStart[0],
305
- height,
306
- };
317
+ const rectShape = {
318
+ x: xStart[0] - 0.5,
319
+ y: xStart[1] - height / 2,
320
+ width: xEnd[0] - xStart[0],
321
+ height,
322
+ };
307
323
 
308
- return {
309
- type: 'rect',
310
- shape: rectShape,
311
- emphasis: {
312
- style: {
313
- fill: isDark ? colorPalette.orange : colorPalette.raspberryDark,
314
- },
315
- },
324
+ return {
325
+ type: 'rect',
326
+ shape: rectShape,
327
+ emphasis: {
316
328
  style: {
317
- fill: api.visual('color'),
329
+ fill: isDark ? colorPalette.orange : colorPalette.raspberryDark,
318
330
  },
319
- };
320
- },
321
- },
322
- {
323
- type: 'custom',
324
- name: 'current-price',
325
- id: 'current-price',
326
- markLine: {
327
- animation: false,
328
- silent: true,
329
- precision,
330
- symbol: ['none', 'triangle'],
331
- symbolOffset: [0, [0, isDesktop ? 0 : -10]] as unknown as number,
332
- symbolRotate: 90,
333
- symbolSize: [20, 10],
334
- lineStyle: {
335
- color: isDark ? colorPalette.orange : colorPalette.bottleGreenDark,
336
- width: 1,
337
331
  },
338
- label: {
339
- distance: isDesktop ? 5 : -5,
340
- overflow: 'truncate',
341
- width: isDesktop ? undefined : Y_LABEL_SIZE_MOBILE,
342
- color: isDark ? colorPalette.black : colorPalette.white,
343
- backgroundColor: isDark ? colorPalette.orange : colorPalette.bottleGreenDark,
332
+ style: {
333
+ fill: api.visual('color'),
344
334
  },
345
- data: [
346
- {
347
- yAxis: price,
348
- },
349
- ],
335
+ };
336
+ },
337
+ },
338
+ {
339
+ type: 'custom',
340
+ name: 'current-price',
341
+ id: 'current-price',
342
+ markLine: {
343
+ animation: false,
344
+ silent: true,
345
+ precision,
346
+ symbol: ['none', 'triangle'],
347
+ symbolOffset: [0, [0, isDesktop ? 0 : -10]] as unknown as number,
348
+ symbolRotate: 90,
349
+ symbolSize: [20, 10],
350
+ lineStyle: {
351
+ color: isDark ? colorPalette.orange : colorPalette.bottleGreenDark,
352
+ width: 1,
353
+ },
354
+ label: {
355
+ distance: isDesktop ? 5 : -5,
356
+ overflow: 'truncate',
357
+ width: isDesktop ? undefined : Y_LABEL_SIZE_MOBILE,
358
+ color: isDark ? colorPalette.black : colorPalette.white,
359
+ backgroundColor: isDark
360
+ ? colorPalette.orange
361
+ : colorPalette.bottleGreenDark,
350
362
  },
351
- renderItem: () => null,
363
+ data: [
364
+ {
365
+ yAxis: price,
366
+ },
367
+ ],
352
368
  },
353
- ],
354
- }
355
- );
369
+ renderItem: () => null,
370
+ },
371
+ ],
372
+ };
356
373
  };
@@ -1,5 +1,6 @@
1
- import { EChartsOption } from 'echarts';
2
- import { GetOrderPositionBooksQuery } from '../../../gql/types/graphql';
1
+ import type { EChartsOption } from 'echarts';
2
+
3
+ import type { GetOrderPositionBooksQuery } from '../../../gql/types/graphql';
3
4
 
4
5
  export interface ChartProps {
5
6
  data: GetOrderPositionBooksQuery;
@@ -23,15 +24,11 @@ export interface GetOptionProps {
23
24
  lang: (label: string) => string;
24
25
  }
25
26
 
26
- export type GetOptionType = (
27
- props: GetOptionProps,
28
- ) => EChartsOption;
27
+ export type GetOptionType = (props: GetOptionProps) => EChartsOption;
29
28
 
30
- export type TooltipFormatterType = (
31
- props : {
32
- data: number[],
33
- precision: number,
34
- isOrderBook: boolean,
35
- lang: (label: string) => string;
36
- }
37
- ) => string;
29
+ export type TooltipFormatterType = (props: {
30
+ data: number[];
31
+ precision: number;
32
+ isOrderBook: boolean;
33
+ lang: (label: string) => string;
34
+ }) => string;
@@ -1,67 +1,87 @@
1
1
  import { BookType } from '../gql/types/graphql';
2
2
  import { InstrumentId } from './types';
3
3
 
4
- const navigationConfig = [{
5
- id: BookType.Order,
6
- label: 'order_book',
7
- }, {
8
- id: BookType.Position,
9
- label: 'position_book',
10
- }];
4
+ const navigationConfig = [
5
+ {
6
+ id: BookType.Order,
7
+ label: 'order_book',
8
+ },
9
+ {
10
+ id: BookType.Position,
11
+ label: 'position_book',
12
+ },
13
+ ];
11
14
 
12
- const instrumentSelectConfigOC = [{
13
- id: InstrumentId.EUR_AUD,
14
- label: 'EUR/AUD',
15
- }, {
16
- id: InstrumentId.EUR_GBP,
17
- label: 'EUR/GBP',
18
- }, {
19
- id: InstrumentId.EUR_JPY,
20
- label: 'EUR/JPY',
21
- }, {
22
- id: InstrumentId.EUR_USD,
23
- label: 'EUR/USD',
24
- }, {
25
- id: InstrumentId.EUR_CHF,
26
- label: 'EUR/CHF',
27
- }, {
28
- id: InstrumentId.USD_CHF,
29
- label: 'USD/CHF',
30
- }, {
31
- id: InstrumentId.USD_JPY,
32
- label: 'USD/JPY',
33
- }, {
34
- id: InstrumentId.USD_CAD,
35
- label: 'USD/CAD',
36
- }, {
37
- id: InstrumentId.GBP_USD,
38
- label: 'GBP/USD',
39
- }, {
40
- id: InstrumentId.GBP_JPY,
41
- label: 'GBP/JPY',
42
- }, {
43
- id: InstrumentId.GBP_CHF,
44
- label: 'GBP/CHF',
45
- }, {
46
- id: InstrumentId.AUD_JPY,
47
- label: 'AUD/JPY',
48
- }, {
49
- id: InstrumentId.AUD_USD,
50
- label: 'AUD/USD',
51
- }, {
52
- id: InstrumentId.NZD_USD,
53
- label: 'NZD/USD',
54
- }];
15
+ const instrumentSelectConfigOC = [
16
+ {
17
+ id: InstrumentId.EUR_AUD,
18
+ label: 'EUR/AUD',
19
+ },
20
+ {
21
+ id: InstrumentId.EUR_GBP,
22
+ label: 'EUR/GBP',
23
+ },
24
+ {
25
+ id: InstrumentId.EUR_JPY,
26
+ label: 'EUR/JPY',
27
+ },
28
+ {
29
+ id: InstrumentId.EUR_USD,
30
+ label: 'EUR/USD',
31
+ },
32
+ {
33
+ id: InstrumentId.EUR_CHF,
34
+ label: 'EUR/CHF',
35
+ },
36
+ {
37
+ id: InstrumentId.USD_CHF,
38
+ label: 'USD/CHF',
39
+ },
40
+ {
41
+ id: InstrumentId.USD_JPY,
42
+ label: 'USD/JPY',
43
+ },
44
+ {
45
+ id: InstrumentId.USD_CAD,
46
+ label: 'USD/CAD',
47
+ },
48
+ {
49
+ id: InstrumentId.GBP_USD,
50
+ label: 'GBP/USD',
51
+ },
52
+ {
53
+ id: InstrumentId.GBP_JPY,
54
+ label: 'GBP/JPY',
55
+ },
56
+ {
57
+ id: InstrumentId.GBP_CHF,
58
+ label: 'GBP/CHF',
59
+ },
60
+ {
61
+ id: InstrumentId.AUD_JPY,
62
+ label: 'AUD/JPY',
63
+ },
64
+ {
65
+ id: InstrumentId.AUD_USD,
66
+ label: 'AUD/USD',
67
+ },
68
+ {
69
+ id: InstrumentId.NZD_USD,
70
+ label: 'NZD/USD',
71
+ },
72
+ ];
55
73
 
56
74
  const instrumentSelectConfig = [
57
75
  ...instrumentSelectConfigOC,
58
76
  {
59
77
  id: InstrumentId.XAU_USD,
60
78
  label: 'XAU/USD',
61
- }, {
79
+ },
80
+ {
62
81
  id: InstrumentId.XAG_USD,
63
82
  label: 'XAG/USD',
64
- }];
83
+ },
84
+ ];
65
85
 
66
86
  const instrumentPrecisionConfig: Record<InstrumentId, number> = {
67
87
  [InstrumentId.EUR_AUD]: 5,
@@ -82,5 +102,8 @@ const instrumentPrecisionConfig: Record<InstrumentId, number> = {
82
102
  [InstrumentId.XAG_USD]: 5,
83
103
  };
84
104
  export {
85
- navigationConfig, instrumentSelectConfig, instrumentPrecisionConfig, instrumentSelectConfigOC,
105
+ instrumentPrecisionConfig,
106
+ instrumentSelectConfig,
107
+ instrumentSelectConfigOC,
108
+ navigationConfig,
86
109
  };