@binance/giftcard 4.1.17 → 5.0.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 +152 -102
- package/dist/index.d.ts +152 -102
- package/dist/index.js +97 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -69
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -3,9 +3,9 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
|
|
|
3
3
|
//#region src/rest-api/types/create-adual-token-gift-card-response-data.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Gift Card REST API
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Create, redeem, and check the value of Binance crypto gift cards.
|
|
9
9
|
*
|
|
10
10
|
* The version of the OpenAPI document: 1.0.0
|
|
11
11
|
*
|
|
@@ -110,9 +110,9 @@ interface CreateASingleTokenGiftCardResponse {
|
|
|
110
110
|
//#endregion
|
|
111
111
|
//#region src/rest-api/types/fetch-rsa-public-key-response.d.ts
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* Gift Card REST API
|
|
114
114
|
*
|
|
115
|
-
*
|
|
115
|
+
* Create, redeem, and check the value of Binance crypto gift cards.
|
|
116
116
|
*
|
|
117
117
|
* The version of the OpenAPI document: 1.0.0
|
|
118
118
|
*
|
|
@@ -155,9 +155,9 @@ interface FetchRsaPublicKeyResponse {
|
|
|
155
155
|
//#endregion
|
|
156
156
|
//#region src/rest-api/types/fetch-token-limit-response-data-inner.d.ts
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
158
|
+
* Gift Card REST API
|
|
159
159
|
*
|
|
160
|
-
*
|
|
160
|
+
* Create, redeem, and check the value of Binance crypto gift cards.
|
|
161
161
|
*
|
|
162
162
|
* The version of the OpenAPI document: 1.0.0
|
|
163
163
|
*
|
|
@@ -227,9 +227,9 @@ interface FetchTokenLimitResponse {
|
|
|
227
227
|
//#endregion
|
|
228
228
|
//#region src/rest-api/types/redeem-abinance-gift-card-response-data.d.ts
|
|
229
229
|
/**
|
|
230
|
-
*
|
|
230
|
+
* Gift Card REST API
|
|
231
231
|
*
|
|
232
|
-
*
|
|
232
|
+
* Create, redeem, and check the value of Binance crypto gift cards.
|
|
233
233
|
*
|
|
234
234
|
* The version of the OpenAPI document: 1.0.0
|
|
235
235
|
*
|
|
@@ -305,9 +305,9 @@ interface RedeemABinanceGiftCardResponse {
|
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region src/rest-api/types/verify-binance-gift-card-by-gift-card-number-response-data.d.ts
|
|
307
307
|
/**
|
|
308
|
-
*
|
|
308
|
+
* Gift Card REST API
|
|
309
309
|
*
|
|
310
|
-
*
|
|
310
|
+
* Create, redeem, and check the value of Binance crypto gift cards.
|
|
311
311
|
*
|
|
312
312
|
* The version of the OpenAPI document: 1.0.0
|
|
313
313
|
*
|
|
@@ -382,19 +382,24 @@ interface VerifyBinanceGiftCardByGiftCardNumberResponse {
|
|
|
382
382
|
*/
|
|
383
383
|
interface MarketDataApiInterface {
|
|
384
384
|
/**
|
|
385
|
-
* * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card
|
|
386
|
-
*
|
|
387
|
-
*
|
|
385
|
+
* * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card
|
|
386
|
+
* using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create
|
|
387
|
+
* a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at
|
|
388
|
+
* 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.
|
|
388
389
|
*
|
|
390
|
+
* Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee
|
|
391
|
+
* would be deducted from your funding wallet.
|
|
389
392
|
* To get started with, please make sure:
|
|
390
393
|
* You have a Binance account
|
|
391
394
|
* You have passed KYB
|
|
392
395
|
* You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet
|
|
393
396
|
* You need Enable Withdrawals for the API Key which requests this endpoint.
|
|
394
397
|
*
|
|
395
|
-
* Weight: 1
|
|
398
|
+
* Weight(IP): 1
|
|
399
|
+
*
|
|
400
|
+
* Security Type: TRADE
|
|
396
401
|
*
|
|
397
|
-
* @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)
|
|
402
|
+
* @summary Create a dual-token gift card (fixed value, discount feature) (TRADE)
|
|
398
403
|
* @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.
|
|
399
404
|
*
|
|
400
405
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -405,13 +410,14 @@ interface MarketDataApiInterface {
|
|
|
405
410
|
* This API is for creating a Binance Gift Card.
|
|
406
411
|
*
|
|
407
412
|
* To get started with, please make sure:
|
|
408
|
-
*
|
|
409
413
|
* You have a Binance account
|
|
410
414
|
* You have passed KYB
|
|
411
415
|
* You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet
|
|
412
416
|
* You need `Enable Withdrawals` for the API Key which requests this endpoint.
|
|
413
417
|
*
|
|
414
|
-
* Weight: 1
|
|
418
|
+
* Weight(IP): 1
|
|
419
|
+
*
|
|
420
|
+
* Security Type: USER_DATA
|
|
415
421
|
*
|
|
416
422
|
* @summary Create a single-token gift card (USER_DATA)
|
|
417
423
|
* @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.
|
|
@@ -426,9 +432,11 @@ interface MarketDataApiInterface {
|
|
|
426
432
|
*
|
|
427
433
|
**Please note that the RSA Public key fetched is valid only for the current day.**
|
|
428
434
|
*
|
|
429
|
-
* Weight: 1
|
|
435
|
+
* Weight(IP): 1
|
|
436
|
+
*
|
|
437
|
+
* Security Type: USER_DATA
|
|
430
438
|
*
|
|
431
|
-
* @summary Fetch RSA Public Key(USER_DATA)
|
|
439
|
+
* @summary Fetch RSA Public Key (USER_DATA)
|
|
432
440
|
* @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.
|
|
433
441
|
*
|
|
434
442
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -436,11 +444,14 @@ interface MarketDataApiInterface {
|
|
|
436
444
|
*/
|
|
437
445
|
fetchRsaPublicKey(requestParameters?: FetchRsaPublicKeyRequest): Promise<RestApiResponse<FetchRsaPublicKeyResponse>>;
|
|
438
446
|
/**
|
|
439
|
-
* This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as
|
|
447
|
+
* This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as
|
|
448
|
+
* mentioned in section 2 and its’ limitation.
|
|
449
|
+
*
|
|
450
|
+
* Weight(IP): 1
|
|
440
451
|
*
|
|
441
|
-
*
|
|
452
|
+
* Security Type: USER_DATA
|
|
442
453
|
*
|
|
443
|
-
* @summary Fetch Token Limit(USER_DATA)
|
|
454
|
+
* @summary Fetch Token Limit (USER_DATA)
|
|
444
455
|
* @param {FetchTokenLimitRequest} requestParameters Request parameters.
|
|
445
456
|
*
|
|
446
457
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -448,21 +459,21 @@ interface MarketDataApiInterface {
|
|
|
448
459
|
*/
|
|
449
460
|
fetchTokenLimit(requestParameters: FetchTokenLimitRequest): Promise<RestApiResponse<FetchTokenLimitResponse>>;
|
|
450
461
|
/**
|
|
451
|
-
* This API is for redeeming a Binance Gift Card
|
|
452
|
-
* Once redeemed, the coins will be deposited in your funding wallet.
|
|
462
|
+
* This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your funding wallet.
|
|
453
463
|
*
|
|
454
|
-
*
|
|
455
|
-
* Plaintext
|
|
456
|
-
* Encrypted
|
|
464
|
+
* Weight(IP): 1
|
|
457
465
|
*
|
|
458
|
-
*
|
|
459
|
-
* Fetch RSA public key from api stated below.
|
|
460
|
-
* Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`
|
|
461
|
-
**A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**
|
|
466
|
+
* Security Type: USER_DATA
|
|
462
467
|
*
|
|
463
|
-
*
|
|
468
|
+
* Notes:
|
|
469
|
+
* - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.
|
|
470
|
+
* - Sending `code` in encrypted format is more secure than plaintext.
|
|
471
|
+
* - To send encrypted `code`:
|
|
472
|
+
* - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.
|
|
473
|
+
* - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.
|
|
474
|
+
* - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.
|
|
464
475
|
*
|
|
465
|
-
* @summary Redeem a Binance Gift Card(USER_DATA)
|
|
476
|
+
* @summary Redeem a Binance Gift Card (USER_DATA)
|
|
466
477
|
* @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.
|
|
467
478
|
*
|
|
468
479
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -472,11 +483,14 @@ interface MarketDataApiInterface {
|
|
|
472
483
|
/**
|
|
473
484
|
* This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.
|
|
474
485
|
*
|
|
475
|
-
**Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to
|
|
486
|
+
**Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to
|
|
487
|
+
* verify any Gift Card Number for that hour.**
|
|
476
488
|
*
|
|
477
|
-
* Weight: 1
|
|
489
|
+
* Weight(IP): 1
|
|
478
490
|
*
|
|
479
|
-
*
|
|
491
|
+
* Security Type: USER_DATA
|
|
492
|
+
*
|
|
493
|
+
* @summary Verify Binance Gift Card by Gift Card Number (USER_DATA)
|
|
480
494
|
* @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.
|
|
481
495
|
*
|
|
482
496
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -496,7 +510,8 @@ interface CreateADualTokenGiftCardRequest {
|
|
|
496
510
|
*/
|
|
497
511
|
readonly baseToken: string;
|
|
498
512
|
/**
|
|
499
|
-
* The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode
|
|
513
|
+
* The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode
|
|
514
|
+
* endpoint.
|
|
500
515
|
* @type {string}
|
|
501
516
|
* @memberof MarketDataApiCreateADualTokenGiftCard
|
|
502
517
|
*/
|
|
@@ -580,7 +595,14 @@ interface RedeemABinanceGiftCardRequest {
|
|
|
580
595
|
*/
|
|
581
596
|
readonly code: string;
|
|
582
597
|
/**
|
|
583
|
-
* Each external unique ID represents a unique user on the partner platform. The function helps you to
|
|
598
|
+
* Each external unique ID represents a unique user on the partner platform. The function helps you to
|
|
599
|
+
* identify the redemption behavior of different users, such as redemption frequency and amount. It
|
|
600
|
+
* also helps risk and limit control of a single account, such as daily limit on redemption volume,
|
|
601
|
+
* frequency, and incorrect number of entries. This will also prevent a single user account reach the
|
|
602
|
+
* partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the
|
|
603
|
+
* User ID of your users if you have different users redeeming Binance Gift Cards on your platform. To
|
|
604
|
+
* protect user data privacy, you may choose to transfer the user id in any desired format (max. 400
|
|
605
|
+
* characters).
|
|
584
606
|
* @type {string}
|
|
585
607
|
* @memberof MarketDataApiRedeemABinanceGiftCard
|
|
586
608
|
*/
|
|
@@ -619,44 +641,50 @@ declare class MarketDataApi implements MarketDataApiInterface {
|
|
|
619
641
|
private localVarAxiosParamCreator;
|
|
620
642
|
constructor(configuration: ConfigurationRestAPI);
|
|
621
643
|
/**
|
|
622
|
-
* * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card
|
|
623
|
-
*
|
|
624
|
-
*
|
|
644
|
+
* * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card
|
|
645
|
+
* using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create
|
|
646
|
+
* a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at
|
|
647
|
+
* 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.
|
|
625
648
|
*
|
|
649
|
+
* Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee
|
|
650
|
+
* would be deducted from your funding wallet.
|
|
626
651
|
* To get started with, please make sure:
|
|
627
652
|
* You have a Binance account
|
|
628
653
|
* You have passed KYB
|
|
629
654
|
* You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet
|
|
630
655
|
* You need Enable Withdrawals for the API Key which requests this endpoint.
|
|
631
656
|
*
|
|
632
|
-
* Weight: 1
|
|
657
|
+
* Weight(IP): 1
|
|
658
|
+
*
|
|
659
|
+
* Security Type: TRADE
|
|
633
660
|
*
|
|
634
|
-
* @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)
|
|
661
|
+
* @summary Create a dual-token gift card (fixed value, discount feature) (TRADE)
|
|
635
662
|
* @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.
|
|
636
663
|
* @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}
|
|
637
664
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
638
665
|
* @memberof MarketDataApi
|
|
639
|
-
* @see {@link https://developers.binance.com/docs/
|
|
666
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-token-gift-card Binance API Documentation}
|
|
640
667
|
*/
|
|
641
668
|
createADualTokenGiftCard(requestParameters: CreateADualTokenGiftCardRequest): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>;
|
|
642
669
|
/**
|
|
643
670
|
* This API is for creating a Binance Gift Card.
|
|
644
671
|
*
|
|
645
672
|
* To get started with, please make sure:
|
|
646
|
-
*
|
|
647
673
|
* You have a Binance account
|
|
648
674
|
* You have passed KYB
|
|
649
675
|
* You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet
|
|
650
676
|
* You need `Enable Withdrawals` for the API Key which requests this endpoint.
|
|
651
677
|
*
|
|
652
|
-
* Weight: 1
|
|
678
|
+
* Weight(IP): 1
|
|
679
|
+
*
|
|
680
|
+
* Security Type: USER_DATA
|
|
653
681
|
*
|
|
654
682
|
* @summary Create a single-token gift card (USER_DATA)
|
|
655
683
|
* @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.
|
|
656
684
|
* @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}
|
|
657
685
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
658
686
|
* @memberof MarketDataApi
|
|
659
|
-
* @see {@link https://developers.binance.com/docs/
|
|
687
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-token-gift-card Binance API Documentation}
|
|
660
688
|
*/
|
|
661
689
|
createASingleTokenGiftCard(requestParameters: CreateASingleTokenGiftCardRequest): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>;
|
|
662
690
|
/**
|
|
@@ -665,65 +693,73 @@ declare class MarketDataApi implements MarketDataApiInterface {
|
|
|
665
693
|
*
|
|
666
694
|
**Please note that the RSA Public key fetched is valid only for the current day.**
|
|
667
695
|
*
|
|
668
|
-
* Weight: 1
|
|
696
|
+
* Weight(IP): 1
|
|
669
697
|
*
|
|
670
|
-
*
|
|
698
|
+
* Security Type: USER_DATA
|
|
699
|
+
*
|
|
700
|
+
* @summary Fetch RSA Public Key (USER_DATA)
|
|
671
701
|
* @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.
|
|
672
702
|
* @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}
|
|
673
703
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
674
704
|
* @memberof MarketDataApi
|
|
675
|
-
* @see {@link https://developers.binance.com/docs/
|
|
705
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-rsa-public-key Binance API Documentation}
|
|
676
706
|
*/
|
|
677
707
|
fetchRsaPublicKey(requestParameters?: FetchRsaPublicKeyRequest): Promise<RestApiResponse<FetchRsaPublicKeyResponse>>;
|
|
678
708
|
/**
|
|
679
|
-
* This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as
|
|
709
|
+
* This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as
|
|
710
|
+
* mentioned in section 2 and its’ limitation.
|
|
711
|
+
*
|
|
712
|
+
* Weight(IP): 1
|
|
680
713
|
*
|
|
681
|
-
*
|
|
714
|
+
* Security Type: USER_DATA
|
|
682
715
|
*
|
|
683
|
-
* @summary Fetch Token Limit(USER_DATA)
|
|
716
|
+
* @summary Fetch Token Limit (USER_DATA)
|
|
684
717
|
* @param {FetchTokenLimitRequest} requestParameters Request parameters.
|
|
685
718
|
* @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}
|
|
686
719
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
687
720
|
* @memberof MarketDataApi
|
|
688
|
-
* @see {@link https://developers.binance.com/docs/
|
|
721
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-token-limit Binance API Documentation}
|
|
689
722
|
*/
|
|
690
723
|
fetchTokenLimit(requestParameters: FetchTokenLimitRequest): Promise<RestApiResponse<FetchTokenLimitResponse>>;
|
|
691
724
|
/**
|
|
692
|
-
* This API is for redeeming a Binance Gift Card
|
|
693
|
-
* Once redeemed, the coins will be deposited in your funding wallet.
|
|
725
|
+
* This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your funding wallet.
|
|
694
726
|
*
|
|
695
|
-
*
|
|
696
|
-
* Plaintext
|
|
697
|
-
* Encrypted
|
|
727
|
+
* Weight(IP): 1
|
|
698
728
|
*
|
|
699
|
-
*
|
|
700
|
-
* Fetch RSA public key from api stated below.
|
|
701
|
-
* Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`
|
|
702
|
-
**A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**
|
|
729
|
+
* Security Type: USER_DATA
|
|
703
730
|
*
|
|
704
|
-
*
|
|
731
|
+
* Notes:
|
|
732
|
+
* - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.
|
|
733
|
+
* - Sending `code` in encrypted format is more secure than plaintext.
|
|
734
|
+
* - To send encrypted `code`:
|
|
735
|
+
* - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.
|
|
736
|
+
* - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.
|
|
737
|
+
* - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.
|
|
705
738
|
*
|
|
706
|
-
* @summary Redeem a Binance Gift Card(USER_DATA)
|
|
739
|
+
* @summary Redeem a Binance Gift Card (USER_DATA)
|
|
707
740
|
* @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.
|
|
708
741
|
* @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}
|
|
709
742
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
710
743
|
* @memberof MarketDataApi
|
|
711
|
-
* @see {@link https://developers.binance.com/docs/
|
|
744
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-gift-card Binance API Documentation}
|
|
712
745
|
*/
|
|
713
746
|
redeemABinanceGiftCard(requestParameters: RedeemABinanceGiftCardRequest): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>;
|
|
714
747
|
/**
|
|
715
748
|
* This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.
|
|
716
749
|
*
|
|
717
|
-
**Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to
|
|
750
|
+
**Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to
|
|
751
|
+
* verify any Gift Card Number for that hour.**
|
|
752
|
+
*
|
|
753
|
+
* Weight(IP): 1
|
|
718
754
|
*
|
|
719
|
-
*
|
|
755
|
+
* Security Type: USER_DATA
|
|
720
756
|
*
|
|
721
|
-
* @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)
|
|
757
|
+
* @summary Verify Binance Gift Card by Gift Card Number (USER_DATA)
|
|
722
758
|
* @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.
|
|
723
759
|
* @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}
|
|
724
760
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
725
761
|
* @memberof MarketDataApi
|
|
726
|
-
* @see {@link https://developers.binance.com/docs/
|
|
762
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#verify-binance-gift-card-by-gift-card-number Binance API Documentation}
|
|
727
763
|
*/
|
|
728
764
|
verifyBinanceGiftCardByGiftCardNumber(requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>;
|
|
729
765
|
}
|
|
@@ -754,44 +790,50 @@ declare class RestAPI {
|
|
|
754
790
|
*/
|
|
755
791
|
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
756
792
|
/**
|
|
757
|
-
* * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card
|
|
758
|
-
*
|
|
759
|
-
*
|
|
793
|
+
* * This API is for creating a dual-token ( stablecoin-denominated) Binance Gift Card. You may create a gift card
|
|
794
|
+
* using USDT as baseToken, that is redeemable to another designated token (faceToken). For example, you can create
|
|
795
|
+
* a fixed-value BTC gift card and pay with 100 USDT plus minting fee. This gift card can keep the value fixed at
|
|
796
|
+
* 100 USDT before redemption, and will be redeemable to BTC equivalent to 100 USDT upon redemption.
|
|
760
797
|
*
|
|
798
|
+
* Once successfully created, the amount of baseToken (e.g. USDT) in the fixed-value gift card along with the fee
|
|
799
|
+
* would be deducted from your funding wallet.
|
|
761
800
|
* To get started with, please make sure:
|
|
762
801
|
* You have a Binance account
|
|
763
802
|
* You have passed KYB
|
|
764
803
|
* You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet
|
|
765
804
|
* You need Enable Withdrawals for the API Key which requests this endpoint.
|
|
766
805
|
*
|
|
767
|
-
* Weight: 1
|
|
806
|
+
* Weight(IP): 1
|
|
807
|
+
*
|
|
808
|
+
* Security Type: TRADE
|
|
768
809
|
*
|
|
769
|
-
* @summary Create a dual-token gift card(fixed value, discount feature)(TRADE)
|
|
810
|
+
* @summary Create a dual-token gift card (fixed value, discount feature) (TRADE)
|
|
770
811
|
* @param {CreateADualTokenGiftCardRequest} requestParameters Request parameters.
|
|
771
812
|
*
|
|
772
813
|
* @returns {Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>}
|
|
773
814
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
774
|
-
* @see {@link https://developers.binance.com/docs/
|
|
815
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-adual-token-gift-card Binance API Documentation}
|
|
775
816
|
*/
|
|
776
817
|
createADualTokenGiftCard(requestParameters: CreateADualTokenGiftCardRequest): Promise<RestApiResponse<CreateADualTokenGiftCardResponse>>;
|
|
777
818
|
/**
|
|
778
819
|
* This API is for creating a Binance Gift Card.
|
|
779
820
|
*
|
|
780
821
|
* To get started with, please make sure:
|
|
781
|
-
*
|
|
782
822
|
* You have a Binance account
|
|
783
823
|
* You have passed KYB
|
|
784
824
|
* You have a sufficient balance(Gift Card amount and fee amount) in your Binance funding wallet
|
|
785
825
|
* You need `Enable Withdrawals` for the API Key which requests this endpoint.
|
|
786
826
|
*
|
|
787
|
-
* Weight: 1
|
|
827
|
+
* Weight(IP): 1
|
|
828
|
+
*
|
|
829
|
+
* Security Type: USER_DATA
|
|
788
830
|
*
|
|
789
831
|
* @summary Create a single-token gift card (USER_DATA)
|
|
790
832
|
* @param {CreateASingleTokenGiftCardRequest} requestParameters Request parameters.
|
|
791
833
|
*
|
|
792
834
|
* @returns {Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>}
|
|
793
835
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
794
|
-
* @see {@link https://developers.binance.com/docs/
|
|
836
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#create-asingle-token-gift-card Binance API Documentation}
|
|
795
837
|
*/
|
|
796
838
|
createASingleTokenGiftCard(requestParameters: CreateASingleTokenGiftCardRequest): Promise<RestApiResponse<CreateASingleTokenGiftCardResponse>>;
|
|
797
839
|
/**
|
|
@@ -800,65 +842,73 @@ declare class RestAPI {
|
|
|
800
842
|
*
|
|
801
843
|
**Please note that the RSA Public key fetched is valid only for the current day.**
|
|
802
844
|
*
|
|
803
|
-
* Weight: 1
|
|
845
|
+
* Weight(IP): 1
|
|
846
|
+
*
|
|
847
|
+
* Security Type: USER_DATA
|
|
804
848
|
*
|
|
805
|
-
* @summary Fetch RSA Public Key(USER_DATA)
|
|
849
|
+
* @summary Fetch RSA Public Key (USER_DATA)
|
|
806
850
|
* @param {FetchRsaPublicKeyRequest} requestParameters Request parameters.
|
|
807
851
|
*
|
|
808
852
|
* @returns {Promise<RestApiResponse<FetchRsaPublicKeyResponse>>}
|
|
809
853
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
810
|
-
* @see {@link https://developers.binance.com/docs/
|
|
854
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-rsa-public-key Binance API Documentation}
|
|
811
855
|
*/
|
|
812
856
|
fetchRsaPublicKey(requestParameters?: FetchRsaPublicKeyRequest): Promise<RestApiResponse<FetchRsaPublicKeyResponse>>;
|
|
813
857
|
/**
|
|
814
|
-
* This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as
|
|
858
|
+
* This API is to help you verify which tokens are available for you to create Stablecoin-Denominated gift cards as
|
|
859
|
+
* mentioned in section 2 and its’ limitation.
|
|
815
860
|
*
|
|
816
|
-
* Weight: 1
|
|
861
|
+
* Weight(IP): 1
|
|
817
862
|
*
|
|
818
|
-
*
|
|
863
|
+
* Security Type: USER_DATA
|
|
864
|
+
*
|
|
865
|
+
* @summary Fetch Token Limit (USER_DATA)
|
|
819
866
|
* @param {FetchTokenLimitRequest} requestParameters Request parameters.
|
|
820
867
|
*
|
|
821
868
|
* @returns {Promise<RestApiResponse<FetchTokenLimitResponse>>}
|
|
822
869
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
823
|
-
* @see {@link https://developers.binance.com/docs/
|
|
870
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#fetch-token-limit Binance API Documentation}
|
|
824
871
|
*/
|
|
825
872
|
fetchTokenLimit(requestParameters: FetchTokenLimitRequest): Promise<RestApiResponse<FetchTokenLimitResponse>>;
|
|
826
873
|
/**
|
|
827
|
-
* This API is for redeeming a Binance Gift Card
|
|
828
|
-
* Once redeemed, the coins will be deposited in your funding wallet.
|
|
874
|
+
* This API is for redeeming a Binance Gift Card. Once redeemed, the coins will be deposited in your funding wallet.
|
|
829
875
|
*
|
|
830
|
-
*
|
|
831
|
-
* Plaintext
|
|
832
|
-
* Encrypted
|
|
876
|
+
* Weight(IP): 1
|
|
833
877
|
*
|
|
834
|
-
*
|
|
835
|
-
* Fetch RSA public key from api stated below.
|
|
836
|
-
* Use the below algorithm to encrypt the card code using the RSA public key fetched above: `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`
|
|
837
|
-
**A sample code snippet (JAVA) is stated below for reference, the same approach can be used for different languages like C#, PERL, PYTHON, SHELL etc.:**
|
|
878
|
+
* Security Type: USER_DATA
|
|
838
879
|
*
|
|
839
|
-
*
|
|
880
|
+
* Notes:
|
|
881
|
+
* - Parameter `code` can be sent in two formats: `Plaintext` and `Encrypted`.
|
|
882
|
+
* - Sending `code` in encrypted format is more secure than plaintext.
|
|
883
|
+
* - To send encrypted `code`:
|
|
884
|
+
* - Fetch RSA public key from `GET /sapi/v1/giftcard/cryptography/rsa-public-key`.
|
|
885
|
+
* - Encrypt card code using `RSA/ECB/OAEPWithSHA-256AndMGF1Padding`.
|
|
886
|
+
* - If you enter the wrong redemption code 5 times within 24 hours, you will no longer be able to redeem any Binance Gift Cards that day.
|
|
840
887
|
*
|
|
841
|
-
* @summary Redeem a Binance Gift Card(USER_DATA)
|
|
888
|
+
* @summary Redeem a Binance Gift Card (USER_DATA)
|
|
842
889
|
* @param {RedeemABinanceGiftCardRequest} requestParameters Request parameters.
|
|
843
890
|
*
|
|
844
891
|
* @returns {Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>}
|
|
845
892
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
846
|
-
* @see {@link https://developers.binance.com/docs/
|
|
893
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#redeem-abinance-gift-card Binance API Documentation}
|
|
847
894
|
*/
|
|
848
895
|
redeemABinanceGiftCard(requestParameters: RedeemABinanceGiftCardRequest): Promise<RestApiResponse<RedeemABinanceGiftCardResponse>>;
|
|
849
896
|
/**
|
|
850
897
|
* This API is for verifying whether the Binance Gift Card is valid or not by entering Gift Card Number.
|
|
851
898
|
*
|
|
852
|
-
**Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to
|
|
899
|
+
**Please note that if you enter the wrong Gift Card Number 5 times within an hour, you will no longer be able to
|
|
900
|
+
* verify any Gift Card Number for that hour.**
|
|
901
|
+
*
|
|
902
|
+
* Weight(IP): 1
|
|
853
903
|
*
|
|
854
|
-
*
|
|
904
|
+
* Security Type: USER_DATA
|
|
855
905
|
*
|
|
856
|
-
* @summary Verify Binance Gift Card by Gift Card Number(USER_DATA)
|
|
906
|
+
* @summary Verify Binance Gift Card by Gift Card Number (USER_DATA)
|
|
857
907
|
* @param {VerifyBinanceGiftCardByGiftCardNumberRequest} requestParameters Request parameters.
|
|
858
908
|
*
|
|
859
909
|
* @returns {Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>}
|
|
860
910
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
861
|
-
* @see {@link https://developers.binance.com/docs/
|
|
911
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-gift-card/api/rest-api/market-data#verify-binance-gift-card-by-gift-card-number Binance API Documentation}
|
|
862
912
|
*/
|
|
863
913
|
verifyBinanceGiftCardByGiftCardNumber(requestParameters: VerifyBinanceGiftCardByGiftCardNumberRequest): Promise<RestApiResponse<VerifyBinanceGiftCardByGiftCardNumberResponse>>;
|
|
864
914
|
}
|