@binance/fiat 7.0.0 → 8.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 CHANGED
@@ -1,11 +1,11 @@
1
1
  import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, FIAT_REST_API_PROD_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, RestApiResponse, ServerError, TooManyRequestsError, UnauthorizedError } from "@binance/common";
2
2
 
3
- //#region src/rest-api/types/account-info.d.ts
3
+ //#region src/rest-api/types/deposit-response-data.d.ts
4
4
 
5
5
  /**
6
- * Binance Fiat REST API
6
+ * Fiat REST API
7
7
  *
8
- * OpenAPI Specification for the Binance Fiat REST API
8
+ * Query Binance fiat deposit and withdrawal history.
9
9
  *
10
10
  * The version of the OpenAPI document: 1.0.0
11
11
  *
@@ -17,40 +17,50 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, FIAT_REST_
17
17
  /**
18
18
  *
19
19
  * @export
20
- * @interface AccountInfo
20
+ * @interface DepositResponseData
21
21
  */
22
- interface AccountInfo {
22
+ interface DepositResponseData {
23
23
  /**
24
24
  *
25
25
  * @type {string}
26
- * @memberof AccountInfo
26
+ * @memberof DepositResponseData
27
27
  */
28
- accountNumber?: string;
28
+ orderId?: string;
29
+ }
30
+ //#endregion
31
+ //#region src/rest-api/types/deposit-response.d.ts
32
+
33
+ /**
34
+ *
35
+ * @export
36
+ * @interface DepositResponse
37
+ */
38
+ interface DepositResponse {
29
39
  /**
30
40
  *
31
41
  * @type {string}
32
- * @memberof AccountInfo
42
+ * @memberof DepositResponse
33
43
  */
34
- agency?: string;
44
+ code?: string;
35
45
  /**
36
46
  *
37
47
  * @type {string}
38
- * @memberof AccountInfo
48
+ * @memberof DepositResponse
39
49
  */
40
- bankCodeForPix?: string;
50
+ message?: string;
41
51
  /**
42
52
  *
43
- * @type {string}
44
- * @memberof AccountInfo
53
+ * @type {DepositResponseData}
54
+ * @memberof DepositResponse
45
55
  */
46
- accountType?: string;
56
+ data?: DepositResponseData;
47
57
  }
48
58
  //#endregion
49
- //#region src/rest-api/types/deposit-response-data.d.ts
59
+ //#region src/rest-api/types/fiat-withdraw-request-account-info.d.ts
50
60
  /**
51
- * Binance Fiat REST API
61
+ * Fiat REST API
52
62
  *
53
- * OpenAPI Specification for the Binance Fiat REST API
63
+ * Query Binance fiat deposit and withdrawal history.
54
64
  *
55
65
  * The version of the OpenAPI document: 1.0.0
56
66
  *
@@ -60,45 +70,35 @@ interface AccountInfo {
60
70
  * Do not edit the class manually.
61
71
  */
62
72
  /**
63
- *
73
+ * withdraw account info
64
74
  * @export
65
- * @interface DepositResponseData
75
+ * @interface FiatWithdrawRequestAccountInfo
66
76
  */
67
- interface DepositResponseData {
77
+ interface FiatWithdrawRequestAccountInfo {
68
78
  /**
69
- *
79
+ * Your destination bank account number is required to receive the withdrawal. In Argentina, this will be your CBU/CVU; in Mexico, it will be your CLABE.
70
80
  * @type {string}
71
- * @memberof DepositResponseData
81
+ * @memberof FiatWithdrawRequestAccountInfo
72
82
  */
73
- orderId?: string;
74
- }
75
- //#endregion
76
- //#region src/rest-api/types/deposit-response.d.ts
77
-
78
- /**
79
- *
80
- * @export
81
- * @interface DepositResponse
82
- */
83
- interface DepositResponse {
83
+ accountNumber: string;
84
84
  /**
85
- *
85
+ * Bank agency code. If contains a hyphen (e.g. `123-4`), enter `123` only.
86
86
  * @type {string}
87
- * @memberof DepositResponse
87
+ * @memberof FiatWithdrawRequestAccountInfo
88
88
  */
89
- code?: string;
89
+ agency?: string;
90
90
  /**
91
- *
91
+ * Bank code used for PIX routing.
92
92
  * @type {string}
93
- * @memberof DepositResponse
93
+ * @memberof FiatWithdrawRequestAccountInfo
94
94
  */
95
- message?: string;
95
+ bankCodeForPix?: string;
96
96
  /**
97
- *
98
- * @type {DepositResponseData}
99
- * @memberof DepositResponse
97
+ * Account type, e.g. `current` (Checking Account), `saving` (Savings Account), etc.
98
+ * @type {string}
99
+ * @memberof FiatWithdrawRequestAccountInfo
100
100
  */
101
- data?: DepositResponseData;
101
+ accountType?: string;
102
102
  }
103
103
  //#endregion
104
104
  //#region src/rest-api/types/fiat-withdraw-response.d.ts
@@ -130,9 +130,9 @@ interface FiatWithdrawResponse {
130
130
  //#endregion
131
131
  //#region src/rest-api/types/get-fiat-deposit-withdraw-history-response-data-inner.d.ts
132
132
  /**
133
- * Binance Fiat REST API
133
+ * Fiat REST API
134
134
  *
135
- * OpenAPI Specification for the Binance Fiat REST API
135
+ * Query Binance fiat deposit and withdrawal history.
136
136
  *
137
137
  * The version of the OpenAPI document: 1.0.0
138
138
  *
@@ -184,7 +184,7 @@ interface GetFiatDepositWithdrawHistoryResponseDataInner {
184
184
  */
185
185
  method?: string;
186
186
  /**
187
- *
187
+ * Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial Credit Stopped
188
188
  * @type {string}
189
189
  * @memberof GetFiatDepositWithdrawHistoryResponseDataInner
190
190
  */
@@ -244,9 +244,9 @@ interface GetFiatDepositWithdrawHistoryResponse {
244
244
  //#endregion
245
245
  //#region src/rest-api/types/get-fiat-payments-history-response-data-inner.d.ts
246
246
  /**
247
- * Binance Fiat REST API
247
+ * Fiat REST API
248
248
  *
249
- * OpenAPI Specification for the Binance Fiat REST API
249
+ * Query Binance fiat deposit and withdrawal history.
250
250
  *
251
251
  * The version of the OpenAPI document: 1.0.0
252
252
  *
@@ -370,9 +370,9 @@ interface GetFiatPaymentsHistoryResponse {
370
370
  //#endregion
371
371
  //#region src/rest-api/types/get-order-detail-response-data.d.ts
372
372
  /**
373
- * Binance Fiat REST API
373
+ * Fiat REST API
374
374
  *
375
- * OpenAPI Specification for the Binance Fiat REST API
375
+ * Query Binance fiat deposit and withdrawal history.
376
376
  *
377
377
  * The version of the OpenAPI document: 1.0.0
378
378
  *
@@ -464,382 +464,408 @@ interface GetOrderDetailResponse {
464
464
  data?: GetOrderDetailResponseData;
465
465
  }
466
466
  //#endregion
467
- //#region src/rest-api/modules/fiat-api.d.ts
467
+ //#region src/rest-api/modules/api.d.ts
468
468
  /**
469
- * FiatApi - interface
470
- * @interface FiatApi
469
+ * Api - interface
470
+ * @interface Api
471
471
  */
472
- interface FiatApiInterface {
472
+ interface ApiInterface {
473
473
  /**
474
474
  * Submit deposit request, in this version, we only support BRL deposit via pix.
475
475
  *
476
- *
477
- *
478
476
  * For BRL deposit via pix, you need to place an order before making a transfer from your bank.
479
477
  *
480
- * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
478
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
479
+ * fiat service on our website.
481
480
  *
482
- * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
481
+ * Weight(UID): 45000
483
482
  *
484
- * Weight: 45000
483
+ * Security Type: TRADE
485
484
  *
486
- * @summary Deposit(TRADE)
485
+ * Notes:
486
+ * - `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
487
+ *
488
+ * @summary Deposit (TRADE)
487
489
  * @param {DepositRequest} requestParameters Request parameters.
488
490
  *
489
491
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
490
- * @memberof FiatApiInterface
492
+ * @memberof ApiInterface
491
493
  */
492
494
  deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;
493
495
  /**
494
496
  * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.
495
497
  *
496
- * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.
498
+ * You need to call this api first, and call query order detail api in a loop to get the status of the order until
499
+ * this order is successful.
497
500
  *
498
- * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.
501
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
502
+ * fiat service on our website.
499
503
  *
500
- * you need to bind your bank account on web/app before using the corresponding account number
504
+ * Weight(UID): 45000
501
505
  *
502
- * Weight: 45000
506
+ * Security Type: TRADE
503
507
  *
504
- * @summary Fiat Withdraw(WITHDRAW)
508
+ * @summary Fiat Withdraw (TRADE)
505
509
  * @param {FiatWithdrawRequest} requestParameters Request parameters.
506
510
  *
507
511
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
508
- * @memberof FiatApiInterface
512
+ * @memberof ApiInterface
509
513
  */
510
514
  fiatWithdraw(requestParameters: FiatWithdrawRequest): Promise<RestApiResponse<FiatWithdrawResponse>>;
511
515
  /**
512
516
  * Get Fiat Deposit/Withdraw History
513
517
  *
514
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
518
+ * Weight(UID): 45000
519
+ *
520
+ * Security Type: USER_DATA
515
521
  *
516
- * Weight: 45000
522
+ * Notes:
523
+ * - If `beginTime` and `endTime` are not sent, recent 30-day data is returned.
517
524
  *
518
525
  * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
519
526
  * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
520
527
  *
521
528
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
522
- * @memberof FiatApiInterface
529
+ * @memberof ApiInterface
523
530
  */
524
531
  getFiatDepositWithdrawHistory(requestParameters: GetFiatDepositWithdrawHistoryRequest): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>;
525
532
  /**
526
- * Get Fiat Deposit/Withdraw History
533
+ * Get Fiat Payments History
527
534
  *
528
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
529
- * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
530
- * Cash Balance
531
- * Credit Card
532
- * Online Banking
533
- * Bank Transfer
535
+ * Weight(IP): 1
534
536
  *
535
- * Weight: 1
537
+ * Security Type: USER_DATA
538
+ *
539
+ * Notes:
540
+ * - If `beginTime` and `endTime` are not sent, recent 30-day data is returned.
541
+ * - `paymentMethod` is returned only when querying buy history (`transactionType=0`).
542
+ * - Supported payment methods: `Cash Balance`, `Credit Card`, `Online Banking`, `Bank Transfer`.
536
543
  *
537
544
  * @summary Get Fiat Payments History (USER_DATA)
538
545
  * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
539
546
  *
540
547
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
541
- * @memberof FiatApiInterface
548
+ * @memberof ApiInterface
542
549
  */
543
550
  getFiatPaymentsHistory(requestParameters: GetFiatPaymentsHistoryRequest): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;
544
551
  /**
545
552
  * Get Order Detail
546
553
  *
547
- * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
554
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
555
+ * fiat service on our website.
556
+ *
557
+ * Weight(IP): 1
548
558
  *
549
- * Weight: 1
559
+ * Security Type: USER_DATA
550
560
  *
551
- * @summary Get Order Detail(USER_DATA)
561
+ * @summary Get Order Detail (USER_DATA)
552
562
  * @param {GetOrderDetailRequest} requestParameters Request parameters.
553
563
  *
554
564
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
555
- * @memberof FiatApiInterface
565
+ * @memberof ApiInterface
556
566
  */
557
567
  getOrderDetail(requestParameters: GetOrderDetailRequest): Promise<RestApiResponse<GetOrderDetailResponse>>;
558
568
  }
559
569
  /**
560
- * Request parameters for deposit operation in FiatApi.
570
+ * Request parameters for deposit operation in Api.
561
571
  * @interface DepositRequest
562
572
  */
563
573
  interface DepositRequest {
564
574
  /**
565
575
  *
566
576
  * @type {string}
567
- * @memberof FiatApiDeposit
577
+ * @memberof ApiDeposit
568
578
  */
569
579
  readonly currency: string;
570
580
  /**
571
- *
581
+ * payment method; current supported: pix
572
582
  * @type {string}
573
- * @memberof FiatApiDeposit
583
+ * @memberof ApiDeposit
574
584
  */
575
- readonly apiPaymentMethod: string;
585
+ readonly apiPaymentMethod: DepositApiPaymentMethodEnum;
576
586
  /**
577
- *
578
- * @type {number | bigint}
579
- * @memberof FiatApiDeposit
587
+ * deposit amount
588
+ * @type {string}
589
+ * @memberof ApiDeposit
580
590
  */
581
- readonly amount: number | bigint;
591
+ readonly amount: string;
582
592
  /**
583
- *
593
+ * Request validity window in milliseconds
584
594
  * @type {number | bigint}
585
- * @memberof FiatApiDeposit
595
+ * @memberof ApiDeposit
586
596
  */
587
597
  readonly recvWindow?: number | bigint;
588
598
  /**
589
599
  *
590
600
  * @type {object}
591
- * @memberof FiatApiDeposit
601
+ * @memberof ApiDeposit
592
602
  */
593
603
  readonly ext?: object;
594
604
  }
595
605
  /**
596
- * Request parameters for fiatWithdraw operation in FiatApi.
606
+ * Request parameters for fiatWithdraw operation in Api.
597
607
  * @interface FiatWithdrawRequest
598
608
  */
599
609
  interface FiatWithdrawRequest {
600
610
  /**
601
- *
611
+ * Fiat currency, such as BRL, ARS, MXN
602
612
  * @type {string}
603
- * @memberof FiatApiFiatWithdraw
613
+ * @memberof ApiFiatWithdraw
604
614
  */
605
615
  readonly currency: string;
606
616
  /**
607
- *
617
+ * payment method; current supported: bank_transfer
608
618
  * @type {string}
609
- * @memberof FiatApiFiatWithdraw
619
+ * @memberof ApiFiatWithdraw
610
620
  */
611
- readonly apiPaymentMethod: string;
621
+ readonly apiPaymentMethod: FiatWithdrawApiPaymentMethodEnum;
612
622
  /**
613
- *
623
+ * withdraw amount
614
624
  * @type {number | bigint}
615
- * @memberof FiatApiFiatWithdraw
625
+ * @memberof ApiFiatWithdraw
616
626
  */
617
627
  readonly amount: number | bigint;
618
628
  /**
619
629
  *
620
- * @type {AccountInfo}
621
- * @memberof FiatApiFiatWithdraw
630
+ * @type {FiatWithdrawRequestAccountInfo}
631
+ * @memberof ApiFiatWithdraw
622
632
  */
623
- readonly accountInfo: AccountInfo;
633
+ readonly accountInfo: FiatWithdrawRequestAccountInfo;
624
634
  /**
625
- *
635
+ * Request validity window in milliseconds
626
636
  * @type {number | bigint}
627
- * @memberof FiatApiFiatWithdraw
637
+ * @memberof ApiFiatWithdraw
628
638
  */
629
639
  readonly recvWindow?: number | bigint;
630
640
  /**
631
641
  *
632
642
  * @type {object}
633
- * @memberof FiatApiFiatWithdraw
643
+ * @memberof ApiFiatWithdraw
634
644
  */
635
645
  readonly ext?: object;
636
646
  }
637
647
  /**
638
- * Request parameters for getFiatDepositWithdrawHistory operation in FiatApi.
648
+ * Request parameters for getFiatDepositWithdrawHistory operation in Api.
639
649
  * @interface GetFiatDepositWithdrawHistoryRequest
640
650
  */
641
651
  interface GetFiatDepositWithdrawHistoryRequest {
642
652
  /**
643
- * 0-buy,1-sell
653
+ * 0: deposit, 1: withdraw
644
654
  * @type {string}
645
- * @memberof FiatApiGetFiatDepositWithdrawHistory
655
+ * @memberof ApiGetFiatDepositWithdrawHistory
646
656
  */
647
657
  readonly transactionType: string;
648
658
  /**
649
659
  *
650
660
  * @type {number | bigint}
651
- * @memberof FiatApiGetFiatDepositWithdrawHistory
661
+ * @memberof ApiGetFiatDepositWithdrawHistory
652
662
  */
653
663
  readonly beginTime?: number | bigint;
654
664
  /**
655
665
  *
656
666
  * @type {number | bigint}
657
- * @memberof FiatApiGetFiatDepositWithdrawHistory
667
+ * @memberof ApiGetFiatDepositWithdrawHistory
658
668
  */
659
669
  readonly endTime?: number | bigint;
660
670
  /**
661
- * default 1
671
+ *
662
672
  * @type {number | bigint}
663
- * @memberof FiatApiGetFiatDepositWithdrawHistory
673
+ * @memberof ApiGetFiatDepositWithdrawHistory
664
674
  */
665
675
  readonly page?: number | bigint;
666
676
  /**
667
- * default 100, max 500
677
+ *
668
678
  * @type {number | bigint}
669
- * @memberof FiatApiGetFiatDepositWithdrawHistory
679
+ * @memberof ApiGetFiatDepositWithdrawHistory
670
680
  */
671
681
  readonly rows?: number | bigint;
672
682
  /**
673
683
  *
674
684
  * @type {number | bigint}
675
- * @memberof FiatApiGetFiatDepositWithdrawHistory
685
+ * @memberof ApiGetFiatDepositWithdrawHistory
676
686
  */
677
687
  readonly recvWindow?: number | bigint;
678
688
  }
679
689
  /**
680
- * Request parameters for getFiatPaymentsHistory operation in FiatApi.
690
+ * Request parameters for getFiatPaymentsHistory operation in Api.
681
691
  * @interface GetFiatPaymentsHistoryRequest
682
692
  */
683
693
  interface GetFiatPaymentsHistoryRequest {
684
694
  /**
685
- * 0-buy,1-sell
695
+ * 0: buy, 1: sell
686
696
  * @type {string}
687
- * @memberof FiatApiGetFiatPaymentsHistory
697
+ * @memberof ApiGetFiatPaymentsHistory
688
698
  */
689
699
  readonly transactionType: string;
690
700
  /**
691
701
  *
692
702
  * @type {number | bigint}
693
- * @memberof FiatApiGetFiatPaymentsHistory
703
+ * @memberof ApiGetFiatPaymentsHistory
694
704
  */
695
705
  readonly beginTime?: number | bigint;
696
706
  /**
697
707
  *
698
708
  * @type {number | bigint}
699
- * @memberof FiatApiGetFiatPaymentsHistory
709
+ * @memberof ApiGetFiatPaymentsHistory
700
710
  */
701
711
  readonly endTime?: number | bigint;
702
712
  /**
703
- * default 1
713
+ *
704
714
  * @type {number | bigint}
705
- * @memberof FiatApiGetFiatPaymentsHistory
715
+ * @memberof ApiGetFiatPaymentsHistory
706
716
  */
707
717
  readonly page?: number | bigint;
708
718
  /**
709
- * default 100, max 500
719
+ *
710
720
  * @type {number | bigint}
711
- * @memberof FiatApiGetFiatPaymentsHistory
721
+ * @memberof ApiGetFiatPaymentsHistory
712
722
  */
713
723
  readonly rows?: number | bigint;
714
724
  /**
715
725
  *
716
726
  * @type {number | bigint}
717
- * @memberof FiatApiGetFiatPaymentsHistory
727
+ * @memberof ApiGetFiatPaymentsHistory
718
728
  */
719
729
  readonly recvWindow?: number | bigint;
720
730
  }
721
731
  /**
722
- * Request parameters for getOrderDetail operation in FiatApi.
732
+ * Request parameters for getOrderDetail operation in Api.
723
733
  * @interface GetOrderDetailRequest
724
734
  */
725
735
  interface GetOrderDetailRequest {
726
736
  /**
727
- * order id retrieved from the api call of withdrawal
737
+ * Order ID retrieved from the withdrawal API
728
738
  * @type {string}
729
- * @memberof FiatApiGetOrderDetail
739
+ * @memberof ApiGetOrderDetail
730
740
  */
731
741
  readonly orderNo: string;
732
742
  /**
733
743
  *
734
744
  * @type {number | bigint}
735
- * @memberof FiatApiGetOrderDetail
745
+ * @memberof ApiGetOrderDetail
736
746
  */
737
747
  readonly recvWindow?: number | bigint;
738
748
  }
739
749
  /**
740
- * FiatApi - object-oriented interface
741
- * @class FiatApi
750
+ * Api - object-oriented interface
751
+ * @class Api
742
752
  */
743
- declare class FiatApi implements FiatApiInterface {
753
+ declare class Api implements ApiInterface {
744
754
  private readonly configuration;
745
755
  private localVarAxiosParamCreator;
746
756
  constructor(configuration: ConfigurationRestAPI);
747
757
  /**
748
758
  * Submit deposit request, in this version, we only support BRL deposit via pix.
749
759
  *
750
- *
751
- *
752
760
  * For BRL deposit via pix, you need to place an order before making a transfer from your bank.
753
761
  *
754
- * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
762
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
763
+ * fiat service on our website.
755
764
  *
756
- * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
765
+ * Weight(UID): 45000
757
766
  *
758
- * Weight: 45000
767
+ * Security Type: TRADE
759
768
  *
760
- * @summary Deposit(TRADE)
769
+ * Notes:
770
+ * - `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
771
+ *
772
+ * @summary Deposit (TRADE)
761
773
  * @param {DepositRequest} requestParameters Request parameters.
762
774
  * @returns {Promise<RestApiResponse<DepositResponse>>}
763
775
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
764
- * @memberof FiatApi
765
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}
776
+ * @memberof Api
777
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#deposit Binance API Documentation}
766
778
  */
767
779
  deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;
768
780
  /**
769
781
  * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.
770
782
  *
771
- * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.
783
+ * You need to call this api first, and call query order detail api in a loop to get the status of the order until
784
+ * this order is successful.
772
785
  *
773
- * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.
786
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
787
+ * fiat service on our website.
774
788
  *
775
- * you need to bind your bank account on web/app before using the corresponding account number
789
+ * Weight(UID): 45000
776
790
  *
777
- * Weight: 45000
791
+ * Security Type: TRADE
778
792
  *
779
- * @summary Fiat Withdraw(WITHDRAW)
793
+ * @summary Fiat Withdraw (TRADE)
780
794
  * @param {FiatWithdrawRequest} requestParameters Request parameters.
781
795
  * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}
782
796
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
783
- * @memberof FiatApi
784
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}
797
+ * @memberof Api
798
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#fiat-withdraw Binance API Documentation}
785
799
  */
786
800
  fiatWithdraw(requestParameters: FiatWithdrawRequest): Promise<RestApiResponse<FiatWithdrawResponse>>;
787
801
  /**
788
802
  * Get Fiat Deposit/Withdraw History
789
803
  *
790
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
804
+ * Weight(UID): 45000
805
+ *
806
+ * Security Type: USER_DATA
791
807
  *
792
- * Weight: 45000
808
+ * Notes:
809
+ * - If `beginTime` and `endTime` are not sent, recent 30-day data is returned.
793
810
  *
794
811
  * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
795
812
  * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
796
813
  * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
797
814
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
798
- * @memberof FiatApi
799
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
815
+ * @memberof Api
816
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-deposit-withdraw-history Binance API Documentation}
800
817
  */
801
818
  getFiatDepositWithdrawHistory(requestParameters: GetFiatDepositWithdrawHistoryRequest): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>;
802
819
  /**
803
- * Get Fiat Deposit/Withdraw History
820
+ * Get Fiat Payments History
804
821
  *
805
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
806
- * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
807
- * Cash Balance
808
- * Credit Card
809
- * Online Banking
810
- * Bank Transfer
822
+ * Weight(IP): 1
811
823
  *
812
- * Weight: 1
824
+ * Security Type: USER_DATA
825
+ *
826
+ * Notes:
827
+ * - If `beginTime` and `endTime` are not sent, recent 30-day data is returned.
828
+ * - `paymentMethod` is returned only when querying buy history (`transactionType=0`).
829
+ * - Supported payment methods: `Cash Balance`, `Credit Card`, `Online Banking`, `Bank Transfer`.
813
830
  *
814
831
  * @summary Get Fiat Payments History (USER_DATA)
815
832
  * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
816
833
  * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
817
834
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
818
- * @memberof FiatApi
819
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
835
+ * @memberof Api
836
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-payments-history Binance API Documentation}
820
837
  */
821
838
  getFiatPaymentsHistory(requestParameters: GetFiatPaymentsHistoryRequest): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;
822
839
  /**
823
840
  * Get Order Detail
824
841
  *
825
- * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
842
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
843
+ * fiat service on our website.
844
+ *
845
+ * Weight(IP): 1
826
846
  *
827
- * Weight: 1
847
+ * Security Type: USER_DATA
828
848
  *
829
- * @summary Get Order Detail(USER_DATA)
849
+ * @summary Get Order Detail (USER_DATA)
830
850
  * @param {GetOrderDetailRequest} requestParameters Request parameters.
831
851
  * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}
832
852
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
833
- * @memberof FiatApi
834
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}
853
+ * @memberof Api
854
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-order-detail Binance API Documentation}
835
855
  */
836
856
  getOrderDetail(requestParameters: GetOrderDetailRequest): Promise<RestApiResponse<GetOrderDetailResponse>>;
837
857
  }
858
+ declare enum DepositApiPaymentMethodEnum {
859
+ pix = "pix",
860
+ }
861
+ declare enum FiatWithdrawApiPaymentMethodEnum {
862
+ bank_transfer = "bank_transfer",
863
+ }
838
864
  //#endregion
839
865
  //#region src/rest-api/rest-api.d.ts
840
866
  declare class RestAPI {
841
867
  private configuration;
842
- private fiatApi;
868
+ private api;
843
869
  constructor(configuration: ConfigurationRestAPI);
844
870
  /**
845
871
  * Generic function to send a request.
@@ -864,96 +890,106 @@ declare class RestAPI {
864
890
  /**
865
891
  * Submit deposit request, in this version, we only support BRL deposit via pix.
866
892
  *
867
- *
868
- *
869
893
  * For BRL deposit via pix, you need to place an order before making a transfer from your bank.
870
894
  *
871
- * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
895
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
896
+ * fiat service on our website.
872
897
  *
873
- * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
898
+ * Weight(UID): 45000
874
899
  *
875
- * Weight: 45000
900
+ * Security Type: TRADE
876
901
  *
877
- * @summary Deposit(TRADE)
902
+ * Notes:
903
+ * - `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
904
+ *
905
+ * @summary Deposit (TRADE)
878
906
  * @param {DepositRequest} requestParameters Request parameters.
879
907
  *
880
908
  * @returns {Promise<RestApiResponse<DepositResponse>>}
881
909
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
882
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}
910
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#deposit Binance API Documentation}
883
911
  */
884
912
  deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;
885
913
  /**
886
914
  * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.
887
915
  *
888
- * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.
916
+ * You need to call this api first, and call query order detail api in a loop to get the status of the order until
917
+ * this order is successful.
889
918
  *
890
- * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.
919
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
920
+ * fiat service on our website.
891
921
  *
892
- * you need to bind your bank account on web/app before using the corresponding account number
922
+ * Weight(UID): 45000
893
923
  *
894
- * Weight: 45000
924
+ * Security Type: TRADE
895
925
  *
896
- * @summary Fiat Withdraw(WITHDRAW)
926
+ * @summary Fiat Withdraw (TRADE)
897
927
  * @param {FiatWithdrawRequest} requestParameters Request parameters.
898
928
  *
899
929
  * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}
900
930
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
901
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}
931
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#fiat-withdraw Binance API Documentation}
902
932
  */
903
933
  fiatWithdraw(requestParameters: FiatWithdrawRequest): Promise<RestApiResponse<FiatWithdrawResponse>>;
904
934
  /**
905
935
  * Get Fiat Deposit/Withdraw History
906
936
  *
907
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
937
+ * Weight(UID): 45000
938
+ *
939
+ * Security Type: USER_DATA
908
940
  *
909
- * Weight: 45000
941
+ * Notes:
942
+ * - If `beginTime` and `endTime` are not sent, recent 30-day data is returned.
910
943
  *
911
944
  * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
912
945
  * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
913
946
  *
914
947
  * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
915
948
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
916
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
949
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-deposit-withdraw-history Binance API Documentation}
917
950
  */
918
951
  getFiatDepositWithdrawHistory(requestParameters: GetFiatDepositWithdrawHistoryRequest): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>;
919
952
  /**
920
- * Get Fiat Deposit/Withdraw History
953
+ * Get Fiat Payments History
921
954
  *
922
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
923
- * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
924
- * Cash Balance
925
- * Credit Card
926
- * Online Banking
927
- * Bank Transfer
955
+ * Weight(IP): 1
928
956
  *
929
- * Weight: 1
957
+ * Security Type: USER_DATA
958
+ *
959
+ * Notes:
960
+ * - If `beginTime` and `endTime` are not sent, recent 30-day data is returned.
961
+ * - `paymentMethod` is returned only when querying buy history (`transactionType=0`).
962
+ * - Supported payment methods: `Cash Balance`, `Credit Card`, `Online Banking`, `Bank Transfer`.
930
963
  *
931
964
  * @summary Get Fiat Payments History (USER_DATA)
932
965
  * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
933
966
  *
934
967
  * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
935
968
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
936
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
969
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-fiat-payments-history Binance API Documentation}
937
970
  */
938
971
  getFiatPaymentsHistory(requestParameters: GetFiatPaymentsHistoryRequest): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;
939
972
  /**
940
973
  * Get Order Detail
941
974
  *
942
- * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
975
+ * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your
976
+ * fiat service on our website.
977
+ *
978
+ * Weight(IP): 1
943
979
  *
944
- * Weight: 1
980
+ * Security Type: USER_DATA
945
981
  *
946
- * @summary Get Order Detail(USER_DATA)
982
+ * @summary Get Order Detail (USER_DATA)
947
983
  * @param {GetOrderDetailRequest} requestParameters Request parameters.
948
984
  *
949
985
  * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}
950
986
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
951
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}
987
+ * @see {@link https://developers.binance.com/en/docs/catalog/investment-and-services-fiat/api/rest-api/~#get-order-detail Binance API Documentation}
952
988
  */
953
989
  getOrderDetail(requestParameters: GetOrderDetailRequest): Promise<RestApiResponse<GetOrderDetailResponse>>;
954
990
  }
955
991
  declare namespace index_d_exports {
956
- export { AccountInfo, DepositRequest, DepositResponse, DepositResponseData, FiatApi, FiatApiInterface, FiatWithdrawRequest, FiatWithdrawResponse, GetFiatDepositWithdrawHistoryRequest, GetFiatDepositWithdrawHistoryResponse, GetFiatDepositWithdrawHistoryResponseDataInner, GetFiatPaymentsHistoryRequest, GetFiatPaymentsHistoryResponse, GetFiatPaymentsHistoryResponseDataInner, GetOrderDetailRequest, GetOrderDetailResponse, GetOrderDetailResponseData, RestAPI };
992
+ export { Api, ApiInterface, DepositApiPaymentMethodEnum, DepositRequest, DepositResponse, DepositResponseData, FiatWithdrawApiPaymentMethodEnum, FiatWithdrawRequest, FiatWithdrawRequestAccountInfo, FiatWithdrawResponse, GetFiatDepositWithdrawHistoryRequest, GetFiatDepositWithdrawHistoryResponse, GetFiatDepositWithdrawHistoryResponseDataInner, GetFiatPaymentsHistoryRequest, GetFiatPaymentsHistoryResponse, GetFiatPaymentsHistoryResponseDataInner, GetOrderDetailRequest, GetOrderDetailResponse, GetOrderDetailResponseData, RestAPI };
957
993
  }
958
994
  //#endregion
959
995
  //#region src/fiat.d.ts