@medievalrain/binance-ts 0.19.10 → 0.20.0

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.d.mts CHANGED
@@ -888,9 +888,11 @@ declare class SpotRestClient extends BaseRestClient {
888
888
  //#endregion
889
889
  //#region src/rest/client.d.ts
890
890
  declare class BinanceRestClient {
891
- private options?;
892
891
  private _futures?;
893
892
  private _spot?;
893
+ private apiKey?;
894
+ private apiSecret?;
895
+ private baseUrls?;
894
896
  constructor(options?: {
895
897
  apiKey?: string;
896
898
  apiSecret?: string;
@@ -898,7 +900,7 @@ declare class BinanceRestClient {
898
900
  spot?: string;
899
901
  futures?: string;
900
902
  };
901
- } | undefined);
903
+ });
902
904
  get futures(): FuturesRestClient;
903
905
  get spot(): SpotRestClient;
904
906
  }
package/dist/index.mjs CHANGED
@@ -457,19 +457,28 @@ var SpotRestClient = class extends BaseRestClient {
457
457
  var BinanceRestClient = class {
458
458
  _futures;
459
459
  _spot;
460
+ apiKey;
461
+ apiSecret;
462
+ baseUrls;
460
463
  constructor(options) {
461
- this.options = options;
464
+ this.apiKey = options?.apiKey;
465
+ this.apiSecret = options?.apiSecret;
466
+ this.baseUrls = options?.baseUrls;
462
467
  }
463
468
  get futures() {
464
469
  if (!this._futures) this._futures = new FuturesRestClient({
465
- apiKey: this.options?.apiKey,
466
- apiSecret: this.options?.apiSecret,
467
- baseUrl: this.options?.baseUrls?.futures
470
+ apiKey: this.apiKey,
471
+ apiSecret: this.apiSecret,
472
+ baseUrl: this.baseUrls?.futures
468
473
  });
469
474
  return this._futures;
470
475
  }
471
476
  get spot() {
472
- if (!this._spot) this._spot = new SpotRestClient({ baseUrl: this.options?.baseUrls?.spot });
477
+ if (!this._spot) this._spot = new SpotRestClient({
478
+ apiKey: this.apiKey,
479
+ apiSecret: this.apiSecret,
480
+ baseUrl: this.baseUrls?.spot
481
+ });
473
482
  return this._spot;
474
483
  }
475
484
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medievalrain/binance-ts",
3
- "version": "0.19.10",
3
+ "version": "0.20.0",
4
4
  "description": "Binance API SDK",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,7 +35,6 @@
35
35
  "@medievalrain/emitter": "0.8.19"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "25.0.10",
39
38
  "@typescript/native-preview": "7.0.0-dev.20260128.1",
40
39
  "dotenv": "17.2.3",
41
40
  "oxfmt": "0.27.0",