@icgio/icg-exchanges-wrapper 1.14.34 → 1.14.35

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.
@@ -10,6 +10,12 @@ const { round_price, round_amount } = require('@icgio/icg-exchanges-data')
10
10
 
11
11
  const Account = require('./account.js')
12
12
 
13
+ const LARGE_LIMITS = {
14
+ public_max_concurrent: 30,
15
+ public_interval_concurrent: 1000,
16
+ private_max_concurrent: 20,
17
+ private_interval_concurrent: 1000,
18
+ }
13
19
  const STANDARD_LIMITS = {
14
20
  public_max_concurrent: 10,
15
21
  public_interval_concurrent: 1000,
@@ -40,7 +46,6 @@ const SWFT_LIMITS = {
40
46
  private_max_concurrent: 1,
41
47
  private_interval_concurrent: 2000,
42
48
  }
43
-
44
49
  const P2B_LIMITS = {
45
50
  public_max_concurrent: 1,
46
51
  public_interval_concurrent: 200,
@@ -103,21 +108,23 @@ module.exports = class Orders {
103
108
  for (let exchange in exchange_pairs) {
104
109
  let api_key_temp = cd[exchange]['api_keys'] || cd[exchange]['api_key'],
105
110
  secret_key_temp = cd[exchange]['secret_keys'] || cd[exchange]['secret_key'],
106
- LIMITS
107
- if (_.includes(['binance', 'gate', 'gatev4'], exchange)) {
108
- LIMITS = MEDIUM_LIMITS
111
+ limits
112
+ if (_.includes(['hkbitex'], exchange)) {
113
+ limits = LARGE_LIMITS
114
+ } else if (_.includes(['binance', 'gate', 'gatev4'], exchange)) {
115
+ limits = MEDIUM_LIMITS
109
116
  } else if (_.includes(['bitfinex', 'coinsbit', 'kucoin', 'lbank', 'okx', 'phemex', 'xt'], exchange)) {
110
- LIMITS = SMALL_LIMITS
117
+ limits = SMALL_LIMITS
111
118
  } else if (_.includes(['bitkub', 'poloniex'], exchange)) {
112
- LIMITS = MINIMUM_LIMITS
119
+ limits = MINIMUM_LIMITS
113
120
  } else if (_.includes(['swft'], exchange)) {
114
- LIMITS = SWFT_LIMITS
121
+ limits = SWFT_LIMITS
115
122
  } else if (_.includes(['p2b'], exchange)) {
116
- LIMITS = P2B_LIMITS
123
+ limits = P2B_LIMITS
117
124
  } else {
118
- LIMITS = STANDARD_LIMITS
125
+ limits = STANDARD_LIMITS
119
126
  }
120
- this.Exchanges[exchange] = new icg_exchanges[_.upperFirst(exchange)](api_key_temp, secret_key_temp, _.assign(LIMITS, cd[exchange]))
127
+ this.Exchanges[exchange] = new icg_exchanges[_.upperFirst(exchange)](api_key_temp, secret_key_temp, _.assign(limits, cd[exchange]))
121
128
  if (!this.interval_dict || !this.interval_dict[exchange]) {
122
129
  this.interval_dict[exchange] = {
123
130
  balances: 10 * 1000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-exchanges-wrapper",
3
- "version": "1.14.34",
3
+ "version": "1.14.35",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {