hollaex-node-lib 2.19.4 → 2.19.6

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.
Files changed (3) hide show
  1. package/README.md +119 -1
  2. package/kit.js +56 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -123,9 +123,10 @@ client
123
123
  | `createWithdrawalByAdmin` | <ul><li>**user_id**: User id for the withdrawal process</li><li>**address**: Specific address for the withdrawal</li><li>**amount**: Size of the withdrawal</li><li>**currency**: Currency symbol of the withdrawal</li><li>**opts.network**: Blockchain network</li></ul> | Create withdrawal on behalf of users |
124
124
  | `getExchangeStakesByAdmin` | <ul><li>**opts.limit**: Number of elements to return. Default: 50. Maximum: 100</li><li>**opts.page**: Page of data to retrieve</li><li>**opts.order_by**: Field to order data</li><li>**opts.order**: Direction to order (asc/desc)</li><li>**opts.start_date**: Starting date of queried data in ISO8601 format</li><li>**opts.end_date**: Ending date of queried data in ISO8601 format</li><li>**opts.format**: Specify data format (csv/all)</li></ul> | Get exchange stakes for admin |
125
125
  | `createExchangeStakesByAdmin` | <ul><li>**name**: Name of the stake pool </li><li>**user_id**: User ID associated with the stake pool</li><li>**currency**: Currency of the stake pool</li><li>**account_id**: Account ID</li><li>**apy**: Annual Percentage Yield</li><li>**min_amount**: Minimum stake amount</li><li>**max_amount**: Maximum stake amount</li><li>**early_unstake**: Whether early unstake is allowed</li><li>**status**: Pool status (uninitialized/active/paused/terminated)</li><li>**opts.reward_currency**: Currency for rewards</li><li>**opts.duration**: Duration in days</li><li>**opts.slashing**: Whether slashing is enabled</li><li>**opts.slashing_earning_percentage**: Slashing percentage for earnings</li><li>**opts.slashing_principle_percentage**: Slashing percentage for principle</li><li>**opts.onboarding**: Whether pool is for onboarding</li><li>**opts.disclaimer**: Disclaimer text</li></ul> | Create exchange stakes for admin |
126
- | `updateExchangeStakesByAdmin` | <ul><li>**id**: ID of the stake pool to update</li><li>**opts.name**: Name of the stake pool </li><li>**opts.user_id**: User ID associated with the stake pool</li><li>**opts.currency**: Currency of the stake pool</li><li>**opts.reward_currency**: Currency for rewards</li><li>**opts.account_id**: Account ID</li><li>**opts.apy**: Annual Percentage Yield</li><li>**opts.duration**: Duration in days</li><li>**opts.slashing**: Whether slashing is enabled</li><li>**opts.slashing_earning_percentage**: Slashing percentage for earnings</li><li>**opts.slashing_principle_percentage**: Slashing percentage for principle</li><li>**opts.early_unstake**: Whether early unstake is allowed</li><li>**opts.min_amount**: Minimum stake amount</li><li>**opts.max_amount**: Maximum stake amount</li><li>**opts.status**: Pool status (uninitialized/active/paused/terminated)</li><li>**opts.onboarding**: Whether pool is for onboarding</li><li>**opts.disclaimer**: Disclaimer text</li></ul> | Update exchange stakes for admin |
126
+ | `updateExchangeStakesByAdmin` | <ul><li>**id**: ID of the stake pool to update</li><li>**opts.name**: Name of the stake pool </li><li>**opts.category**: Category of the stake pool</li><li>**opts.user_id**: User ID associated with the stake pool</li><li>**opts.currency**: Currency of the stake pool</li><li>**opts.reward_currency**: Currency for rewards</li><li>**opts.account_id**: Account ID</li><li>**opts.apy**: Annual Percentage Yield</li><li>**opts.duration**: Duration in days</li><li>**opts.slashing**: Whether slashing is enabled</li><li>**opts.slashing_earning_percentage**: Slashing percentage for earnings</li><li>**opts.slashing_principle_percentage**: Slashing percentage for principle</li><li>**opts.early_unstake**: Whether early unstake is allowed</li><li>**opts.min_amount**: Minimum stake amount</li><li>**opts.max_amount**: Maximum stake amount</li><li>**opts.status**: Pool status (uninitialized/active/paused/terminated)</li><li>**opts.onboarding**: Whether pool is for onboarding</li><li>**opts.disclaimer**: Disclaimer text</li></ul> | Update exchange stakes for admin |
127
127
  | `deleteExchangeStakesByAdmin` | <ul><li>**id**: ID of the stake pool to delete</li></ul> | Delete exchange stakes for admin |
