From f048532bfa0b863891def23492c063e10c409ff0 Mon Sep 17 00:00:00 2001 From: kirosc Date: Wed, 15 Sep 2021 01:38:12 +0800 Subject: [PATCH] feat(smart_trade): breakeven --- package-lock.json | 78 +++++++++++++++++++++++----------------------- package.json | 12 +++---- src/types/types.ts | 1 + 3 files changed, 46 insertions(+), 45 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7321d89..d638bd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,29 +1,29 @@ { "name": "3commas-typescript", - "version": "1.3.2", + "version": "1.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "1.3.2", + "version": "1.3.3", "license": "MIT", "dependencies": { - "axios": "^0.21.1", + "axios": "^0.21.4", "crypto-js": "^4.1.1", "qs": "^6.10.1", - "ws": "^8.2.0" + "ws": "^8.2.2" }, "devDependencies": { "@types/crypto-js": "^4.0.2", - "@types/node": "^16.7.4", + "@types/node": "^16.9.1", "@types/qs": "^6.9.7", "@types/ws": "^7.4.7", "dotenv": "^10.0.0", "husky": "^7.0.2", "lint-staged": "^11.1.2", - "prettier": "^2.3.2", + "prettier": "^2.4.0", "ts-node-dev": "^1.1.8", - "typescript": "^4.4.2" + "typescript": "^4.4.3" } }, "node_modules/@babel/code-frame": { @@ -130,9 +130,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.4.tgz", - "integrity": "sha512-25QXpDsTiDnl2rZGUenagVMwO46way8dOUdvoC3R3p+6TrbpxeJBo/v87BEG1IHI31Jhaa8lPeSHcqwxsVBeYQ==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz", + "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==", "dev": true }, "node_modules/@types/parse-json": { @@ -258,11 +258,11 @@ } }, "node_modules/axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dependencies": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" } }, "node_modules/balanced-match": { @@ -1270,9 +1270,9 @@ } }, "node_modules/prettier": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", - "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz", + "integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -1651,9 +1651,9 @@ } }, "node_modules/typescript": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", - "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -1702,9 +1702,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.0.tgz", - "integrity": "sha512-uYhVJ/m9oXwEI04iIVmgLmugh2qrZihkywG9y5FfZV2ATeLIzHf93qs+tUNqlttbQK957/VX3mtwAS+UfIwA4g==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.2.tgz", + "integrity": "sha512-Q6B6H2oc8QY3llc3cB8kVmQ6pnJWVQbP7Q5algTcIxx7YEpc0oU4NBVHlztA7Ekzfhw2r0rPducMUiCGWKQRzw==", "engines": { "node": ">=10.0.0" }, @@ -1835,9 +1835,9 @@ "dev": true }, "@types/node": { - "version": "16.7.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.4.tgz", - "integrity": "sha512-25QXpDsTiDnl2rZGUenagVMwO46way8dOUdvoC3R3p+6TrbpxeJBo/v87BEG1IHI31Jhaa8lPeSHcqwxsVBeYQ==", + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz", + "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==", "dev": true }, "@types/parse-json": { @@ -1936,11 +1936,11 @@ "dev": true }, "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.0" } }, "balanced-match": { @@ -2676,9 +2676,9 @@ } }, "prettier": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz", - "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz", + "integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==", "dev": true }, "qs": { @@ -2950,9 +2950,9 @@ "dev": true }, "typescript": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", - "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", + "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", "dev": true }, "which": { @@ -2982,9 +2982,9 @@ "dev": true }, "ws": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.0.tgz", - "integrity": "sha512-uYhVJ/m9oXwEI04iIVmgLmugh2qrZihkywG9y5FfZV2ATeLIzHf93qs+tUNqlttbQK957/VX3mtwAS+UfIwA4g==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.2.tgz", + "integrity": "sha512-Q6B6H2oc8QY3llc3cB8kVmQ6pnJWVQbP7Q5algTcIxx7YEpc0oU4NBVHlztA7Ekzfhw2r0rPducMUiCGWKQRzw==", "requires": {} }, "xtend": { diff --git a/package.json b/package.json index d85d099..90c2f3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "3commas-typescript", - "version": "1.3.2", + "version": "1.3.3", "description": "TypeScript 3Commas API client", "repository": { "type": "git", @@ -27,21 +27,21 @@ "license": "MIT", "devDependencies": { "@types/crypto-js": "^4.0.2", - "@types/node": "^16.7.4", + "@types/node": "^16.9.1", "@types/qs": "^6.9.7", "@types/ws": "^7.4.7", "dotenv": "^10.0.0", "husky": "^7.0.2", "lint-staged": "^11.1.2", - "prettier": "^2.3.2", + "prettier": "^2.4.0", "ts-node-dev": "^1.1.8", - "typescript": "^4.4.2" + "typescript": "^4.4.3" }, "dependencies": { - "axios": "^0.21.1", + "axios": "^0.21.4", "crypto-js": "^4.1.1", "qs": "^6.10.1", - "ws": "^8.2.0" + "ws": "^8.2.2" }, "lint-staged": { "*.{ts,json,md}": "prettier --write" diff --git a/src/types/types.ts b/src/types/types.ts index 34b1b47..eb878f4 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -130,6 +130,7 @@ export interface UnitsClass { export interface StopLoss { enabled: boolean; + breakeven?: boolean; order_type?: 'market' | 'limit'; price?: UnitsClass; conditional?: StopLossConditional;