@nightlylabs/dex-sdk 0.1.72 → 0.1.73

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/dist/index.cjs CHANGED
@@ -1407,10 +1407,16 @@ var Client = class _Client {
1407
1407
  return response;
1408
1408
  };
1409
1409
  this.getUserHistoricalDeposits = async (request) => {
1410
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1411
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1412
+ }
1410
1413
  const response = await this.sendGetJson("/v1/get_user_deposits" /* GetUserDeposits */, request);
1411
1414
  return response;
1412
1415
  };
1413
1416
  this.getUserWithdrawalsHistory = async (request) => {
1417
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1418
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1419
+ }
1414
1420
  const response = await this.sendGetJson("/v1/get_user_withdrawals" /* GetUserWithdrawals */, request);
1415
1421
  return response;
1416
1422
  };
package/dist/index.js CHANGED
@@ -1356,10 +1356,16 @@ var Client = class _Client {
1356
1356
  return response;
1357
1357
  };
1358
1358
  this.getUserHistoricalDeposits = async (request) => {
1359
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1360
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1361
+ }
1359
1362
  const response = await this.sendGetJson("/v1/get_user_deposits" /* GetUserDeposits */, request);
1360
1363
  return response;
1361
1364
  };
1362
1365
  this.getUserWithdrawalsHistory = async (request) => {
1366
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1367
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1368
+ }
1363
1369
  const response = await this.sendGetJson("/v1/get_user_withdrawals" /* GetUserWithdrawals */, request);
1364
1370
  return response;
1365
1371
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nightlylabs/dex-sdk",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {