@binance/mining 5.0.14 → 6.0.1
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 +13 -0
- package/dist/index.d.mts +461 -401
- package/dist/index.d.ts +461 -401
- package/dist/index.js +172 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +172 -118
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -3,14 +3,14 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/mining";
|
|
6
|
-
var version = "
|
|
6
|
+
var version = "6.0.1";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region src/rest-api/modules/
|
|
9
|
+
//#region src/rest-api/modules/api.ts
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Mining REST API
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Query mining status, earnings, and account data via the Binance Pool API.
|
|
14
14
|
*
|
|
15
15
|
* The version of the OpenAPI document: 1.0.0
|
|
16
16
|
*
|
|
@@ -20,9 +20,9 @@ var version = "5.0.14";
|
|
|
20
20
|
* Do not edit the class manually.
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Api - axios parameter creator
|
|
24
24
|
*/
|
|
25
|
-
const
|
|
25
|
+
const ApiAxiosParamCreator = function(configuration) {
|
|
26
26
|
return {
|
|
27
27
|
accountList: async (algo, userName, recvWindow) => {
|
|
28
28
|
assertParamExists("accountList", "algo", algo);
|
|
@@ -301,25 +301,27 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
301
301
|
};
|
|
302
302
|
};
|
|
303
303
|
/**
|
|
304
|
-
*
|
|
305
|
-
* @class
|
|
304
|
+
* Api - object-oriented interface
|
|
305
|
+
* @class Api
|
|
306
306
|
*/
|
|
307
|
-
var
|
|
307
|
+
var Api = class {
|
|
308
308
|
constructor(configuration) {
|
|
309
309
|
this.configuration = configuration;
|
|
310
|
-
this.localVarAxiosParamCreator =
|
|
310
|
+
this.localVarAxiosParamCreator = ApiAxiosParamCreator(configuration);
|
|
311
311
|
}
|
|
312
312
|
/**
|
|
313
313
|
* Query Account List
|
|
314
314
|
*
|
|
315
|
-
* Weight:
|
|
315
|
+
* Weight(IP): 1
|
|
316
316
|
*
|
|
317
|
-
*
|
|
317
|
+
* Security Type: USER_DATA
|
|
318
|
+
*
|
|
319
|
+
* @summary Account List (USER_DATA)
|
|
318
320
|
* @param {AccountListRequest} requestParameters Request parameters.
|
|
319
321
|
* @returns {Promise<RestApiResponse<AccountListResponse>>}
|
|
320
322
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
321
|
-
* @memberof
|
|
322
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
323
|
+
* @memberof Api
|
|
324
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#account-list Binance API Documentation}
|
|
323
325
|
*/
|
|
324
326
|
async accountList(requestParameters) {
|
|
325
327
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountList(requestParameters?.algo, requestParameters?.userName, requestParameters?.recvWindow);
|
|
@@ -328,13 +330,15 @@ var MiningApi = class {
|
|
|
328
330
|
/**
|
|
329
331
|
* Acquiring Algorithm
|
|
330
332
|
*
|
|
331
|
-
* Weight: 1
|
|
333
|
+
* Weight(IP): 1
|
|
334
|
+
*
|
|
335
|
+
* Security Type: MARKET_DATA
|
|
332
336
|
*
|
|
333
|
-
* @summary Acquiring Algorithm(MARKET_DATA)
|
|
337
|
+
* @summary Acquiring Algorithm (MARKET_DATA)
|
|
334
338
|
* @returns {Promise<RestApiResponse<AcquiringAlgorithmResponse>>}
|
|
335
339
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
336
|
-
* @memberof
|
|
337
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
340
|
+
* @memberof Api
|
|
341
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-algorithm Binance API Documentation}
|
|
338
342
|
*/
|
|
339
343
|
async acquiringAlgorithm() {
|
|
340
344
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringAlgorithm();
|
|
@@ -343,28 +347,33 @@ var MiningApi = class {
|
|
|
343
347
|
/**
|
|
344
348
|
* Acquiring CoinName
|
|
345
349
|
*
|
|
346
|
-
* Weight: 1
|
|
350
|
+
* Weight(IP): 1
|
|
347
351
|
*
|
|
348
|
-
*
|
|
352
|
+
* Security Type: MARKET_DATA
|
|
353
|
+
*
|
|
354
|
+
* @summary Acquiring CoinName (MARKET_DATA)
|
|
349
355
|
* @returns {Promise<RestApiResponse<AcquiringCoinnameResponse>>}
|
|
350
356
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
351
|
-
* @memberof
|
|
352
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
357
|
+
* @memberof Api
|
|
358
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-coinname Binance API Documentation}
|
|
353
359
|
*/
|
|
354
360
|
async acquiringCoinname() {
|
|
355
361
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringCoinname();
|
|
356
362
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
357
363
|
}
|
|
358
364
|
/**
|
|
365
|
+
* Cancel hashrate resale configuration
|
|
366
|
+
*
|
|
367
|
+
* Weight(IP): 1
|
|
359
368
|
*
|
|
360
|
-
*
|
|
369
|
+
* Security Type: USER_DATA
|
|
361
370
|
*
|
|
362
|
-
* @summary Cancel hashrate resale configuration(USER_DATA)
|
|
371
|
+
* @summary Cancel hashrate resale configuration (USER_DATA)
|
|
363
372
|
* @param {CancelHashrateResaleConfigurationRequest} requestParameters Request parameters.
|
|
364
373
|
* @returns {Promise<RestApiResponse<CancelHashrateResaleConfigurationResponse>>}
|
|
365
374
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
366
|
-
* @memberof
|
|
367
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
375
|
+
* @memberof Api
|
|
376
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#cancel-hashrate-resale-configuration Binance API Documentation}
|
|
368
377
|
*/
|
|
369
378
|
async cancelHashrateResaleConfiguration(requestParameters) {
|
|
370
379
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelHashrateResaleConfiguration(requestParameters?.configId, requestParameters?.userName, requestParameters?.recvWindow);
|
|
@@ -373,14 +382,16 @@ var MiningApi = class {
|
|
|
373
382
|
/**
|
|
374
383
|
* Query Earnings List
|
|
375
384
|
*
|
|
376
|
-
* Weight:
|
|
385
|
+
* Weight(IP): 1
|
|
377
386
|
*
|
|
378
|
-
*
|
|
387
|
+
* Security Type: USER_DATA
|
|
388
|
+
*
|
|
389
|
+
* @summary Earnings List (USER_DATA)
|
|
379
390
|
* @param {EarningsListRequest} requestParameters Request parameters.
|
|
380
391
|
* @returns {Promise<RestApiResponse<EarningsListResponse>>}
|
|
381
392
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
382
|
-
* @memberof
|
|
383
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
393
|
+
* @memberof Api
|
|
394
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#earnings-list Binance API Documentation}
|
|
384
395
|
*/
|
|
385
396
|
async earningsList(requestParameters) {
|
|
386
397
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.earningsList(requestParameters?.algo, requestParameters?.userName, requestParameters?.coin, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
@@ -389,14 +400,16 @@ var MiningApi = class {
|
|
|
389
400
|
/**
|
|
390
401
|
* Extra Bonus List
|
|
391
402
|
*
|
|
392
|
-
* Weight:
|
|
403
|
+
* Weight(IP): 1
|
|
404
|
+
*
|
|
405
|
+
* Security Type: USER_DATA
|
|
393
406
|
*
|
|
394
|
-
* @summary Extra Bonus List(USER_DATA)
|
|
407
|
+
* @summary Extra Bonus List (USER_DATA)
|
|
395
408
|
* @param {ExtraBonusListRequest} requestParameters Request parameters.
|
|
396
409
|
* @returns {Promise<RestApiResponse<ExtraBonusListResponse>>}
|
|
397
410
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
398
|
-
* @memberof
|
|
399
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
411
|
+
* @memberof Api
|
|
412
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#extra-bonus-list Binance API Documentation}
|
|
400
413
|
*/
|
|
401
414
|
async extraBonusList(requestParameters) {
|
|
402
415
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.extraBonusList(requestParameters?.algo, requestParameters?.userName, requestParameters?.coin, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
@@ -405,14 +418,16 @@ var MiningApi = class {
|
|
|
405
418
|
/**
|
|
406
419
|
* Hashrate Resale Detail(USER_DATA)
|
|
407
420
|
*
|
|
408
|
-
* Weight:
|
|
421
|
+
* Weight(IP): 1
|
|
422
|
+
*
|
|
423
|
+
* Security Type: USER_DATA
|
|
409
424
|
*
|
|
410
|
-
* @summary Hashrate Resale Detail(USER_DATA)
|
|
425
|
+
* @summary Hashrate Resale Detail (USER_DATA)
|
|
411
426
|
* @param {HashrateResaleDetailRequest} requestParameters Request parameters.
|
|
412
427
|
* @returns {Promise<RestApiResponse<HashrateResaleDetailResponse>>}
|
|
413
428
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
414
|
-
* @memberof
|
|
415
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
429
|
+
* @memberof Api
|
|
430
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-detail Binance API Documentation}
|
|
416
431
|
*/
|
|
417
432
|
async hashrateResaleDetail(requestParameters) {
|
|
418
433
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleDetail(requestParameters?.configId, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
@@ -421,14 +436,16 @@ var MiningApi = class {
|
|
|
421
436
|
/**
|
|
422
437
|
* Hashrate Resale List
|
|
423
438
|
*
|
|
424
|
-
* Weight:
|
|
439
|
+
* Weight(IP): 1
|
|
425
440
|
*
|
|
426
|
-
*
|
|
441
|
+
* Security Type: USER_DATA
|
|
442
|
+
*
|
|
443
|
+
* @summary Hashrate Resale List (USER_DATA)
|
|
427
444
|
* @param {HashrateResaleListRequest} requestParameters Request parameters.
|
|
428
445
|
* @returns {Promise<RestApiResponse<HashrateResaleListResponse>>}
|
|
429
446
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
430
|
-
* @memberof
|
|
431
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
447
|
+
* @memberof Api
|
|
448
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-list Binance API Documentation}
|
|
432
449
|
*/
|
|
433
450
|
async hashrateResaleList(requestParameters = {}) {
|
|
434
451
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleList(requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
@@ -437,14 +454,16 @@ var MiningApi = class {
|
|
|
437
454
|
/**
|
|
438
455
|
* Hashrate Resale Request
|
|
439
456
|
*
|
|
440
|
-
* Weight:
|
|
457
|
+
* Weight(IP): 1
|
|
458
|
+
*
|
|
459
|
+
* Security Type: USER_DATA
|
|
441
460
|
*
|
|
442
|
-
* @summary Hashrate Resale Request(USER_DATA)
|
|
461
|
+
* @summary Hashrate Resale Request (USER_DATA)
|
|
443
462
|
* @param {HashrateResaleRequestRequest} requestParameters Request parameters.
|
|
444
463
|
* @returns {Promise<RestApiResponse<HashrateResaleRequestResponse>>}
|
|
445
464
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
446
|
-
* @memberof
|
|
447
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
465
|
+
* @memberof Api
|
|
466
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-request Binance API Documentation}
|
|
448
467
|
*/
|
|
449
468
|
async hashrateResaleRequest(requestParameters) {
|
|
450
469
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleRequest(requestParameters?.userName, requestParameters?.algo, requestParameters?.endDate, requestParameters?.startDate, requestParameters?.toPoolUser, requestParameters?.hashRate, requestParameters?.recvWindow);
|
|
@@ -453,14 +472,16 @@ var MiningApi = class {
|
|
|
453
472
|
/**
|
|
454
473
|
* Mining Account Earning
|
|
455
474
|
*
|
|
456
|
-
* Weight:
|
|
475
|
+
* Weight(IP): 1
|
|
476
|
+
*
|
|
477
|
+
* Security Type: USER_DATA
|
|
457
478
|
*
|
|
458
|
-
* @summary Mining Account Earning(USER_DATA)
|
|
479
|
+
* @summary Mining Account Earning (USER_DATA)
|
|
459
480
|
* @param {MiningAccountEarningRequest} requestParameters Request parameters.
|
|
460
481
|
* @returns {Promise<RestApiResponse<MiningAccountEarningResponse>>}
|
|
461
482
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
462
|
-
* @memberof
|
|
463
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
483
|
+
* @memberof Api
|
|
484
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#mining-account-earning Binance API Documentation}
|
|
464
485
|
*/
|
|
465
486
|
async miningAccountEarning(requestParameters) {
|
|
466
487
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.miningAccountEarning(requestParameters?.algo, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
@@ -469,14 +490,16 @@ var MiningApi = class {
|
|
|
469
490
|
/**
|
|
470
491
|
* Request for Detail Miner List
|
|
471
492
|
*
|
|
472
|
-
* Weight:
|
|
493
|
+
* Weight(IP): 1
|
|
473
494
|
*
|
|
474
|
-
*
|
|
495
|
+
* Security Type: USER_DATA
|
|
496
|
+
*
|
|
497
|
+
* @summary Request for Detail Miner List (USER_DATA)
|
|
475
498
|
* @param {RequestForDetailMinerListRequest} requestParameters Request parameters.
|
|
476
499
|
* @returns {Promise<RestApiResponse<RequestForDetailMinerListResponse>>}
|
|
477
500
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
478
|
-
* @memberof
|
|
479
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
501
|
+
* @memberof Api
|
|
502
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-detail-miner-list Binance API Documentation}
|
|
480
503
|
*/
|
|
481
504
|
async requestForDetailMinerList(requestParameters) {
|
|
482
505
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.requestForDetailMinerList(requestParameters?.algo, requestParameters?.userName, requestParameters?.workerName, requestParameters?.recvWindow);
|
|
@@ -485,14 +508,16 @@ var MiningApi = class {
|
|
|
485
508
|
/**
|
|
486
509
|
* Request for Miner List
|
|
487
510
|
*
|
|
488
|
-
* Weight:
|
|
511
|
+
* Weight(IP): 1
|
|
512
|
+
*
|
|
513
|
+
* Security Type: USER_DATA
|
|
489
514
|
*
|
|
490
|
-
* @summary Request for Miner List(USER_DATA)
|
|
515
|
+
* @summary Request for Miner List (USER_DATA)
|
|
491
516
|
* @param {RequestForMinerListRequest} requestParameters Request parameters.
|
|
492
517
|
* @returns {Promise<RestApiResponse<RequestForMinerListResponse>>}
|
|
493
518
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
494
|
-
* @memberof
|
|
495
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
519
|
+
* @memberof Api
|
|
520
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-miner-list Binance API Documentation}
|
|
496
521
|
*/
|
|
497
522
|
async requestForMinerList(requestParameters) {
|
|
498
523
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.requestForMinerList(requestParameters?.algo, requestParameters?.userName, requestParameters?.pageIndex, requestParameters?.sort, requestParameters?.sortColumn, requestParameters?.workerStatus, requestParameters?.recvWindow);
|
|
@@ -501,14 +526,16 @@ var MiningApi = class {
|
|
|
501
526
|
/**
|
|
502
527
|
* Statistic List
|
|
503
528
|
*
|
|
504
|
-
* Weight:
|
|
529
|
+
* Weight(IP): 1
|
|
530
|
+
*
|
|
531
|
+
* Security Type: USER_DATA
|
|
505
532
|
*
|
|
506
|
-
* @summary Statistic List(USER_DATA)
|
|
533
|
+
* @summary Statistic List (USER_DATA)
|
|
507
534
|
* @param {StatisticListRequest} requestParameters Request parameters.
|
|
508
535
|
* @returns {Promise<RestApiResponse<StatisticListResponse>>}
|
|
509
536
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
510
|
-
* @memberof
|
|
511
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
537
|
+
* @memberof Api
|
|
538
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#statistic-list Binance API Documentation}
|
|
512
539
|
*/
|
|
513
540
|
async statisticList(requestParameters) {
|
|
514
541
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.statisticList(requestParameters?.algo, requestParameters?.userName, requestParameters?.recvWindow);
|
|
@@ -519,9 +546,9 @@ var MiningApi = class {
|
|
|
519
546
|
//#endregion
|
|
520
547
|
//#region src/rest-api/rest-api.ts
|
|
521
548
|
/**
|
|
522
|
-
*
|
|
549
|
+
* Mining REST API
|
|
523
550
|
*
|
|
524
|
-
*
|
|
551
|
+
* Query mining status, earnings, and account data via the Binance Pool API.
|
|
525
552
|
*
|
|
526
553
|
* The version of the OpenAPI document: 1.0.0
|
|
527
554
|
*
|
|
@@ -533,7 +560,7 @@ var MiningApi = class {
|
|
|
533
560
|
var RestAPI = class {
|
|
534
561
|
constructor(configuration) {
|
|
535
562
|
this.configuration = configuration;
|
|
536
|
-
this.
|
|
563
|
+
this.api = new Api(configuration);
|
|
537
564
|
}
|
|
538
565
|
/**
|
|
539
566
|
* Generic function to send a request.
|
|
@@ -562,201 +589,228 @@ var RestAPI = class {
|
|
|
562
589
|
/**
|
|
563
590
|
* Query Account List
|
|
564
591
|
*
|
|
565
|
-
* Weight:
|
|
592
|
+
* Weight(IP): 1
|
|
566
593
|
*
|
|
567
|
-
*
|
|
594
|
+
* Security Type: USER_DATA
|
|
595
|
+
*
|
|
596
|
+
* @summary Account List (USER_DATA)
|
|
568
597
|
* @param {AccountListRequest} requestParameters Request parameters.
|
|
569
598
|
*
|
|
570
599
|
* @returns {Promise<RestApiResponse<AccountListResponse>>}
|
|
571
600
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
572
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
601
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#account-list Binance API Documentation}
|
|
573
602
|
*/
|
|
574
603
|
accountList(requestParameters) {
|
|
575
|
-
return this.
|
|
604
|
+
return this.api.accountList(requestParameters);
|
|
576
605
|
}
|
|
577
606
|
/**
|
|
578
607
|
* Acquiring Algorithm
|
|
579
608
|
*
|
|
580
|
-
* Weight: 1
|
|
609
|
+
* Weight(IP): 1
|
|
610
|
+
*
|
|
611
|
+
* Security Type: MARKET_DATA
|
|
581
612
|
*
|
|
582
|
-
* @summary Acquiring Algorithm(MARKET_DATA)
|
|
613
|
+
* @summary Acquiring Algorithm (MARKET_DATA)
|
|
583
614
|
*
|
|
584
615
|
* @returns {Promise<RestApiResponse<AcquiringAlgorithmResponse>>}
|
|
585
616
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
586
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
617
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-algorithm Binance API Documentation}
|
|
587
618
|
*/
|
|
588
619
|
acquiringAlgorithm() {
|
|
589
|
-
return this.
|
|
620
|
+
return this.api.acquiringAlgorithm();
|
|
590
621
|
}
|
|
591
622
|
/**
|
|
592
623
|
* Acquiring CoinName
|
|
593
624
|
*
|
|
594
|
-
* Weight: 1
|
|
625
|
+
* Weight(IP): 1
|
|
595
626
|
*
|
|
596
|
-
*
|
|
627
|
+
* Security Type: MARKET_DATA
|
|
628
|
+
*
|
|
629
|
+
* @summary Acquiring CoinName (MARKET_DATA)
|
|
597
630
|
*
|
|
598
631
|
* @returns {Promise<RestApiResponse<AcquiringCoinnameResponse>>}
|
|
599
632
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
600
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
633
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#acquiring-coinname Binance API Documentation}
|
|
601
634
|
*/
|
|
602
635
|
acquiringCoinname() {
|
|
603
|
-
return this.
|
|
636
|
+
return this.api.acquiringCoinname();
|
|
604
637
|
}
|
|
605
638
|
/**
|
|
639
|
+
* Cancel hashrate resale configuration
|
|
640
|
+
*
|
|
641
|
+
* Weight(IP): 1
|
|
606
642
|
*
|
|
607
|
-
*
|
|
643
|
+
* Security Type: USER_DATA
|
|
608
644
|
*
|
|
609
|
-
* @summary Cancel hashrate resale configuration(USER_DATA)
|
|
645
|
+
* @summary Cancel hashrate resale configuration (USER_DATA)
|
|
610
646
|
* @param {CancelHashrateResaleConfigurationRequest} requestParameters Request parameters.
|
|
611
647
|
*
|
|
612
648
|
* @returns {Promise<RestApiResponse<CancelHashrateResaleConfigurationResponse>>}
|
|
613
649
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
614
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
650
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#cancel-hashrate-resale-configuration Binance API Documentation}
|
|
615
651
|
*/
|
|
616
652
|
cancelHashrateResaleConfiguration(requestParameters) {
|
|
617
|
-
return this.
|
|
653
|
+
return this.api.cancelHashrateResaleConfiguration(requestParameters);
|
|
618
654
|
}
|
|
619
655
|
/**
|
|
620
656
|
* Query Earnings List
|
|
621
657
|
*
|
|
622
|
-
* Weight:
|
|
658
|
+
* Weight(IP): 1
|
|
623
659
|
*
|
|
624
|
-
*
|
|
660
|
+
* Security Type: USER_DATA
|
|
661
|
+
*
|
|
662
|
+
* @summary Earnings List (USER_DATA)
|
|
625
663
|
* @param {EarningsListRequest} requestParameters Request parameters.
|
|
626
664
|
*
|
|
627
665
|
* @returns {Promise<RestApiResponse<EarningsListResponse>>}
|
|
628
666
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
629
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
667
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#earnings-list Binance API Documentation}
|
|
630
668
|
*/
|
|
631
669
|
earningsList(requestParameters) {
|
|
632
|
-
return this.
|
|
670
|
+
return this.api.earningsList(requestParameters);
|
|
633
671
|
}
|
|
634
672
|
/**
|
|
635
673
|
* Extra Bonus List
|
|
636
674
|
*
|
|
637
|
-
* Weight:
|
|
675
|
+
* Weight(IP): 1
|
|
676
|
+
*
|
|
677
|
+
* Security Type: USER_DATA
|
|
638
678
|
*
|
|
639
|
-
* @summary Extra Bonus List(USER_DATA)
|
|
679
|
+
* @summary Extra Bonus List (USER_DATA)
|
|
640
680
|
* @param {ExtraBonusListRequest} requestParameters Request parameters.
|
|
641
681
|
*
|
|
642
682
|
* @returns {Promise<RestApiResponse<ExtraBonusListResponse>>}
|
|
643
683
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
644
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
684
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#extra-bonus-list Binance API Documentation}
|
|
645
685
|
*/
|
|
646
686
|
extraBonusList(requestParameters) {
|
|
647
|
-
return this.
|
|
687
|
+
return this.api.extraBonusList(requestParameters);
|
|
648
688
|
}
|
|
649
689
|
/**
|
|
650
690
|
* Hashrate Resale Detail(USER_DATA)
|
|
651
691
|
*
|
|
652
|
-
* Weight:
|
|
692
|
+
* Weight(IP): 1
|
|
693
|
+
*
|
|
694
|
+
* Security Type: USER_DATA
|
|
653
695
|
*
|
|
654
|
-
* @summary Hashrate Resale Detail(USER_DATA)
|
|
696
|
+
* @summary Hashrate Resale Detail (USER_DATA)
|
|
655
697
|
* @param {HashrateResaleDetailRequest} requestParameters Request parameters.
|
|
656
698
|
*
|
|
657
699
|
* @returns {Promise<RestApiResponse<HashrateResaleDetailResponse>>}
|
|
658
700
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
659
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
701
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-detail Binance API Documentation}
|
|
660
702
|
*/
|
|
661
703
|
hashrateResaleDetail(requestParameters) {
|
|
662
|
-
return this.
|
|
704
|
+
return this.api.hashrateResaleDetail(requestParameters);
|
|
663
705
|
}
|
|
664
706
|
/**
|
|
665
707
|
* Hashrate Resale List
|
|
666
708
|
*
|
|
667
|
-
* Weight:
|
|
709
|
+
* Weight(IP): 1
|
|
668
710
|
*
|
|
669
|
-
*
|
|
711
|
+
* Security Type: USER_DATA
|
|
712
|
+
*
|
|
713
|
+
* @summary Hashrate Resale List (USER_DATA)
|
|
670
714
|
* @param {HashrateResaleListRequest} requestParameters Request parameters.
|
|
671
715
|
*
|
|
672
716
|
* @returns {Promise<RestApiResponse<HashrateResaleListResponse>>}
|
|
673
717
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
674
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
718
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-list Binance API Documentation}
|
|
675
719
|
*/
|
|
676
720
|
hashrateResaleList(requestParameters = {}) {
|
|
677
|
-
return this.
|
|
721
|
+
return this.api.hashrateResaleList(requestParameters);
|
|
678
722
|
}
|
|
679
723
|
/**
|
|
680
724
|
* Hashrate Resale Request
|
|
681
725
|
*
|
|
682
|
-
* Weight:
|
|
726
|
+
* Weight(IP): 1
|
|
727
|
+
*
|
|
728
|
+
* Security Type: USER_DATA
|
|
683
729
|
*
|
|
684
|
-
* @summary Hashrate Resale Request(USER_DATA)
|
|
730
|
+
* @summary Hashrate Resale Request (USER_DATA)
|
|
685
731
|
* @param {HashrateResaleRequestRequest} requestParameters Request parameters.
|
|
686
732
|
*
|
|
687
733
|
* @returns {Promise<RestApiResponse<HashrateResaleRequestResponse>>}
|
|
688
734
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
689
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
735
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#hashrate-resale-request Binance API Documentation}
|
|
690
736
|
*/
|
|
691
737
|
hashrateResaleRequest(requestParameters) {
|
|
692
|
-
return this.
|
|
738
|
+
return this.api.hashrateResaleRequest(requestParameters);
|
|
693
739
|
}
|
|
694
740
|
/**
|
|
695
741
|
* Mining Account Earning
|
|
696
742
|
*
|
|
697
|
-
* Weight:
|
|
743
|
+
* Weight(IP): 1
|
|
744
|
+
*
|
|
745
|
+
* Security Type: USER_DATA
|
|
698
746
|
*
|
|
699
|
-
* @summary Mining Account Earning(USER_DATA)
|
|
747
|
+
* @summary Mining Account Earning (USER_DATA)
|
|
700
748
|
* @param {MiningAccountEarningRequest} requestParameters Request parameters.
|
|
701
749
|
*
|
|
702
750
|
* @returns {Promise<RestApiResponse<MiningAccountEarningResponse>>}
|
|
703
751
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
704
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
752
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#mining-account-earning Binance API Documentation}
|
|
705
753
|
*/
|
|
706
754
|
miningAccountEarning(requestParameters) {
|
|
707
|
-
return this.
|
|
755
|
+
return this.api.miningAccountEarning(requestParameters);
|
|
708
756
|
}
|
|
709
757
|
/**
|
|
710
758
|
* Request for Detail Miner List
|
|
711
759
|
*
|
|
712
|
-
* Weight:
|
|
760
|
+
* Weight(IP): 1
|
|
713
761
|
*
|
|
714
|
-
*
|
|
762
|
+
* Security Type: USER_DATA
|
|
763
|
+
*
|
|
764
|
+
* @summary Request for Detail Miner List (USER_DATA)
|
|
715
765
|
* @param {RequestForDetailMinerListRequest} requestParameters Request parameters.
|
|
716
766
|
*
|
|
717
767
|
* @returns {Promise<RestApiResponse<RequestForDetailMinerListResponse>>}
|
|
718
768
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
719
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
769
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-detail-miner-list Binance API Documentation}
|
|
720
770
|
*/
|
|
721
771
|
requestForDetailMinerList(requestParameters) {
|
|
722
|
-
return this.
|
|
772
|
+
return this.api.requestForDetailMinerList(requestParameters);
|
|
723
773
|
}
|
|
724
774
|
/**
|
|
725
775
|
* Request for Miner List
|
|
726
776
|
*
|
|
727
|
-
* Weight:
|
|
777
|
+
* Weight(IP): 1
|
|
778
|
+
*
|
|
779
|
+
* Security Type: USER_DATA
|
|
728
780
|
*
|
|
729
|
-
* @summary Request for Miner List(USER_DATA)
|
|
781
|
+
* @summary Request for Miner List (USER_DATA)
|
|
730
782
|
* @param {RequestForMinerListRequest} requestParameters Request parameters.
|
|
731
783
|
*
|
|
732
784
|
* @returns {Promise<RestApiResponse<RequestForMinerListResponse>>}
|
|
733
785
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
734
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
786
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#request-for-miner-list Binance API Documentation}
|
|
735
787
|
*/
|
|
736
788
|
requestForMinerList(requestParameters) {
|
|
737
|
-
return this.
|
|
789
|
+
return this.api.requestForMinerList(requestParameters);
|
|
738
790
|
}
|
|
739
791
|
/**
|
|
740
792
|
* Statistic List
|
|
741
793
|
*
|
|
742
|
-
* Weight:
|
|
794
|
+
* Weight(IP): 1
|
|
795
|
+
*
|
|
796
|
+
* Security Type: USER_DATA
|
|
743
797
|
*
|
|
744
|
-
* @summary Statistic List(USER_DATA)
|
|
798
|
+
* @summary Statistic List (USER_DATA)
|
|
745
799
|
* @param {StatisticListRequest} requestParameters Request parameters.
|
|
746
800
|
*
|
|
747
801
|
* @returns {Promise<RestApiResponse<StatisticListResponse>>}
|
|
748
802
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
749
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api
|
|
803
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-mining/api/rest-api/~#statistic-list Binance API Documentation}
|
|
750
804
|
*/
|
|
751
805
|
statisticList(requestParameters) {
|
|
752
|
-
return this.
|
|
806
|
+
return this.api.statisticList(requestParameters);
|
|
753
807
|
}
|
|
754
808
|
};
|
|
755
809
|
|
|
756
810
|
//#endregion
|
|
757
811
|
//#region src/rest-api/index.ts
|
|
758
812
|
var rest_api_exports = /* @__PURE__ */ __export({
|
|
759
|
-
|
|
813
|
+
Api: () => Api,
|
|
760
814
|
RestAPI: () => RestAPI
|
|
761
815
|
});
|
|
762
816
|
|