128
128
  | `getExchangeStakersByAdmin` | <ul><li>**opts.id**: Unique identifier for the staker entry</li><li>**opts.user_id**: The ID of the user who has locked funds and staked</li><li>**opts.stake_id**: The ID of the stake pool</li><li>**opts.currency**: The currency in which the user staked</li><li>**opts.reward**: The amount the user has received as rewards</li><li>**opts.slashed**: The amount slashed</li><li>**opts.limit**: Number of elements to return. Default: 50. Maximum: 100</li><li>**opts.page**: Page of data to retrieve</li><li>**opts.order_by**: Field to order data</li><li>**opts.order**: Direction to order (asc/desc)</li><li>**opts.start_date**: Starting date of queried data in ISO8601 format</li><li>**opts.end_date**: Ending date of queried data in ISO8601 format</li><li>**opts.format**: Specify data format (csv/all)</li></ul> | Get exchange stakers of users for admin |
129
+ | `updateExchangeStakerByAdmin` | <ul><li>**id**: ID of the staker entry to update</li><li>**opts.nav**: Net asset value</li><li>**opts.reward**: Reward amount</li><li>**opts.status**: Staker status (staking/unstaking/closed)</li></ul> | Update exchange staker values for admin |
129
130
  | `getStakeAnalyticsByAdmin` | <ul><li>No parameters needed</li></ul> | Get staking and unstaking amounts |
130
131
  | `disableUserWithdrawalByAdmin` | <ul><li>**user_id**: The ID of the user to disable withdrawals for</li><li>**opts.expiry_date**: ISO date‑time string when the block expires</li></ul> | Block a user’s withdrawal ability |
131
132
 
@@ -165,11 +166,13 @@ Here is the list of channels you can subscribe to:
165
166
 
166
167
  - `orderbook` (Available publicly)
167
168
  - `trade` (Available publicly)
169
+ - `price` (Available publicly. Receive asset price updates)
168
170
  - `order` (Only available with authentication. Receive order updates)
169
171
  - `usertrade` (Only available with authentication. Receive user trades)
170
172
  - `wallet` (Only available with authentication. Receive balance updates)
171
173
  - `deposit` (Only available with authentication. Receive deposit notifications)
172
174
  - `withdrawal` (Only available with authentication. Receive withdrawal notifications)
175
+ - `stake` (Only available with authentication. Receive staking updates)
173
176
  - `admin` (Only available with authentication for the exchange administrator. Receive exchange operations such as deposits and withdrawals of all users)
174
177
 
175
178
 
@@ -232,6 +235,63 @@ These are exapmles of data responses from the server.
232
235
  }
