@oanda/labs-order-book-widget 1.0.88 → 1.0.90
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.
- package/CHANGELOG.md +692 -0
- package/dist/main/OrderBookWidget/ChartWithData.js +12 -2
- package/dist/main/OrderBookWidget/ChartWithData.js.map +1 -1
- package/dist/main/OrderBookWidget/components/Chart/getOption.js +2 -1
- package/dist/main/OrderBookWidget/components/Chart/getOption.js.map +1 -1
- package/dist/main/OrderBookWidget/constants.js +8 -0
- package/dist/main/OrderBookWidget/constants.js.map +1 -0
- package/dist/main/gql/getOrderPositionBooks.js +1 -1
- package/dist/main/gql/getOrderPositionBooks.js.map +1 -1
- package/dist/main/gql/types/gql.js +1 -1
- package/dist/main/gql/types/gql.js.map +1 -1
- package/dist/main/gql/types/graphql.js +40 -1
- package/dist/main/gql/types/graphql.js.map +1 -1
- package/dist/main/translations/sources/en.json +2 -0
- package/dist/main/translations/sources/zh_TW.json +2 -0
- package/dist/module/OrderBookWidget/ChartWithData.js +13 -3
- package/dist/module/OrderBookWidget/ChartWithData.js.map +1 -1
- package/dist/module/OrderBookWidget/components/Chart/getOption.js +2 -1
- package/dist/module/OrderBookWidget/components/Chart/getOption.js.map +1 -1
- package/dist/module/OrderBookWidget/constants.js +3 -0
- package/dist/module/OrderBookWidget/constants.js.map +1 -0
- package/dist/module/gql/getOrderPositionBooks.js +1 -1
- package/dist/module/gql/getOrderPositionBooks.js.map +1 -1
- package/dist/module/gql/types/gql.js +1 -1
- package/dist/module/gql/types/gql.js.map +1 -1
- package/dist/module/gql/types/graphql.js +39 -0
- package/dist/module/gql/types/graphql.js.map +1 -1
- package/dist/module/translations/sources/en.json +2 -0
- package/dist/module/translations/sources/zh_TW.json +2 -0
- package/dist/types/OrderBookWidget/constants.d.ts +2 -0
- package/dist/types/gql/types/gql.d.ts +2 -2
- package/dist/types/gql/types/graphql.d.ts +87 -9
- package/package.json +3 -3
- package/src/OrderBookWidget/ChartWithData.tsx +51 -40
- package/src/OrderBookWidget/components/Chart/getOption.ts +2 -1
- package/src/OrderBookWidget/constants.ts +3 -0
- package/src/gql/getOrderPositionBooks.ts +1 -0
- package/src/gql/types/gql.ts +2 -2
- package/src/gql/types/graphql.ts +101 -11
- package/src/translations/sources/en.json +2 -0
- package/src/translations/sources/zh_TW.json +2 -0
- package/test/Main.test.tsx +11 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOption.js","names":["colorPalette","getGridLines","getZoomControls","INITIAL_BARS","CHART_WIDTH","CHART_HEIGHT_DESKTOP","CHART_HEIGHT_MOBILE","X_LABEL_SIZE","Y_LABEL_SIZE_DESKTOP","Y_LABEL_SIZE_MOBILE","ZOOM_CONTROL_HEIGHT","tooltipFormatter","getResponsiveOption","_ref","isDark","isOrderBook","isDesktop","lang","desktopGridLines","chartWidth","chartHeight","xLabelsSize","yLabelSize","bottomLeftBox","marginBottom","grid","name","top","left","right","concat","bottom","yAxis","axisLabel","margin","series","type","id","markLine","label","padding","graphic","silent","children","z","shape","width","height","style","fill","darkGray","white","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","black","text","getOption","_ref2","_data$orderPositionBo","_data$orderPositionBo2","_data$orderPositionBo3","data","precision","buckets","orderPositionBooks","bucketWidth","price","bucketPrecision","toString","split","length","dataset","map","item","Number","longCountPercent","shortCountPercent","zoomInitialStartValue","zoomInitialEndValue","max","Math","min","abs","range","animation","color","bottleGreenLight","orange","raspberryDark","title","toUpperCase","textStyle","fontSize","toolbox","feature","resetStartValue","resetEndValue","dataZoom","realtime","startValue","endValue","yAxisIndex","minValueSpan","tooltip","trigger","axisPointer","axis","formatter","val","extraCssText","xAxis","splitNumber","axisTick","show","axisLine","showMinLabel","showMaxLabel","value","position","overflow","toFixed","source","clip","encode","x","y","renderItem","params","api","yValue","xStart","coord","xEnd","bucketWidthHeight","size","rectShape","emphasis","visual","symbol","symbolRotate","symbolSize","lineStyle","bottleGreenDark","undefined","backgroundColor"],"sources":["../../../../../src/OrderBookWidget/components/Chart/getOption.ts"],"sourcesContent":["import { colorPalette, getGridLines, getZoomControls } from '@oanda/labs-widget-common';\nimport {\n INITIAL_BARS,\n CHART_WIDTH,\n CHART_HEIGHT_DESKTOP,\n CHART_HEIGHT_MOBILE,\n X_LABEL_SIZE,\n Y_LABEL_SIZE_DESKTOP,\n Y_LABEL_SIZE_MOBILE,\n ZOOM_CONTROL_HEIGHT,\n} from './constants';\nimport { GetOptionType, GetResponsiveOptionsProps } from './types';\nimport { tooltipFormatter } from './formatters';\n\nexport const getResponsiveOption = (\n {\n isDark, isOrderBook, isDesktop, lang,\n }\n : GetResponsiveOptionsProps,\n) => {\n const desktopGridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: isDesktop ? CHART_HEIGHT_DESKTOP : CHART_HEIGHT_MOBILE,\n xLabelsSize: isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT,\n yLabelSize: isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE,\n bottomLeftBox: isDesktop,\n marginBottom: isDesktop ? 0 : ZOOM_CONTROL_HEIGHT,\n });\n\n return {\n grid: [\n {\n name: 'main-grid',\n top: '48px',\n left: '0px',\n right: `${isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE}px`,\n bottom: `${isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT}px`,\n },\n ],\n yAxis: {\n axisLabel: {\n margin: isDesktop ? 10 : 0,\n },\n },\n series: [\n {\n type: 'custom',\n name: 'current-price',\n id: 'current-price',\n markLine: {\n label: {\n padding: isDesktop ? [5, 15, 5, 15] : [5, 12, 5, 5],\n },\n },\n },\n ],\n graphic: [\n ...desktopGridLines,\n {\n type: 'group',\n left: '8px',\n top: '56px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n left: 'center',\n top: 'middle',\n shape: {\n width: 70,\n height: 30,\n },\n style: {\n fill: isDark ? colorPalette.darkGray : colorPalette.white,\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n left: 'center',\n top: 'middle',\n style: {\n fill: isDark ? colorPalette.white : colorPalette.black,\n width: 70,\n height: 30,\n text: lang(isOrderBook ? 'sell' : 'short'),\n },\n },\n ],\n },\n {\n type: 'group',\n right: `${(isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE) + 8}px'`,\n top: '56px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n right: 'center',\n top: 'middle',\n shape: {\n width: 70,\n height: 30,\n },\n style: {\n fill: isDark ? colorPalette.darkGray : colorPalette.white,\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n right: 'center',\n top: 'middle',\n style: {\n fill: isDark ? colorPalette.white : colorPalette.black,\n width: 70,\n height: 30,\n text: lang(isOrderBook ? 'buy' : 'long'),\n },\n },\n ],\n },\n ],\n };\n};\n\nexport const getOption: GetOptionType = ({\n data, precision, isDark, isOrderBook, isDesktop, lang,\n}) => {\n const buckets = data.orderPositionBooks[0]?.buckets || [];\n const bucketWidth = data.orderPositionBooks[0]?.bucketWidth!;\n const price = data.orderPositionBooks[0]?.price!;\n const bucketPrecision = bucketWidth.toString().split('.')[1].length || 0;\n\n const dataset = buckets.map((item) => ([\n item!.price,\n Number(item!.longCountPercent),\n Number(item!.shortCountPercent) * -1,\n ]));\n\n const zoomInitialStartValue = price - (bucketWidth * INITIAL_BARS * 0.5);\n const zoomInitialEndValue = price + (bucketWidth * INITIAL_BARS * 0.5);\n\n const max = Math.max(...dataset.map((item) => item[1]));\n const min = Math.abs(Math.min(...dataset.map((item) => item[2])));\n\n const range = max > min ? max : min;\n\n return (\n {\n animation: false,\n color: [\n colorPalette.bottleGreenLight,\n isDark ? colorPalette.orange : colorPalette.raspberryDark,\n ],\n title: {\n text: lang(isOrderBook ? 'open_orders' : 'open_positions').toUpperCase(),\n padding: 20,\n textStyle: {\n fontSize: 14,\n },\n },\n toolbox: {\n feature: getZoomControls({\n resetStartValue: zoomInitialStartValue,\n resetEndValue: zoomInitialEndValue,\n }),\n },\n dataZoom: [\n {\n type: 'inside',\n realtime: true,\n startValue: zoomInitialStartValue,\n endValue: zoomInitialEndValue,\n\n yAxisIndex: 0,\n minValueSpan: 10 * bucketWidth,\n },\n ],\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n axis: 'y',\n },\n formatter: (val) => tooltipFormatter({\n data: (val as { data: number[] }[])[0].data,\n precision: bucketPrecision,\n isOrderBook,\n lang,\n }),\n extraCssText: 'z-index: 1',\n },\n grid: [\n {\n name: 'main-grid',\n top: '48px',\n left: '0px',\n right: `${isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE}px`,\n bottom: `${isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT}px`,\n },\n ],\n xAxis: {\n type: 'value',\n min: range * -1.05,\n max: range * 1.05,\n splitNumber: 5,\n axisTick: { show: false },\n axisLine: { show: false },\n axisLabel: {\n padding: [7, 16, 0, 16],\n showMinLabel: false,\n showMaxLabel: false,\n formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),\n },\n },\n yAxis: {\n type: 'value',\n position: 'right',\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n overflow: 'truncate',\n width: (isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE) - 10,\n margin: isDesktop ? 10 : 0,\n showMaxLabel: false,\n showMinLabel: false,\n padding: [0, 0, 0, 10],\n formatter: (value) => value.toFixed(bucketPrecision),\n },\n },\n dataset: {\n source: dataset,\n },\n series: [\n {\n type: 'custom',\n name: 'sell-short',\n id: 'sell-short',\n clip: true,\n encode: {\n x: 1,\n y: 0,\n tooltip: 1,\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(1), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] + 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n emphasis: {\n style: {\n fill: colorPalette.bottleGreenLight,\n },\n },\n style: {\n fill: api.visual('color'),\n },\n };\n },\n },\n {\n type: 'custom',\n name: 'buy-long',\n id: 'buy-long',\n clip: true,\n encode: {\n x: 1,\n y: 0,\n tooltip: 2,\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(2), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] - 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n emphasis: {\n style: {\n fill: isDark ? colorPalette.orange : colorPalette.raspberryDark,\n },\n },\n style: {\n fill: api.visual('color'),\n },\n };\n },\n },\n {\n type: 'custom',\n name: 'current-price',\n id: 'current-price',\n markLine: {\n animation: false,\n silent: true,\n precision,\n symbol: ['none', 'triangle'],\n symbolRotate: 90,\n symbolSize: [20, 10],\n lineStyle: {\n color: isDark ? colorPalette.orange : colorPalette.bottleGreenDark,\n width: 1,\n },\n label: {\n overflow: 'truncate',\n width: isDesktop ? undefined : Y_LABEL_SIZE_MOBILE,\n padding: isDesktop ? [5, 15, 5, 15] : [5, 12, 5, 5],\n color: isDark ? colorPalette.black : colorPalette.white,\n backgroundColor: isDark ? colorPalette.orange : colorPalette.bottleGreenDark,\n },\n data: [\n {\n yAxis: price,\n },\n ],\n },\n renderItem: () => null,\n },\n ],\n }\n );\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,YAAY,EAAEC,eAAe,QAAQ,2BAA2B;AACvF,SACEC,YAAY,EACZC,WAAW,EACXC,oBAAoB,EACpBC,mBAAmB,EACnBC,YAAY,EACZC,oBAAoB,EACpBC,mBAAmB,EACnBC,mBAAmB,QACd,aAAa;AAEpB,SAASC,gBAAgB,QAAQ,cAAc;AAE/C,OAAO,MAAMC,mBAAmB,GAAGC,IAAA,IAK9B;EAAA,IAJH;IACEC,MAAM;IAAEC,WAAW;IAAEC,SAAS;IAAEC;EAER,CAAC,GAAAJ,IAAA;EAE3B,MAAMK,gBAAgB,GAAGjB,YAAY,CAAC;IACpCa,MAAM;IACNK,UAAU,EAAEf,WAAW;IACvBgB,WAAW,EAAEJ,SAAS,GAAGX,oBAAoB,GAAGC,mBAAmB;IACnEe,WAAW,EAAEL,SAAS,GAAGT,YAAY,GAAGA,YAAY,GAAGG,mBAAmB;IAC1EY,UAAU,EAAEN,SAAS,GAAGR,oBAAoB,GAAGC,mBAAmB;IAClEc,aAAa,EAAEP,SAAS;IACxBQ,YAAY,EAAER,SAAS,GAAG,CAAC,GAAGN;EAChC,CAAC,CAAC;EAEF,OAAO;IACLe,IAAI,EAAE,CACJ;MACEC,IAAI,EAAE,WAAW;MACjBC,GAAG,EAAE,MAAM;MACXC,IAAI,EAAE,KAAK;MACXC,KAAK,KAAAC,MAAA,CAAKd,SAAS,GAAGR,oBAAoB,GAAGC,mBAAmB,OAAI;MACpEsB,MAAM,KAAAD,MAAA,CAAKd,SAAS,GAAGT,YAAY,GAAGA,YAAY,GAAGG,mBAAmB;IAC1E,CAAC,CACF;IACDsB,KAAK,EAAE;MACLC,SAAS,EAAE;QACTC,MAAM,EAAElB,SAAS,GAAG,EAAE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AC,OAAO;UAC1B;QACF,CAAC;MACH;IACF,CAAC,EACD;MACEvG,IAAI,EAAE,QAAQ;MACdV,IAAI,EAAE,eAAe;MACrBW,EAAE,EAAE,eAAe;MACnBC,QAAQ,EAAE;QACRgD,SAAS,EAAE,KAAK;QAChB5C,MAAM,EAAE,IAAI;QACZsB,SAAS;QACT4E,MAAM,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;QAC5BC,YAAY,EAAE,EAAE;QAChBC,UAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;QACpBC,SAAS,EAAE;UACTxD,KAAK,EAAEzE,MAAM,GAAGd,YAAY,CAACyF,MAAM,GAAGzF,YAAY,CAACgJ,eAAe;UAClElG,KAAK,EAAE;QACT,CAAC;QACDP,KAAK,EAAE;UACLkF,QAAQ,EAAE,UAAU;UACpB3E,KAAK,EAAE9B,SAAS,GAAGiI,SAAS,GAAGxI,mBAAmB;UAClD+B,OAAO,EAAExB,SAAS,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;UACnDuE,KAAK,EAAEzE,MAAM,GAAGd,YAAY,CAACwD,KAAK,GAAGxD,YAAY,CAACmD,KAAK;UACvD+F,eAAe,EAAEpI,MAAM,GAAGd,YAAY,CAACyF,MAAM,GAAGzF,YAAY,CAACgJ;QAC/D,CAAC;QACDjF,IAAI,EAAE,CACJ;UACE/B,KAAK,EAAEoC;QACT,CAAC;MAEL,CAAC;MACD4D,UAAU,EAAEA,CAAA,KAAM;IACpB,CAAC;EAEL,CAAC;AAEL,CAAC"}
|
|
1
|
+
{"version":3,"file":"getOption.js","names":["colorPalette","getGridLines","getZoomControls","INITIAL_BARS","CHART_WIDTH","CHART_HEIGHT_DESKTOP","CHART_HEIGHT_MOBILE","X_LABEL_SIZE","Y_LABEL_SIZE_DESKTOP","Y_LABEL_SIZE_MOBILE","ZOOM_CONTROL_HEIGHT","tooltipFormatter","getResponsiveOption","_ref","isDark","isOrderBook","isDesktop","lang","desktopGridLines","chartWidth","chartHeight","xLabelsSize","yLabelSize","bottomLeftBox","marginBottom","grid","name","top","left","right","concat","bottom","yAxis","axisLabel","margin","series","type","id","markLine","label","padding","graphic","silent","children","z","shape","width","height","style","fill","darkGray","white","shadowBlur","shadowOffsetX","shadowOffsetY","shadowColor","black","text","getOption","_ref2","_data$orderPositionBo","_data$orderPositionBo2","_data$orderPositionBo3","data","precision","buckets","orderPositionBooks","bucketWidth","price","bucketPrecision","toString","split","length","dataset","map","item","Number","longCountPercent","shortCountPercent","zoomInitialStartValue","zoomInitialEndValue","max","Math","min","abs","range","animation","color","bottleGreenLight","orange","raspberryDark","title","toUpperCase","textStyle","fontSize","toolbox","feature","resetStartValue","resetEndValue","dataZoom","realtime","startValue","endValue","yAxisIndex","minValueSpan","tooltip","trigger","axisPointer","axis","formatter","val","extraCssText","xAxis","splitNumber","axisTick","show","axisLine","showMinLabel","showMaxLabel","value","position","overflow","toFixed","source","clip","encode","x","y","renderItem","params","api","yValue","xStart","coord","xEnd","bucketWidthHeight","size","rectShape","emphasis","visual","symbol","symbolOffset","symbolRotate","symbolSize","lineStyle","bottleGreenDark","distance","undefined","backgroundColor"],"sources":["../../../../../src/OrderBookWidget/components/Chart/getOption.ts"],"sourcesContent":["import { colorPalette, getGridLines, getZoomControls } from '@oanda/labs-widget-common';\nimport {\n INITIAL_BARS,\n CHART_WIDTH,\n CHART_HEIGHT_DESKTOP,\n CHART_HEIGHT_MOBILE,\n X_LABEL_SIZE,\n Y_LABEL_SIZE_DESKTOP,\n Y_LABEL_SIZE_MOBILE,\n ZOOM_CONTROL_HEIGHT,\n} from './constants';\nimport { GetOptionType, GetResponsiveOptionsProps } from './types';\nimport { tooltipFormatter } from './formatters';\n\nexport const getResponsiveOption = (\n {\n isDark, isOrderBook, isDesktop, lang,\n }\n : GetResponsiveOptionsProps,\n) => {\n const desktopGridLines = getGridLines({\n isDark,\n chartWidth: CHART_WIDTH,\n chartHeight: isDesktop ? CHART_HEIGHT_DESKTOP : CHART_HEIGHT_MOBILE,\n xLabelsSize: isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT,\n yLabelSize: isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE,\n bottomLeftBox: isDesktop,\n marginBottom: isDesktop ? 0 : ZOOM_CONTROL_HEIGHT,\n });\n\n return {\n grid: [\n {\n name: 'main-grid',\n top: '48px',\n left: '0px',\n right: `${isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE}px`,\n bottom: `${isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT}px`,\n },\n ],\n yAxis: {\n axisLabel: {\n margin: isDesktop ? 10 : 0,\n },\n },\n series: [\n {\n type: 'custom',\n name: 'current-price',\n id: 'current-price',\n markLine: {\n label: {\n padding: isDesktop ? [5, 15, 5, 15] : [5, 12, 5, 5],\n },\n },\n },\n ],\n graphic: [\n ...desktopGridLines,\n {\n type: 'group',\n left: '8px',\n top: '56px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n left: 'center',\n top: 'middle',\n shape: {\n width: 70,\n height: 30,\n },\n style: {\n fill: isDark ? colorPalette.darkGray : colorPalette.white,\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n left: 'center',\n top: 'middle',\n style: {\n fill: isDark ? colorPalette.white : colorPalette.black,\n width: 70,\n height: 30,\n text: lang(isOrderBook ? 'sell' : 'short'),\n },\n },\n ],\n },\n {\n type: 'group',\n right: `${(isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE) + 8}px'`,\n top: '56px',\n silent: true,\n children: [\n {\n type: 'rect',\n z: 100,\n right: 'center',\n top: 'middle',\n shape: {\n width: 70,\n height: 30,\n },\n style: {\n fill: isDark ? colorPalette.darkGray : colorPalette.white,\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 1,\n shadowColor: 'rgba(0,0,0,0.1)',\n },\n },\n {\n type: 'text',\n z: 100,\n right: 'center',\n top: 'middle',\n style: {\n fill: isDark ? colorPalette.white : colorPalette.black,\n width: 70,\n height: 30,\n text: lang(isOrderBook ? 'buy' : 'long'),\n },\n },\n ],\n },\n ],\n };\n};\n\nexport const getOption: GetOptionType = ({\n data, precision, isDark, isOrderBook, isDesktop, lang,\n}) => {\n const buckets = data.orderPositionBooks[0]?.buckets || [];\n const bucketWidth = data.orderPositionBooks[0]?.bucketWidth!;\n const price = data.orderPositionBooks[0]?.price!;\n const bucketPrecision = bucketWidth.toString().split('.')[1].length || 0;\n\n const dataset = buckets.map((item) => ([\n item!.price,\n Number(item!.longCountPercent),\n Number(item!.shortCountPercent) * -1,\n ]));\n\n const zoomInitialStartValue = price - (bucketWidth * INITIAL_BARS * 0.5);\n const zoomInitialEndValue = price + (bucketWidth * INITIAL_BARS * 0.5);\n\n const max = Math.max(...dataset.map((item) => item[1]));\n const min = Math.abs(Math.min(...dataset.map((item) => item[2])));\n\n const range = max > min ? max : min;\n\n return (\n {\n animation: false,\n color: [\n colorPalette.bottleGreenLight,\n isDark ? colorPalette.orange : colorPalette.raspberryDark,\n ],\n title: {\n text: lang(isOrderBook ? 'open_orders' : 'open_positions').toUpperCase(),\n padding: 20,\n textStyle: {\n fontSize: 14,\n },\n },\n toolbox: {\n feature: getZoomControls({\n resetStartValue: zoomInitialStartValue,\n resetEndValue: zoomInitialEndValue,\n }),\n },\n dataZoom: [\n {\n type: 'inside',\n realtime: true,\n startValue: zoomInitialStartValue,\n endValue: zoomInitialEndValue,\n\n yAxisIndex: 0,\n minValueSpan: 10 * bucketWidth,\n },\n ],\n tooltip: {\n trigger: 'axis',\n axisPointer: {\n axis: 'y',\n },\n formatter: (val) => tooltipFormatter({\n data: (val as { data: number[] }[])[0].data,\n precision: bucketPrecision,\n isOrderBook,\n lang,\n }),\n extraCssText: 'z-index: 1',\n },\n grid: [\n {\n name: 'main-grid',\n top: '48px',\n left: '0px',\n right: `${isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE}px`,\n bottom: `${isDesktop ? X_LABEL_SIZE : X_LABEL_SIZE + ZOOM_CONTROL_HEIGHT}px`,\n },\n ],\n xAxis: {\n type: 'value',\n min: range * -1.05,\n max: range * 1.05,\n splitNumber: 5,\n axisTick: { show: false },\n axisLine: { show: false },\n axisLabel: {\n padding: [7, 16, 0, 16],\n showMinLabel: false,\n showMaxLabel: false,\n formatter: (value) => (value === 0 ? '%' : `${Math.abs(value)}%`),\n },\n },\n yAxis: {\n type: 'value',\n position: 'right',\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n overflow: 'truncate',\n width: (isDesktop ? Y_LABEL_SIZE_DESKTOP : Y_LABEL_SIZE_MOBILE) - 10,\n margin: isDesktop ? 10 : 0,\n showMaxLabel: false,\n showMinLabel: false,\n padding: [0, 0, 0, 10],\n formatter: (value) => value.toFixed(bucketPrecision),\n },\n },\n dataset: {\n source: dataset,\n },\n series: [\n {\n type: 'custom',\n name: 'sell-short',\n id: 'sell-short',\n clip: true,\n encode: {\n x: 1,\n y: 0,\n tooltip: 1,\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(1), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] + 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n emphasis: {\n style: {\n fill: colorPalette.bottleGreenLight,\n },\n },\n style: {\n fill: api.visual('color'),\n },\n };\n },\n },\n {\n type: 'custom',\n name: 'buy-long',\n id: 'buy-long',\n clip: true,\n encode: {\n x: 1,\n y: 0,\n tooltip: 2,\n },\n renderItem: (params, api) => {\n const yValue = api.value(0);\n const xStart = api.coord([api.value(2), yValue]);\n const xEnd = api.coord([0, yValue]);\n const bucketWidthHeight = api.size ? (api.size([0, bucketWidth]) as number[])[1] : 0;\n const height = bucketWidthHeight > 4 ? bucketWidthHeight * 0.8 : bucketWidthHeight;\n\n const rectShape = {\n x: xStart[0] - 0.5,\n y: xStart[1] - height / 2,\n width: xEnd[0] - xStart[0],\n height,\n };\n\n return {\n type: 'rect',\n shape: rectShape,\n emphasis: {\n style: {\n fill: isDark ? colorPalette.orange : colorPalette.raspberryDark,\n },\n },\n style: {\n fill: api.visual('color'),\n },\n };\n },\n },\n {\n type: 'custom',\n name: 'current-price',\n id: 'current-price',\n markLine: {\n animation: false,\n silent: true,\n precision,\n symbol: ['none', 'triangle'],\n symbolOffset: [0, [0, isDesktop ? 0 : -10]] as unknown as number,\n symbolRotate: 90,\n symbolSize: [20, 10],\n lineStyle: {\n color: isDark ? colorPalette.orange : colorPalette.bottleGreenDark,\n width: 1,\n },\n label: {\n distance: isDesktop ? 5 : -5,\n overflow: 'truncate',\n width: isDesktop ? undefined : Y_LABEL_SIZE_MOBILE,\n color: isDark ? colorPalette.black : colorPalette.white,\n backgroundColor: isDark ? colorPalette.orange : colorPalette.bottleGreenDark,\n },\n data: [\n {\n yAxis: price,\n },\n ],\n },\n renderItem: () => null,\n },\n ],\n }\n );\n};\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,YAAY,EAAEC,eAAe,QAAQ,2BAA2B;AACvF,SACEC,YAAY,EACZC,WAAW,EACXC,oBAAoB,EACpBC,mBAAmB,EACnBC,YAAY,EACZC,oBAAoB,EACpBC,mBAAmB,EACnBC,mBAAmB,QACd,aAAa;AAEpB,SAASC,gBAAgB,QAAQ,cAAc;AAE/C,OAAO,MAAMC,mBAAmB,GAAGC,IAAA,IAK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AAE,EAAE,CAAC;QACpBC,SAAS,EAAE;UACTzD,KAAK,EAAEzE,MAAM,GAAGd,YAAY,CAACyF,MAAM,GAAGzF,YAAY,CAACiJ,eAAe;UAClEnG,KAAK,EAAE;QACT,CAAC;QACDP,KAAK,EAAE;UACL2G,QAAQ,EAAElI,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC;UAC5ByG,QAAQ,EAAE,UAAU;UACpB3E,KAAK,EAAE9B,SAAS,GAAGmI,SAAS,GAAG1I,mBAAmB;UAClD8E,KAAK,EAAEzE,MAAM,GAAGd,YAAY,CAACwD,KAAK,GAAGxD,YAAY,CAACmD,KAAK;UACvDiG,eAAe,EAAEtI,MAAM,GAAGd,YAAY,CAACyF,MAAM,GAAGzF,YAAY,CAACiJ;QAC/D,CAAC;QACDlF,IAAI,EAAE,CACJ;UACE/B,KAAK,EAAEoC;QACT,CAAC;MAEL,CAAC;MACD4D,UAAU,EAAEA,CAAA,KAAM;IACpB,CAAC;EAEL,CAAC;AAEL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","names":["EMPTY_VALUE"],"sources":["../../../src/OrderBookWidget/constants.ts"],"sourcesContent":["const EMPTY_VALUE = '\\u2014';\n\nexport { EMPTY_VALUE };\n"],"mappings":"AAAA,MAAMA,WAAW,GAAG,QAAQ;AAE5B,SAASA,WAAW"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import { gql } from '@apollo/client';
|
|
4
|
-
const getOrderPositionBooks = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n"])));
|
|
4
|
+
const getOrderPositionBooks = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n"])));
|
|
5
5
|
export { getOrderPositionBooks };
|
|
6
6
|
//# sourceMappingURL=getOrderPositionBooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOrderPositionBooks.js","names":["gql","getOrderPositionBooks","_templateObject","_taggedTemplateLiteral"],"sources":["../../../src/gql/getOrderPositionBooks.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst getOrderPositionBooks = gql`\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n`;\n\nexport { getOrderPositionBooks };\n"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,qBAAqB,GAAGD,GAAG,CAAAE,eAAA,KAAAA,eAAA,GAAAC,sBAAA,
|
|
1
|
+
{"version":3,"file":"getOrderPositionBooks.js","names":["gql","getOrderPositionBooks","_templateObject","_taggedTemplateLiteral"],"sources":["../../../src/gql/getOrderPositionBooks.ts"],"sourcesContent":["import { gql } from '@apollo/client';\n\nconst getOrderPositionBooks = gql`\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n`;\n\nexport { getOrderPositionBooks };\n"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,MAAMC,qBAAqB,GAAGD,GAAG,CAAAE,eAAA,KAAAA,eAAA,GAAAC,sBAAA,6XAiBhC;AAED,SAASF,qBAAqB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as types from './graphql';
|
|
2
2
|
const documents = {
|
|
3
|
-
"\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n": types.GetOrderPositionBooksDocument
|
|
3
|
+
"\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n": types.GetOrderPositionBooksDocument
|
|
4
4
|
};
|
|
5
5
|
export function graphql(source) {
|
|
6
6
|
var _source;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.js","names":["types","documents","GetOrderPositionBooksDocument","graphql","source","_source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n \"\\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\\n orderPositionBooks(\\n instrument: $instrument\\n bookType: $bookType\\n recentHours: $recentHours\\n ) {\\n bucketWidth\\n price\\n buckets {\\n price\\n longCountPercent\\n shortCountPercent\\n }\\n }\\n }\\n\": types.GetOrderPositionBooksDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\\n orderPositionBooks(\\n instrument: $instrument\\n bookType: $bookType\\n recentHours: $recentHours\\n ) {\\n bucketWidth\\n price\\n buckets {\\n price\\n longCountPercent\\n shortCountPercent\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\\n orderPositionBooks(\\n instrument: $instrument\\n bookType: $bookType\\n recentHours: $recentHours\\n ) {\\n bucketWidth\\n price\\n buckets {\\n price\\n longCountPercent\\n shortCountPercent\\n }\\n }\\n }\\n\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,WAAW;AAalC,MAAMC,SAAS,GAAG;EACd,
|
|
1
|
+
{"version":3,"file":"gql.js","names":["types","documents","GetOrderPositionBooksDocument","graphql","source","_source"],"sources":["../../../../src/gql/types/gql.ts"],"sourcesContent":["/* eslint-disable */\nimport * as types from './graphql';\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n\n/**\n * Map of all GraphQL operations in the project.\n *\n * This map has several performance disadvantages:\n * 1. It is not tree-shakeable, so it will include all operations in the project.\n * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle.\n * 3. It does not support dead code elimination, so it will add unused operations.\n *\n * Therefore it is highly recommended to use the babel or swc plugin for production.\n */\nconst documents = {\n \"\\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\\n orderPositionBooks(\\n instrument: $instrument\\n bookType: $bookType\\n recentHours: $recentHours\\n ) {\\n bucketWidth\\n price\\n time\\n buckets {\\n price\\n longCountPercent\\n shortCountPercent\\n }\\n }\\n }\\n\": types.GetOrderPositionBooksDocument,\n};\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n *\n *\n * @example\n * ```ts\n * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`);\n * ```\n *\n * The query argument is unknown!\n * Please regenerate the types.\n */\nexport function graphql(source: string): unknown;\n\n/**\n * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.\n */\nexport function graphql(source: \"\\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\\n orderPositionBooks(\\n instrument: $instrument\\n bookType: $bookType\\n recentHours: $recentHours\\n ) {\\n bucketWidth\\n price\\n time\\n buckets {\\n price\\n longCountPercent\\n shortCountPercent\\n }\\n }\\n }\\n\"): (typeof documents)[\"\\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\\n orderPositionBooks(\\n instrument: $instrument\\n bookType: $bookType\\n recentHours: $recentHours\\n ) {\\n bucketWidth\\n price\\n time\\n buckets {\\n price\\n longCountPercent\\n shortCountPercent\\n }\\n }\\n }\\n\"];\n\nexport function graphql(source: string) {\n return (documents as any)[source] ?? {};\n}\n\nexport type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never;"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,WAAW;AAalC,MAAMC,SAAS,GAAG;EACd,uXAAuX,EAAED,KAAK,CAACE;AACnY,CAAC;AAqBD,OAAO,SAASC,OAAOA,CAACC,MAAc,EAAE;EAAA,IAAAC,OAAA;EACtC,QAAAA,OAAA,GAAQJ,SAAS,CAASG,MAAM,CAAC,cAAAC,OAAA,cAAAA,OAAA,GAAI,CAAC,CAAC;AACzC"}
|
|
@@ -3,6 +3,39 @@ export let BookType = function (BookType) {
|
|
|
3
3
|
BookType["Position"] = "POSITION";
|
|
4
4
|
return BookType;
|
|
5
5
|
}({});
|
|
6
|
+
export let CorrelationTimeUnit = function (CorrelationTimeUnit) {
|
|
7
|
+
CorrelationTimeUnit["H1"] = "H1";
|
|
8
|
+
CorrelationTimeUnit["H4"] = "H4";
|
|
9
|
+
CorrelationTimeUnit["H24"] = "H24";
|
|
10
|
+
CorrelationTimeUnit["M1"] = "M1";
|
|
11
|
+
CorrelationTimeUnit["M3"] = "M3";
|
|
12
|
+
CorrelationTimeUnit["M6"] = "M6";
|
|
13
|
+
CorrelationTimeUnit["W1"] = "W1";
|
|
14
|
+
CorrelationTimeUnit["Y1"] = "Y1";
|
|
15
|
+
return CorrelationTimeUnit;
|
|
16
|
+
}({});
|
|
17
|
+
export let CurrencyName = function (CurrencyName) {
|
|
18
|
+
CurrencyName["Aud"] = "AUD";
|
|
19
|
+
CurrencyName["Cad"] = "CAD";
|
|
20
|
+
CurrencyName["Chf"] = "CHF";
|
|
21
|
+
CurrencyName["Eur"] = "EUR";
|
|
22
|
+
CurrencyName["Gbp"] = "GBP";
|
|
23
|
+
CurrencyName["Jpy"] = "JPY";
|
|
24
|
+
CurrencyName["Nzd"] = "NZD";
|
|
25
|
+
CurrencyName["Usd"] = "USD";
|
|
26
|
+
return CurrencyName;
|
|
27
|
+
}({});
|
|
28
|
+
export let CurrencyPowerBalanceTimeUnit = function (CurrencyPowerBalanceTimeUnit) {
|
|
29
|
+
CurrencyPowerBalanceTimeUnit["CurrentDay"] = "CURRENT_DAY";
|
|
30
|
+
CurrencyPowerBalanceTimeUnit["H4"] = "H4";
|
|
31
|
+
CurrencyPowerBalanceTimeUnit["H8"] = "H8";
|
|
32
|
+
CurrencyPowerBalanceTimeUnit["H24"] = "H24";
|
|
33
|
+
CurrencyPowerBalanceTimeUnit["M1"] = "M1";
|
|
34
|
+
CurrencyPowerBalanceTimeUnit["M3"] = "M3";
|
|
35
|
+
CurrencyPowerBalanceTimeUnit["PreviousDay"] = "PREVIOUS_DAY";
|
|
36
|
+
CurrencyPowerBalanceTimeUnit["W1"] = "W1";
|
|
37
|
+
return CurrencyPowerBalanceTimeUnit;
|
|
38
|
+
}({});
|
|
6
39
|
export let DataSource = function (DataSource) {
|
|
7
40
|
DataSource["Ny4"] = "NY4";
|
|
8
41
|
DataSource["Ty3"] = "TY3";
|
|
@@ -179,6 +212,12 @@ export const GetOrderPositionBooksDocument = {
|
|
|
179
212
|
"kind": "Name",
|
|
180
213
|
"value": "price"
|
|
181
214
|
}
|
|
215
|
+
}, {
|
|
216
|
+
"kind": "Field",
|
|
217
|
+
"name": {
|
|
218
|
+
"kind": "Name",
|
|
219
|
+
"value": "time"
|
|
220
|
+
}
|
|
182
221
|
}, {
|
|
183
222
|
"kind": "Field",
|
|
184
223
|
"name": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":["BookType","DataSource","Division","Region","Sort","TopicalSort","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetOrderPositionBooksDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments?: Maybe<Array<Maybe<Instrument>>>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\n}\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3'\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Otms = 'OTMS'\n}\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\n\nexport type QueryTopicalInstrumentsArgs = {\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA'\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: TopicalInstrumentSentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentSentiment = {\n __typename?: 'TopicalInstrumentSentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n};\n\nexport type VolatilityChartAssetClass = {\n __typename?: 'VolatilityChartAssetClass';\n instruments?: Maybe<Array<Maybe<VolatilityChartInstrument>>>;\n name: Scalars['String']['output'];\n};\n\nexport type VolatilityChartInstrument = {\n __typename?: 'VolatilityChartInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n D5 = 'D5',\n D10 = 'D10',\n M1 = 'M1',\n M3 = 'M3',\n W5 = 'W5',\n W10 = 'W10'\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W'\n}\n\nexport type GetOrderPositionBooksQueryVariables = Exact<{\n instrument: Scalars['String']['input'];\n bookType: BookType;\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n}>;\n\n\nexport type GetOrderPositionBooksQuery = { __typename?: 'Query', orderPositionBooks: Array<{ __typename?: 'OrderPositionData', bucketWidth: number, price: number, buckets: Array<{ __typename?: 'OrderPositionBucket', price: number, longCountPercent: number, shortCountPercent: number } | null> } | null> };\n\n\nexport const GetOrderPositionBooksDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetOrderPositionBooks\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instrument\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"bookType\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"BookType\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"recentHours\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"orderPositionBooks\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instrument\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instrument\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"bookType\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"bookType\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"recentHours\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"recentHours\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"bucketWidth\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"price\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"buckets\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"price\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"longCountPercent\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"shortCountPercent\"}}]}}]}}]}}]} as unknown as DocumentNode<GetOrderPositionBooksQuery, GetOrderPositionBooksQueryVariables>;"],"mappings":"AAwBA,WAAYA,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAKpB,WAAYC,UAAU,aAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAKtB,WAAYC,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AA4GpB,WAAYC,MAAM,aAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAmBlB,WAAYC,IAAI,aAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAA,OAAJA,IAAI;AAAA;AAyBhB,WAAYC,WAAW,aAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AA2BvB,WAAYC,uBAAuB,aAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AASnC,WAAYC,uBAAuB,aAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAA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,MAAM,EAAC,cAAc;cAAC,YAAY,EAAC,CAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAO;cAAC,CAAC,EAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAkB;cAAC,CAAC,EAAC;gBAAC,MAAM,EAAC,OAAO;gBAAC,MAAM,EAAC;kBAAC,MAAM,EAAC,MAAM;kBAAC,OAAO,EAAC;gBAAmB;cAAC,CAAC;YAAC;UAAC,CAAC;QAAC;MAAC,CAAC;IAAC;EAAC,CAAC;AAAC,CAA6F"}
|
|
1
|
+
{"version":3,"file":"graphql.js","names":["BookType","CorrelationTimeUnit","CurrencyName","CurrencyPowerBalanceTimeUnit","DataSource","Division","Region","Sort","TopicalSort","VolatilityChartTimeSpan","VolatilityChartTimeUnit","GetOrderPositionBooksDocument"],"sources":["../../../../src/gql/types/graphql.ts"],"sourcesContent":["/* eslint-disable */\nimport { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n};\n\nexport type AssetClass = {\n __typename?: 'AssetClass';\n instruments?: Maybe<Array<Maybe<Instrument>>>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport enum BookType {\n Order = 'ORDER',\n Position = 'POSITION'\n}\n\nexport type Correlation = {\n __typename?: 'Correlation';\n timeUnit: CorrelationTimeUnit;\n value: Scalars['Float']['output'];\n};\n\nexport type CorrelationHeatmap = {\n __typename?: 'CorrelationHeatmap';\n baseInstrument: Scalars['String']['output'];\n heatmap: Array<Heatmap>;\n};\n\nexport enum CorrelationTimeUnit {\n H1 = 'H1',\n H4 = 'H4',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n M6 = 'M6',\n W1 = 'W1',\n Y1 = 'Y1'\n}\n\nexport enum CurrencyName {\n Aud = 'AUD',\n Cad = 'CAD',\n Chf = 'CHF',\n Eur = 'EUR',\n Gbp = 'GBP',\n Jpy = 'JPY',\n Nzd = 'NZD',\n Usd = 'USD'\n}\n\nexport type CurrencyPower = {\n __typename?: 'CurrencyPower';\n /** UTC Timestamp */\n point: Scalars['String']['output'];\n price: Scalars['Float']['output'];\n};\n\nexport type CurrencyPowerBalance = {\n __typename?: 'CurrencyPowerBalance';\n currency: CurrencyName;\n power: Array<CurrencyPower>;\n};\n\nexport enum CurrencyPowerBalanceTimeUnit {\n CurrentDay = 'CURRENT_DAY',\n H4 = 'H4',\n H8 = 'H8',\n H24 = 'H24',\n M1 = 'M1',\n M3 = 'M3',\n PreviousDay = 'PREVIOUS_DAY',\n W1 = 'W1'\n}\n\nexport type CurrencyStrength = {\n __typename?: 'CurrencyStrength';\n currency: CurrencyName;\n strengthRelation?: Maybe<Array<StrengthRelation>>;\n};\n\nexport enum DataSource {\n Ny4 = 'NY4',\n Ty3 = 'TY3'\n}\n\nexport enum Division {\n Oap = 'OAP',\n Oau = 'OAU',\n Oc = 'OC',\n Ocan = 'OCAN',\n Oel = 'OEL',\n Ogm = 'OGM',\n Oj = 'OJ',\n Otms = 'OTMS'\n}\n\nexport type Heatmap = {\n __typename?: 'Heatmap';\n correlation: Array<Correlation>;\n instrument: Scalars['String']['output'];\n};\n\nexport type Instrument = {\n __typename?: 'Instrument';\n displayName?: Maybe<Scalars['String']['output']>;\n name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type OrderPositionBucket = {\n __typename?: 'OrderPositionBucket';\n longCountPercent: Scalars['Float']['output'];\n price: Scalars['Float']['output'];\n shortCountPercent: Scalars['Float']['output'];\n};\n\nexport type OrderPositionData = {\n __typename?: 'OrderPositionData';\n bucketWidth: Scalars['Float']['output'];\n buckets: Array<Maybe<OrderPositionBucket>>;\n dataSource?: Maybe<Scalars['String']['output']>;\n instrument: Scalars['String']['output'];\n price?: Maybe<Scalars['Float']['output']>;\n region?: Maybe<Scalars['String']['output']>;\n time: Scalars['String']['output'];\n unixTime: Scalars['Int']['output'];\n};\n\nexport type Query = {\n __typename?: 'Query';\n assetClasses?: Maybe<Array<Maybe<AssetClass>>>;\n correlationHeatmap: CorrelationHeatmap;\n currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;\n currencyStrength?: Maybe<Array<CurrencyStrength>>;\n orderPositionBooks: Array<Maybe<OrderPositionData>>;\n sentiment?: Maybe<Array<SentimentInstrument>>;\n sentimentList?: Maybe<Array<SentimentInstrument>>;\n topicalInstruments?: Maybe<Array<TopicalInstrument>>;\n topicalInstrumentsCharts?: Maybe<Array<TopicalInstrumentChart>>;\n topicalInstrumentsTotalCount: Scalars['Int']['output'];\n volatilityChart?: Maybe<Array<Maybe<VolatilityChart>>>;\n volatilityChartAssetClasses?: Maybe<Array<VolatilityChartAssetClass>>;\n};\n\n\nexport type QueryAssetClassesArgs = {\n division: Division;\n};\n\n\nexport type QueryCorrelationHeatmapArgs = {\n division: Division;\n};\n\n\nexport type QueryCurrencyPowerBalanceArgs = {\n timeUnit: CurrencyPowerBalanceTimeUnit;\n};\n\n\nexport type QueryOrderPositionBooksArgs = {\n bookType: BookType;\n dataSource?: InputMaybe<DataSource>;\n instrument: Scalars['String']['input'];\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n region?: InputMaybe<Region>;\n};\n\n\nexport type QuerySentimentArgs = {\n division?: InputMaybe<Division>;\n name: Scalars['String']['input'];\n};\n\n\nexport type QuerySentimentListArgs = {\n division?: InputMaybe<Division>;\n sort?: InputMaybe<Sort>;\n};\n\n\nexport type QueryTopicalInstrumentsArgs = {\n count?: InputMaybe<Scalars['Int']['input']>;\n division?: InputMaybe<Division>;\n offset?: InputMaybe<Scalars['Int']['input']>;\n sort: TopicalSort;\n};\n\n\nexport type QueryTopicalInstrumentsChartsArgs = {\n division?: InputMaybe<Division>;\n instruments?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\n\nexport type QueryTopicalInstrumentsTotalCountArgs = {\n division?: InputMaybe<Division>;\n sort: TopicalSort;\n};\n\n\nexport type QueryVolatilityChartArgs = {\n division?: InputMaybe<Division>;\n instrument: Scalars['String']['input'];\n timeSpan: VolatilityChartTimeSpan;\n timeUnit: VolatilityChartTimeUnit;\n};\n\n\nexport type QueryVolatilityChartAssetClassesArgs = {\n division?: InputMaybe<Division>;\n};\n\nexport enum Region {\n Amer = 'AMER',\n Apac = 'APAC',\n Emea = 'EMEA'\n}\n\nexport type Sentiment = {\n __typename?: 'Sentiment';\n longPercent: Scalars['Float']['output'];\n shortPercent: Scalars['Float']['output'];\n};\n\nexport type SentimentInstrument = {\n __typename?: 'SentimentInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport enum Sort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH'\n}\n\nexport type StrengthRelation = {\n __typename?: 'StrengthRelation';\n currency: CurrencyName;\n percentage: Scalars['Float']['output'];\n};\n\nexport type TopicalInstrument = {\n __typename?: 'TopicalInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n sentiment: Sentiment;\n updatedAt: Scalars['String']['output'];\n};\n\nexport type TopicalInstrumentChart = {\n __typename?: 'TopicalInstrumentChart';\n chart?: Maybe<Array<Scalars['Float']['output']>>;\n name: Scalars['String']['output'];\n};\n\nexport enum TopicalSort {\n Bearish = 'BEARISH',\n Bullish = 'BULLISH',\n Hot = 'HOT',\n Popular = 'POPULAR',\n Volatile = 'VOLATILE'\n}\n\nexport type VolatilityChart = {\n __typename?: 'VolatilityChart';\n pips: Scalars['Float']['output'];\n /** Time point - hour in format hh:mm, Date in UTC, Week in format 'Mo' */\n point: Scalars['String']['output'];\n};\n\nexport type VolatilityChartAssetClass = {\n __typename?: 'VolatilityChartAssetClass';\n instruments: Array<VolatilityChartInstrument>;\n name: Scalars['String']['output'];\n};\n\nexport type VolatilityChartInstrument = {\n __typename?: 'VolatilityChartInstrument';\n displayName: Scalars['String']['output'];\n name: Scalars['String']['output'];\n};\n\nexport enum VolatilityChartTimeSpan {\n /** Valid for: H */\n D5 = 'D5',\n /** Valid for: H */\n D10 = 'D10',\n /** Valid for: D */\n M1 = 'M1',\n /** Valid for: D */\n M3 = 'M3',\n /** Valid for: W */\n W5 = 'W5',\n /** Valid for: W */\n W10 = 'W10'\n}\n\nexport enum VolatilityChartTimeUnit {\n D = 'D',\n H = 'H',\n W = 'W'\n}\n\nexport type GetOrderPositionBooksQueryVariables = Exact<{\n instrument: Scalars['String']['input'];\n bookType: BookType;\n recentHours?: InputMaybe<Scalars['Int']['input']>;\n}>;\n\n\nexport type GetOrderPositionBooksQuery = { __typename?: 'Query', orderPositionBooks: Array<{ __typename?: 'OrderPositionData', bucketWidth: number, price?: number | null, time: string, buckets: Array<{ __typename?: 'OrderPositionBucket', price: number, longCountPercent: number, shortCountPercent: number } | null> } | null> };\n\n\nexport const GetOrderPositionBooksDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"GetOrderPositionBooks\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instrument\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"bookType\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"BookType\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"recentHours\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"orderPositionBooks\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"instrument\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"instrument\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"bookType\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"bookType\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"recentHours\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"recentHours\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"bucketWidth\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"price\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"time\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"buckets\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"price\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"longCountPercent\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"shortCountPercent\"}}]}}]}}]}}]} as unknown as DocumentNode<GetOrderPositionBooksQuery, GetOrderPositionBooksQueryVariables>;"],"mappings":"AAwBA,WAAYA,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAiBpB,WAAYC,mBAAmB,aAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAW/B,WAAYC,YAAY,aAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAwBxB,WAAYC,4BAA4B,aAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAiBxC,WAAYC,UAAU,aAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAKtB,WAAYC,QAAQ,aAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AA+HpB,WAAYC,MAAM,aAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;AAoBlB,WAAY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_orders": "Open Orders",
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
"sell_orders": "Sell Orders",
|
|
16
17
|
"short": "Short",
|
|
17
18
|
"short_positions": "Short Positions",
|
|
19
|
+
"today": "Today",
|
|
18
20
|
"zoom_in": "Zoom In",
|
|
19
21
|
"zoom_out": "Zoom Out"
|
|
20
22
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"buy": "買進",
|
|
3
3
|
"data_unavailable": "沒有數據",
|
|
4
4
|
"instrument": "金融工具",
|
|
5
|
+
"last_updated": "最後更新",
|
|
5
6
|
"long": "長",
|
|
6
7
|
"long_positions": "長倉",
|
|
7
8
|
"open_orders": "開盤市價單",
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
"sell_orders": "賣單",
|
|
16
17
|
"short": "短",
|
|
17
18
|
"short_positions": "短倉",
|
|
19
|
+
"today": "今日",
|
|
18
20
|
"zoom_in": "放大",
|
|
19
21
|
"zoom_out": "縮小"
|
|
20
22
|
}
|
|
@@ -11,7 +11,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/
|
|
|
11
11
|
* Therefore it is highly recommended to use the babel or swc plugin for production.
|
|
12
12
|
*/
|
|
13
13
|
declare const documents: {
|
|
14
|
-
"\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n": DocumentNode<types.GetOrderPositionBooksQuery, types.Exact<{
|
|
14
|
+
"\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n": DocumentNode<types.GetOrderPositionBooksQuery, types.Exact<{
|
|
15
15
|
instrument: string;
|
|
16
16
|
bookType: types.BookType;
|
|
17
17
|
recentHours?: types.InputMaybe<number> | undefined;
|
|
@@ -33,6 +33,6 @@ export declare 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 declare function graphql(source: "\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n"): (typeof documents)["\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n"];
|
|
36
|
+
export declare function graphql(source: "\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n"): (typeof documents)["\n query GetOrderPositionBooks($instrument: String!, $bookType: BookType!, $recentHours: Int) {\n orderPositionBooks(\n instrument: $instrument\n bookType: $bookType\n recentHours: $recentHours\n ) {\n bucketWidth\n price\n time\n buckets {\n price\n longCountPercent\n shortCountPercent\n }\n }\n }\n"];
|
|
37
37
|
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = TDocumentNode extends DocumentNode<infer TType, any> ? TType : never;
|
|
38
38
|
export {};
|
|
@@ -52,6 +52,62 @@ export declare enum BookType {
|
|
|
52
52
|
Order = "ORDER",
|
|
53
53
|
Position = "POSITION"
|
|
54
54
|
}
|
|
55
|
+
export type Correlation = {
|
|
56
|
+
__typename?: 'Correlation';
|
|
57
|
+
timeUnit: CorrelationTimeUnit;
|
|
58
|
+
value: Scalars['Float']['output'];
|
|
59
|
+
};
|
|
60
|
+
export type CorrelationHeatmap = {
|
|
61
|
+
__typename?: 'CorrelationHeatmap';
|
|
62
|
+
baseInstrument: Scalars['String']['output'];
|
|
63
|
+
heatmap: Array<Heatmap>;
|
|
64
|
+
};
|
|
65
|
+
export declare enum CorrelationTimeUnit {
|
|
66
|
+
H1 = "H1",
|
|
67
|
+
H4 = "H4",
|
|
68
|
+
H24 = "H24",
|
|
69
|
+
M1 = "M1",
|
|
70
|
+
M3 = "M3",
|
|
71
|
+
M6 = "M6",
|
|
72
|
+
W1 = "W1",
|
|
73
|
+
Y1 = "Y1"
|
|
74
|
+
}
|
|
75
|
+
export declare enum CurrencyName {
|
|
76
|
+
Aud = "AUD",
|
|
77
|
+
Cad = "CAD",
|
|
78
|
+
Chf = "CHF",
|
|
79
|
+
Eur = "EUR",
|
|
80
|
+
Gbp = "GBP",
|
|
81
|
+
Jpy = "JPY",
|
|
82
|
+
Nzd = "NZD",
|
|
83
|
+
Usd = "USD"
|
|
84
|
+
}
|
|
85
|
+
export type CurrencyPower = {
|
|
86
|
+
__typename?: 'CurrencyPower';
|
|
87
|
+
/** UTC Timestamp */
|
|
88
|
+
point: Scalars['String']['output'];
|
|
89
|
+
price: Scalars['Float']['output'];
|
|
90
|
+
};
|
|
91
|
+
export type CurrencyPowerBalance = {
|
|
92
|
+
__typename?: 'CurrencyPowerBalance';
|
|
93
|
+
currency: CurrencyName;
|
|
94
|
+
power: Array<CurrencyPower>;
|
|
95
|
+
};
|
|
96
|
+
export declare enum CurrencyPowerBalanceTimeUnit {
|
|
97
|
+
CurrentDay = "CURRENT_DAY",
|
|
98
|
+
H4 = "H4",
|
|
99
|
+
H8 = "H8",
|
|
100
|
+
H24 = "H24",
|
|
101
|
+
M1 = "M1",
|
|
102
|
+
M3 = "M3",
|
|
103
|
+
PreviousDay = "PREVIOUS_DAY",
|
|
104
|
+
W1 = "W1"
|
|
105
|
+
}
|
|
106
|
+
export type CurrencyStrength = {
|
|
107
|
+
__typename?: 'CurrencyStrength';
|
|
108
|
+
currency: CurrencyName;
|
|
109
|
+
strengthRelation?: Maybe<Array<StrengthRelation>>;
|
|
110
|
+
};
|
|
55
111
|
export declare enum DataSource {
|
|
56
112
|
Ny4 = "NY4",
|
|
57
113
|
Ty3 = "TY3"
|
|
@@ -66,6 +122,11 @@ export declare enum Division {
|
|
|
66
122
|
Oj = "OJ",
|
|
67
123
|
Otms = "OTMS"
|
|
68
124
|
}
|
|
125
|
+
export type Heatmap = {
|
|
126
|
+
__typename?: 'Heatmap';
|
|
127
|
+
correlation: Array<Correlation>;
|
|
128
|
+
instrument: Scalars['String']['output'];
|
|
129
|
+
};
|
|
69
130
|
export type Instrument = {
|
|
70
131
|
__typename?: 'Instrument';
|
|
71
132
|
displayName?: Maybe<Scalars['String']['output']>;
|
|
@@ -83,7 +144,7 @@ export type OrderPositionData = {
|
|
|
83
144
|
buckets: Array<Maybe<OrderPositionBucket>>;
|
|
84
145
|
dataSource?: Maybe<Scalars['String']['output']>;
|
|
85
146
|
instrument: Scalars['String']['output'];
|
|
86
|
-
price
|
|
147
|
+
price?: Maybe<Scalars['Float']['output']>;
|
|
87
148
|
region?: Maybe<Scalars['String']['output']>;
|
|
88
149
|
time: Scalars['String']['output'];
|
|
89
150
|
unixTime: Scalars['Int']['output'];
|
|
@@ -91,6 +152,9 @@ export type OrderPositionData = {
|
|
|
91
152
|
export type Query = {
|
|
92
153
|
__typename?: 'Query';
|
|
93
154
|
assetClasses?: Maybe<Array<Maybe<AssetClass>>>;
|
|
155
|
+
correlationHeatmap: CorrelationHeatmap;
|
|
156
|
+
currencyPowerBalance?: Maybe<Array<CurrencyPowerBalance>>;
|
|
157
|
+
currencyStrength?: Maybe<Array<CurrencyStrength>>;
|
|
94
158
|
orderPositionBooks: Array<Maybe<OrderPositionData>>;
|
|
95
159
|
sentiment?: Maybe<Array<SentimentInstrument>>;
|
|
96
160
|
sentimentList?: Maybe<Array<SentimentInstrument>>;
|
|
@@ -103,6 +167,12 @@ export type Query = {
|
|
|
103
167
|
export type QueryAssetClassesArgs = {
|
|
104
168
|
division: Division;
|
|
105
169
|
};
|
|
170
|
+
export type QueryCorrelationHeatmapArgs = {
|
|
171
|
+
division: Division;
|
|
172
|
+
};
|
|
173
|
+
export type QueryCurrencyPowerBalanceArgs = {
|
|
174
|
+
timeUnit: CurrencyPowerBalanceTimeUnit;
|
|
175
|
+
};
|
|
106
176
|
export type QueryOrderPositionBooksArgs = {
|
|
107
177
|
bookType: BookType;
|
|
108
178
|
dataSource?: InputMaybe<DataSource>;
|
|
@@ -156,16 +226,22 @@ export type SentimentInstrument = {
|
|
|
156
226
|
displayName: Scalars['String']['output'];
|
|
157
227
|
name: Scalars['String']['output'];
|
|
158
228
|
sentiment: Sentiment;
|
|
229
|
+
updatedAt: Scalars['String']['output'];
|
|
159
230
|
};
|
|
160
231
|
export declare enum Sort {
|
|
161
232
|
Bearish = "BEARISH",
|
|
162
233
|
Bullish = "BULLISH"
|
|
163
234
|
}
|
|
235
|
+
export type StrengthRelation = {
|
|
236
|
+
__typename?: 'StrengthRelation';
|
|
237
|
+
currency: CurrencyName;
|
|
238
|
+
percentage: Scalars['Float']['output'];
|
|
239
|
+
};
|
|
164
240
|
export type TopicalInstrument = {
|
|
165
241
|
__typename?: 'TopicalInstrument';
|
|
166
242
|
displayName: Scalars['String']['output'];
|
|
167
243
|
name: Scalars['String']['output'];
|
|
168
|
-
sentiment:
|
|
244
|
+
sentiment: Sentiment;
|
|
169
245
|
updatedAt: Scalars['String']['output'];
|
|
170
246
|
};
|
|
171
247
|
export type TopicalInstrumentChart = {
|
|
@@ -173,11 +249,6 @@ export type TopicalInstrumentChart = {
|
|
|
173
249
|
chart?: Maybe<Array<Scalars['Float']['output']>>;
|
|
174
250
|
name: Scalars['String']['output'];
|
|
175
251
|
};
|
|
176
|
-
export type TopicalInstrumentSentiment = {
|
|
177
|
-
__typename?: 'TopicalInstrumentSentiment';
|
|
178
|
-
longPercent: Scalars['Float']['output'];
|
|
179
|
-
shortPercent: Scalars['Float']['output'];
|
|
180
|
-
};
|
|
181
252
|
export declare enum TopicalSort {
|
|
182
253
|
Bearish = "BEARISH",
|
|
183
254
|
Bullish = "BULLISH",
|
|
@@ -193,7 +264,7 @@ export type VolatilityChart = {
|
|
|
193
264
|
};
|
|
194
265
|
export type VolatilityChartAssetClass = {
|
|
195
266
|
__typename?: 'VolatilityChartAssetClass';
|
|
196
|
-
instruments
|
|
267
|
+
instruments: Array<VolatilityChartInstrument>;
|
|
197
268
|
name: Scalars['String']['output'];
|
|
198
269
|
};
|
|
199
270
|
export type VolatilityChartInstrument = {
|
|
@@ -202,11 +273,17 @@ export type VolatilityChartInstrument = {
|
|
|
202
273
|
name: Scalars['String']['output'];
|
|
203
274
|
};
|
|
204
275
|
export declare enum VolatilityChartTimeSpan {
|
|
276
|
+
/** Valid for: H */
|
|
205
277
|
D5 = "D5",
|
|
278
|
+
/** Valid for: H */
|
|
206
279
|
D10 = "D10",
|
|
280
|
+
/** Valid for: D */
|
|
207
281
|
M1 = "M1",
|
|
282
|
+
/** Valid for: D */
|
|
208
283
|
M3 = "M3",
|
|
284
|
+
/** Valid for: W */
|
|
209
285
|
W5 = "W5",
|
|
286
|
+
/** Valid for: W */
|
|
210
287
|
W10 = "W10"
|
|
211
288
|
}
|
|
212
289
|
export declare enum VolatilityChartTimeUnit {
|
|
@@ -224,7 +301,8 @@ export type GetOrderPositionBooksQuery = {
|
|
|
224
301
|
orderPositionBooks: Array<{
|
|
225
302
|
__typename?: 'OrderPositionData';
|
|
226
303
|
bucketWidth: number;
|
|
227
|
-
price
|
|
304
|
+
price?: number | null;
|
|
305
|
+
time: string;
|
|
228
306
|
buckets: Array<{
|
|
229
307
|
__typename?: 'OrderPositionBucket';
|
|
230
308
|
price: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oanda/labs-order-book-widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.90",
|
|
4
4
|
"description": "Labs Order Book 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.7.17",
|
|
16
|
-
"@oanda/labs-widget-common": "^1.0.
|
|
16
|
+
"@oanda/labs-widget-common": "^1.0.90",
|
|
17
17
|
"@oanda/mono-i18n": "9.0.0",
|
|
18
18
|
"echarts": "5.4.3",
|
|
19
19
|
"echarts-for-react": "3.0.2",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@graphql-codegen/client-preset": "4.1.0",
|
|
25
25
|
"@graphql-codegen/typescript": "4.0.1"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "7523e69532a4aaefd52cfdbff7825060ac1fe898"
|
|
28
28
|
}
|