hollaex-node-lib 2.19.5 → 2.19.7
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/README.md +117 -0
- package/kit.js +2 -0
- package/package.json +6 -8
package/README.md
CHANGED
|
@@ -166,11 +166,13 @@ Here is the list of channels you can subscribe to:
|
|
|
166
166
|
|
|
167
167
|
- `orderbook` (Available publicly)
|
|
168
168
|
- `trade` (Available publicly)
|
|
169
|
+
- `price` (Available publicly. Receive asset price updates)
|
|
169
170
|
- `order` (Only available with authentication. Receive order updates)
|
|
170
171
|
- `usertrade` (Only available with authentication. Receive user trades)
|
|
171
172
|
- `wallet` (Only available with authentication. Receive balance updates)
|
|
172
173
|
- `deposit` (Only available with authentication. Receive deposit notifications)
|
|
173
174
|
- `withdrawal` (Only available with authentication. Receive withdrawal notifications)
|
|
175
|
+
- `stake` (Only available with authentication. Receive staking updates)
|
|
174
176
|
- `admin` (Only available with authentication for the exchange administrator. Receive exchange operations such as deposits and withdrawals of all users)
|
|
175
177
|
|
|
176
178
|
|
|
@@ -233,6 +235,63 @@ These are exapmles of data responses from the server.
|
|
|
233
235
|
}
|
|
234
236
|
```
|
|
235
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
|
+
|
|
236
295
|
- **wallet**: Updates related to the user's private information are as follows:
|
|
237
296
|
|
|
238
297
|
```json
|
|
@@ -402,6 +461,64 @@ These are exapmles of data responses from the server.
|
|
|
402
461
|
}
|
|
403
462
|
```
|
|
404
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
|
+
|
|
405
522
|
## Example
|
|
406
523
|
|
|
407
524
|
You can run the example by going to example folder and running:
|
package/kit.js
CHANGED
|
@@ -3354,6 +3354,7 @@ class HollaExKit {
|
|
|
3354
3354
|
case 'wallet':
|
|
3355
3355
|
case 'deposit':
|
|
3356
3356
|
case 'withdrawal':
|
|
3357
|
+
case 'stake':
|
|
3357
3358
|
case 'admin':
|
|
3358
3359
|
this.ws.send(
|
|
3359
3360
|
JSON.stringify({
|
|
@@ -3409,6 +3410,7 @@ class HollaExKit {
|
|
|
3409
3410
|
case 'wallet':
|
|
3410
3411
|
case 'deposit':
|
|
3411
3412
|
case 'withdrawal':
|
|
3413
|
+
case 'stake':
|
|
3412
3414
|
case 'admin':
|
|
3413
3415
|
this.ws.send(
|
|
3414
3416
|
JSON.stringify({
|
package/package.json
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hollaex-node-lib",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.7",
|
|
4
4
|
"description": "hollaex api and websocket library for nodejs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"moment": "2.24.0",
|
|
11
|
-
"request": "2.88.0",
|
|
7
|
+
"lodash": "4.17.23",
|
|
8
|
+
"moment": "2.29.4",
|
|
9
|
+
"request": "2.88.2",
|
|
12
10
|
"request-promise": "4.2.2",
|
|
13
11
|
"ws": "7.4.0",
|
|
14
12
|
"ws-heartbeat": "1.1.0"
|
|
15
13
|
},
|
|
16
14
|
"devDependencies": {
|
|
17
|
-
"chai": "
|
|
15
|
+
"chai": "6.2.2",
|
|
18
16
|
"dotenv": "6.2.0",
|
|
19
17
|
"eslint": "5.13.0",
|
|
20
18
|
"husky": "4.3.8",
|
|
21
19
|
"lint-staged": "12.1.3",
|
|
22
|
-
"mocha": "
|
|
20
|
+
"mocha": "11.7.5"
|
|
23
21
|
},
|
|
24
22
|
"scripts": {
|
|
25
23
|
"start": "node index.js",
|