binbot-charts 0.2.2 → 0.2.3

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.
@@ -23,6 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
23
 
24
24
  function TVChartContainer(_ref) {
25
25
  let {
26
+ ohlcTick,
26
27
  symbol = "APEUSDT",
27
28
  interval = "1h",
28
29
  libraryPath = "/charting_library/",
@@ -55,6 +56,8 @@ function TVChartContainer(_ref) {
55
56
  tvWidget.chart().createPositionLine().setText(order.text).setTooltip(order.tooltip).setQuantity(order.quantity).setQuantityBackgroundColor(order.color).setQuantityBorderColor(order.color).setLineStyle(0).setLineLength(25).setLineColor(order.color).setBodyBorderColor(order.color).setBodyTextColor(order.color).setPrice(order.price);
56
57
  });
57
58
  }
59
+
60
+ tvWidget.subscribe("onTick", event => ohlcTick(event));
58
61
  }); // returned function will be called on component unmount
59
62
 
60
63
  return () => {
@@ -79,5 +82,6 @@ TVChartContainer.propTypes = {
79
82
  libraryPath: _propTypes.default.string,
80
83
  timescaleMarks: _propTypes.default.array,
81
84
  orderLines: _propTypes.default.array,
82
- height: _propTypes.default.string
85
+ height: _propTypes.default.string,
86
+ ohlcTick: _propTypes.default.func.isRequired
83
87
  };
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
- "version": "0.2.2",
2
+ "version": "0.2.3",
3
3
  "name": "binbot-charts",
4
4
  "dependencies": {
5
+ "react": "^17.0.1",
6
+ "react-dom": "^17.0.1",
7
+ "react-scripts": "^5.0.1"
8
+ },
9
+ "devDependencies": {
5
10
  "@babel/cli": "^7.18.10",
6
11
  "@babel/core": "^7.18.13",
7
12
  "@babel/polyfill": "^7.12.1",
8
13
  "@babel/preset-env": "^7.18.10",
9
- "@babel/preset-typescript": "^7.18.6",
10
- "react": "^17.0.1",
11
- "react-dom": "^17.0.1",
12
- "react-scripts": "^5.0.1",
13
- "socket.io": "1.7.2",
14
- "use-immer": "^0.7.0"
14
+ "@babel/preset-typescript": "^7.18.6"
15
15
  },
16
16
  "scripts": {
17
17
  "start": "react-scripts start",