233
236
  ```
234
237
 
238
+ - **price**: Public asset price updates.
239
+
240
+ - `partial`: Snapshot of all asset prices.
241
+
242
+ ```json
243
+ {
244
+ "topic": "price",
245
+ "action": "partial",
246
+ "data": {
247
+ "usdt": {
248
+ "price": 1.0007337033020485,
249
+ "lastUpdate": "2025-12-02T20:39:36.106Z"
250
+ },
251
+ "btc": {
252
+ "price": 88894.87428027151,
253
+ "lastUpdate": "2026-01-21T01:30:02.528Z"
254
+ },
255
+ "bch": {
256
+ "price": 580.8388162627956,
257
+ "lastUpdate": "2026-01-21T01:30:02.458Z"
258
+ },
259
+ "xmr": {
260
+ "price": 500.15115600048426,
261
+ "lastUpdate": "2026-01-21T01:30:02.553Z"
262
+ },
263
+ "xht": {
264
+ "price": 0.2475,
265
+ "lastUpdate": "2026-01-20T16:00:08.265Z"
266
+ },
267
+ "xrp": {
268
+ "price": 1.90604457302926,
269
+ "lastUpdate": "2026-01-21T01:30:02.569Z"
270
+ },
271
+ "eth": {
272
+ "price": 4000,
273
+ "lastUpdate": "2026-01-21T01:40:47.510Z"
274
+ }
275
+ },
276
+ "time": 1768960063
277
+ }
278
+ ```
279
+
280
+ - `update`: Price update for a single asset.
281
+
282
+ ```json
283
+ {
284
+ "topic": "price",
285
+ "action": "update",
286
+ "symbol": "eth",
287
+ "data": {
288
+ "price": 4000,
289
+ "lastUpdate": "2026-01-21T01:50:19.501Z"
290
+ },
291
+ "time": 1768960220
292
+ }
293
+ ```
294
+
235
295
  - **wallet**: Updates related to the user's private information are as follows:
236
296
 
237
297
  ```json
@@ -401,6 +461,64 @@ These are exapmles of data responses from the server.
401
461
  }
402
462
  ```
403
463
 
464
+ - **stake**: Updates related to the user's staking activity are as follows:
465
+
466
+ - `insert`: New stake creation.
467
+
468
+ ```json
469
+ {
470
+ "topic": "stake",
471
+ "action": "insert",
472
+ "user_id": 2976,
473
+ "user_network_id": 15334,
474
+ "data": {
475
+ "reward": 0,
476
+ "slashed": 0,
477
+ "id": 28,
478
+ "user_id": 2976,
479
+ "stake_id": 7,
480
+ "amount": 0.5,
481
+ "nav": 0.5,
482
+ "currency": "eth",
483
+ "reward_currency": "eth",
484
+ "status": "staking",
485
+ "updated_at": "2026-01-21T01:26:31.449Z",
486
+ "created_at": "2026-01-21T01:26:31.449Z",
487
+ "closing": null,
488
+ "unstaked_date": null
489
+ },
490
+ "time": 1768958791
491
+ }
492
+ ```
493
+
494
+ - `delete`: Stake removal.
495
+
496
+ ```json
497
+ {
498
+ "topic": "stake",
499
+ "action": "delete",
500
+ "user_id": 2976,
501
+ "user_network_id": 15334,
502
+ "data": {
503
+ "id": 28,
504
+ "user_id": 2976,
505
+ "stake_id": 7,
506
+ "amount": 0.5,
507
+ "nav": 0.5,
508
+ "currency": "eth",
509
+ "reward_currency": "eth",
510
+ "reward": 0,
511
+ "slashed": 0,
512
+ "status": "unstaking",
513
+ "closing": null,
514
+ "unstaked_date": "2026-01-21T01:31:18.866Z",
515
+ "created_at": "2026-01-21T01:26:31.449Z",
516
+ "updated_at": "2026-01-21T01:31:18.867Z"
517
+ },
518
+ "time": 1768959078
519
+ }
520
+ ```
521
+
404
522
  ## Example
405
523
 
406
524
  You can run the example by going to example folder and running:
package/kit.js CHANGED
@@ -2868,6 +2868,7 @@ class HollaExKit {
2868
2868
  * @param {number} id - ID of the stake pool to update
2869
2869
  * @param {object} opts - Optional parameters
2870
2870
  * @param {string} opts.name - Name of the stake pool
2871
+ * @param {string} opts.category - Category of the stake pool
2871
2872
  * @param {number} opts.user_id - User ID associated with the stake pool
2872
2873
  * @param {string} opts.currency - Currency of the stake pool
2873
2874
  * @param {string} opts.reward_currency - Currency for rewards
@@ -2889,6 +2890,7 @@ class HollaExKit {
2889
2890
  id,
2890
2891
  opts = {
2891
2892
  name: null,
2893
+ category: null,
2892
2894
  user_id: null,
2893
2895
  currency: null,
2894
2896
  reward_currency: null,
@@ -2915,6 +2917,10 @@ class HollaExKit {
2915
2917
  data.name = opts.name;
2916
2918
  }
2917
2919
 
2920
+ if (isString(opts.category)) {
2921
+ data.category = opts.category;
2922
+ }
2923
+
2918
2924
  if (isNumber(opts.user_id)) {
2919
2925
  data.user_id = opts.user_id;
2920
2926
  }
@@ -3110,6 +3116,51 @@ class HollaExKit {
3110
3116
  return createRequest(verb, `${this.apiUrl}${path}`, headers);
3111
3117
  }
3112
3118
 
3119
+ /**
3120
+ * Update exchange staker values for admin
3121
+ * @param {number} id - ID of the staker entry to update
3122
+ * @param {object} opts - Optional parameters
3123
+ * @param {number} opts.nav - Net asset value
3124
+ * @param {number} opts.reward - Reward amount
3125
+ * @param {string} opts.status - Staker status (staking/unstaking/closed)
3126
+ * @return {object} A JSON object with the updated staker
3127
+ */
3128
+ updateExchangeStakerByAdmin(
3129
+ id,
3130
+ opts = {
3131
+ nav: null,
3132
+ reward: null,
3133
+ status: null
3134
+ }
3135
+ ) {
3136
+ const verb = 'PUT';
3137
+ const path = `${this.baseUrl}/admin/staker`;
3138
+ const data = { id };
3139
+
3140
+ // Optional parameters
3141
+ if (isNumber(opts.nav)) {
3142
+ data.nav = opts.nav;
3143
+ }
3144
+
3145
+ if (isNumber(opts.reward)) {
3146
+ data.reward = opts.reward;
3147
+ }
3148
+
3149
+ if (isString(opts.status)) {
3150
+ data.status = opts.status;
3151
+ }
3152
+
3153
+ const headers = generateHeaders(
3154
+ this.headers,
3155
+ this.apiSecret,
3156
+ verb,
3157
+ path,
3158
+ this.apiExpiresAfter,
3159
+ data
3160
+ );
3161
+ return createRequest(verb, `${this.apiUrl}${path}`, headers, { data });
3162
+ }
3163
+
3113
3164
  /**
3114
3165
  * Get staking and unstaking amounts
3115
3166
  * @return {object} A JSON object with stake analytics data
@@ -3297,11 +3348,13 @@ class HollaExKit {
3297
3348
  }
3298
3349
  }
3299
3350
  break;
3351
+ case 'price':
3300
3352
  case 'order':
3301
3353
  case 'usertrade':
3302
3354
  case 'wallet':
3303
3355
  case 'deposit':
3304
3356
  case 'withdrawal':
3357
+ case 'stake':
3305
3358
  case 'admin':
3306
3359
  this.ws.send(
3307
3360
  JSON.stringify({
@@ -3352,10 +3405,12 @@ class HollaExKit {
3352
3405
  }
3353
3406
  this.wsEvents = this.wsEvents.filter((e) => e !== event);
3354
3407
  break;
3408
+ case 'price':
3355
3409
  case 'order':
3356
3410
  case 'wallet':
3357
3411
  case 'deposit':
3358
3412
  case 'withdrawal':
3413
+ case 'stake':
3359
3414
  case 'admin':
3360
3415
  this.ws.send(
3361
3416
  JSON.stringify({
@@ -3376,4 +3431,4 @@ class HollaExKit {
3376
3431
  }
3377
3432
  }
3378
3433
 
3379
- module.exports = HollaExKit;
3434
+ module.exports = HollaExKit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hollaex-node-lib",
3
- "version": "2.19.4",
3
+ "version": "2.19.6",
4
4
  "description": "hollaex api and websocket library for nodejs",
5
5
  "main": "index.js",
6
6
  "dependencies": {