@icgio/icg-exchanges-wrapper 1.14.171 → 1.14.173

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.
@@ -149,7 +149,7 @@ module.exports = class Orders {
149
149
  this.interval_dict[exchange].positions = this.interval_dict[exchange].positions || 10 * 1000
150
150
  this.interval_dict[exchange].open_orders = this.interval_dict[exchange].open_orders || 10 * 1000
151
151
  this.interval_dict[exchange].trades = this.interval_dict[exchange].trades || 10 * 1000
152
- this.interval_dict[exchange].query_order = this.interval_dict[exchange].query_order || 10 * 1000
152
+ this.interval_dict[exchange].query_order = this.interval_dict[exchange].query_order || 10 * 60 * 1000
153
153
  this.interval_dict[exchange].rates = this.interval_dict[exchange].rates || 1 * 1000
154
154
  this.interval_dict[exchange].market_history = this.interval_dict[exchange].market_history || 2 * 1000
155
155
  this.interval_dict[exchange].ohlcv = this.interval_dict[exchange].ohlcv || 10 * 60 * 1000
@@ -181,7 +181,7 @@ module.exports = class Orders {
181
181
  positions_check: false,
182
182
  open_orders_check: true,
183
183
  trades_check: true,
184
- query_order_check: true,
184
+ query_order_check_old_orders: true,
185
185
  query_order_check_exchange: {},
186
186
  rates_check: true,
187
187
  market_history_check: true,
@@ -201,7 +201,7 @@ module.exports = class Orders {
201
201
  this.trades_amount_past_hour = {}
202
202
  this.check_trades()
203
203
  }
204
- if (this.function_enabled.query_order_check) {
204
+ if (this.function_enabled.query_order_check_old_orders) {
205
205
  for (let exchange in this.Exchanges) {
206
206
  if (this.function_enabled.query_order_check_exchange[exchange]) {
207
207
  this.check_query_order(exchange)
@@ -226,7 +226,7 @@ module.exports = class Orders {
226
226
  this.process_open_orders(this.open_orders)
227
227
  }, PROCESS_OPEN_ORDERS_TRADERS_INTERVAL_MS)
228
228
  }
229
- if (this.function_enabled.query_order_check) {
229
+ if (this.function_enabled.query_order_check_old_orders) {
230
230
  setInterval(() => {
231
231
  this.process_query_order(this.query_order)
232
232
  }, PROCESS_OPEN_ORDERS_TRADERS_INTERVAL_MS)
@@ -1145,8 +1145,8 @@ module.exports = class Orders {
1145
1145
  get_trades_all(this.Exchanges, this.exchange_pairs, this.interval_dict)
1146
1146
  }
1147
1147
  check_query_order(exchange) {
1148
- // const QUERY_ORDER_TIME_IN_MS = 30 * 60 * 1000
1149
- const QUERY_ORDER_TIME_IN_MS = 0
1148
+ const QUERY_ORDER_TIME_IN_MS = 30 * 60 * 1000
1149
+ // const QUERY_ORDER_TIME_IN_MS = 0
1150
1150
  let query_order_handler = (exchange, pair, res) => {
1151
1151
  if (res.success) {
1152
1152
  _.set(this.query_order, [exchange, pair], { query_order: res.body, update_time: new Date() })
@@ -1171,6 +1171,7 @@ module.exports = class Orders {
1171
1171
  let { open_time } = order_info[type][order_id]
1172
1172
  // console.log(order_id, open_time, open_time < new Date() - 30 * 60 * 1000)
1173
1173
  if (open_time < new Date() - QUERY_ORDER_TIME_IN_MS) {
1174
+ console.log('query_order_old_orders: %s %s %s', exchange, pair, order_id)
1174
1175
  Exchanges[exchange].query_order(pair, order_id, (res) => {
1175
1176
  count++
1176
1177
  if (res.success) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.14.171",
3
+ "version": "1.14.173",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {