@icgio/icg-exchanges-wrapper 1.12.47 → 1.12.49
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/middleware/orders.js +16 -16
- package/package.json +3 -3
package/middleware/orders.js
CHANGED
|
@@ -815,22 +815,22 @@ module.exports = class Orders {
|
|
|
815
815
|
const open_orders_timeframe = 12 * 60 * 60 * 1000
|
|
816
816
|
let previous_orders_processer = (exchange, pair, orders) => {
|
|
817
817
|
if (_.includes(this.no_cancel_previous_exchanges, exchange) && !this.previous_orders_canceled) {
|
|
818
|
-
let buy_orders = orders.filter((o) => o.type === 'buy')
|
|
819
|
-
let sell_orders = orders.filter((o) => o.type === 'sell')
|
|
820
|
-
if (buy_orders.length > 0) {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
}
|
|
827
|
-
if (sell_orders.length > 0) {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
}
|
|
818
|
+
// let buy_orders = orders.filter((o) => o.type === 'buy')
|
|
819
|
+
// let sell_orders = orders.filter((o) => o.type === 'sell')
|
|
820
|
+
// if (buy_orders.length > 0) {
|
|
821
|
+
// buy_orders = _.initial(_.sortBy(buy_orders, 'price'))
|
|
822
|
+
// buy_orders.map((order) => {
|
|
823
|
+
// this.info_log('cancel original order: %s %s %j', exchange, pair, order)
|
|
824
|
+
// this.Exchanges[exchange].cancel_order_by_order(order, (res) => {})
|
|
825
|
+
// })
|
|
826
|
+
// }
|
|
827
|
+
// if (sell_orders.length > 0) {
|
|
828
|
+
// sell_orders = _.initial(_.sortBy(sell_orders, 'price').reverse())
|
|
829
|
+
// sell_orders.map((order) => {
|
|
830
|
+
// this.info_log('cancel original order: %s %s %j', exchange, pair, order)
|
|
831
|
+
// this.Exchanges[exchange].cancel_order_by_order(order, (res) => {})
|
|
832
|
+
// })
|
|
833
|
+
// }
|
|
834
834
|
_.set(this.previous_orders_canceled_exchange_pair, [exchange, pair], true)
|
|
835
835
|
} else if (this.cancel_previous_orders && !this.previous_orders_canceled) {
|
|
836
836
|
orders.map((order) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icgio/icg-exchanges-wrapper",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.49",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/icgio/icg-exchanges-wrapper#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@icgio/icg-exchanges": "^1.30.
|
|
21
|
-
"@icgio/icg-exchanges-data": "^1.8.
|
|
20
|
+
"@icgio/icg-exchanges": "^1.30.40",
|
|
21
|
+
"@icgio/icg-exchanges-data": "^1.8.35",
|
|
22
22
|
"@icgio/icg-utils": "^1.7.64",
|
|
23
23
|
"influx": "^5.7.0",
|
|
24
24
|
"lodash": "^4.17.20",
|