@binance/fiat 5.0.1 → 6.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 +466 -8
- package/dist/index.d.ts +464 -6
- package/dist/index.js +198 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,114 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, FIAT_REST_
|
|
|
2
2
|
|
|
3
3
|
//#region rolldown:runtime
|
|
4
4
|
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/rest-api/types/account-info.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Binance Fiat REST API
|
|
9
|
+
*
|
|
10
|
+
* OpenAPI Specification for the Binance Fiat REST API
|
|
11
|
+
*
|
|
12
|
+
* The version of the OpenAPI document: 1.0.0
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
16
|
+
* https://openapi-generator.tech
|
|
17
|
+
* Do not edit the class manually.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface AccountInfo
|
|
23
|
+
*/
|
|
24
|
+
interface AccountInfo {
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AccountInfo
|
|
29
|
+
*/
|
|
30
|
+
accountNumber?: string;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/rest-api/types/deposit-response-data.d.ts
|
|
34
|
+
/**
|
|
35
|
+
* Binance Fiat REST API
|
|
36
|
+
*
|
|
37
|
+
* OpenAPI Specification for the Binance Fiat REST API
|
|
38
|
+
*
|
|
39
|
+
* The version of the OpenAPI document: 1.0.0
|
|
40
|
+
*
|
|
41
|
+
*
|
|
42
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
43
|
+
* https://openapi-generator.tech
|
|
44
|
+
* Do not edit the class manually.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @export
|
|
49
|
+
* @interface DepositResponseData
|
|
50
|
+
*/
|
|
51
|
+
interface DepositResponseData {
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof DepositResponseData
|
|
56
|
+
*/
|
|
57
|
+
orderId?: string;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/rest-api/types/deposit-response.d.ts
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @export
|
|
64
|
+
* @interface DepositResponse
|
|
65
|
+
*/
|
|
66
|
+
interface DepositResponse {
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof DepositResponse
|
|
71
|
+
*/
|
|
72
|
+
code?: string;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof DepositResponse
|
|
77
|
+
*/
|
|
78
|
+
message?: string;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {DepositResponseData}
|
|
82
|
+
* @memberof DepositResponse
|
|
83
|
+
*/
|
|
84
|
+
data?: DepositResponseData;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/rest-api/types/fiat-withdraw-response.d.ts
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @export
|
|
91
|
+
* @interface FiatWithdrawResponse
|
|
92
|
+
*/
|
|
93
|
+
interface FiatWithdrawResponse {
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {string}
|
|
97
|
+
* @memberof FiatWithdrawResponse
|
|
98
|
+
*/
|
|
99
|
+
code?: string;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @type {string}
|
|
103
|
+
* @memberof FiatWithdrawResponse
|
|
104
|
+
*/
|
|
105
|
+
message?: string;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* @type {DepositResponseData}
|
|
109
|
+
* @memberof FiatWithdrawResponse
|
|
110
|
+
*/
|
|
111
|
+
data?: DepositResponseData;
|
|
112
|
+
}
|
|
5
113
|
//#endregion
|
|
6
114
|
//#region src/rest-api/types/get-fiat-deposit-withdraw-history-response-data-inner.d.ts
|
|
7
115
|
/**
|
|
@@ -243,12 +351,144 @@ interface GetFiatPaymentsHistoryResponse {
|
|
|
243
351
|
success?: boolean;
|
|
244
352
|
}
|
|
245
353
|
//#endregion
|
|
354
|
+
//#region src/rest-api/types/get-order-detail-response-data.d.ts
|
|
355
|
+
/**
|
|
356
|
+
* Binance Fiat REST API
|
|
357
|
+
*
|
|
358
|
+
* OpenAPI Specification for the Binance Fiat REST API
|
|
359
|
+
*
|
|
360
|
+
* The version of the OpenAPI document: 1.0.0
|
|
361
|
+
*
|
|
362
|
+
*
|
|
363
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
364
|
+
* https://openapi-generator.tech
|
|
365
|
+
* Do not edit the class manually.
|
|
366
|
+
*/
|
|
367
|
+
/**
|
|
368
|
+
*
|
|
369
|
+
* @export
|
|
370
|
+
* @interface GetOrderDetailResponseData
|
|
371
|
+
*/
|
|
372
|
+
interface GetOrderDetailResponseData {
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @type {string}
|
|
376
|
+
* @memberof GetOrderDetailResponseData
|
|
377
|
+
*/
|
|
378
|
+
orderId?: string;
|
|
379
|
+
/**
|
|
380
|
+
*
|
|
381
|
+
* @type {string}
|
|
382
|
+
* @memberof GetOrderDetailResponseData
|
|
383
|
+
*/
|
|
384
|
+
orderStatus?: string;
|
|
385
|
+
/**
|
|
386
|
+
*
|
|
387
|
+
* @type {string}
|
|
388
|
+
* @memberof GetOrderDetailResponseData
|
|
389
|
+
*/
|
|
390
|
+
amount?: string;
|
|
391
|
+
/**
|
|
392
|
+
*
|
|
393
|
+
* @type {string}
|
|
394
|
+
* @memberof GetOrderDetailResponseData
|
|
395
|
+
*/
|
|
396
|
+
fee?: string;
|
|
397
|
+
/**
|
|
398
|
+
*
|
|
399
|
+
* @type {string}
|
|
400
|
+
* @memberof GetOrderDetailResponseData
|
|
401
|
+
*/
|
|
402
|
+
fiatCurrency?: string;
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
* @type {string}
|
|
406
|
+
* @memberof GetOrderDetailResponseData
|
|
407
|
+
*/
|
|
408
|
+
errorCode?: string;
|
|
409
|
+
/**
|
|
410
|
+
*
|
|
411
|
+
* @type {string}
|
|
412
|
+
* @memberof GetOrderDetailResponseData
|
|
413
|
+
*/
|
|
414
|
+
errorMessage?: string;
|
|
415
|
+
/**
|
|
416
|
+
*
|
|
417
|
+
* @type {object}
|
|
418
|
+
* @memberof GetOrderDetailResponseData
|
|
419
|
+
*/
|
|
420
|
+
ext?: object;
|
|
421
|
+
}
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region src/rest-api/types/get-order-detail-response.d.ts
|
|
424
|
+
/**
|
|
425
|
+
*
|
|
426
|
+
* @export
|
|
427
|
+
* @interface GetOrderDetailResponse
|
|
428
|
+
*/
|
|
429
|
+
interface GetOrderDetailResponse {
|
|
430
|
+
/**
|
|
431
|
+
*
|
|
432
|
+
* @type {string}
|
|
433
|
+
* @memberof GetOrderDetailResponse
|
|
434
|
+
*/
|
|
435
|
+
code?: string;
|
|
436
|
+
/**
|
|
437
|
+
*
|
|
438
|
+
* @type {string}
|
|
439
|
+
* @memberof GetOrderDetailResponse
|
|
440
|
+
*/
|
|
441
|
+
message?: string;
|
|
442
|
+
/**
|
|
443
|
+
*
|
|
444
|
+
* @type {GetOrderDetailResponseData}
|
|
445
|
+
* @memberof GetOrderDetailResponse
|
|
446
|
+
*/
|
|
447
|
+
data?: GetOrderDetailResponseData;
|
|
448
|
+
}
|
|
449
|
+
//#endregion
|
|
246
450
|
//#region src/rest-api/modules/fiat-api.d.ts
|
|
247
451
|
/**
|
|
248
452
|
* FiatApi - interface
|
|
249
453
|
* @interface FiatApi
|
|
250
454
|
*/
|
|
251
455
|
interface FiatApiInterface {
|
|
456
|
+
/**
|
|
457
|
+
* Submit deposit request, in this version, we only support BRL deposit via pix.
|
|
458
|
+
*
|
|
459
|
+
*
|
|
460
|
+
*
|
|
461
|
+
* For BRL deposit via pix, you need to place an order before making a transfer from your bank.
|
|
462
|
+
*
|
|
463
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
464
|
+
*
|
|
465
|
+
* Weight: 45000
|
|
466
|
+
*
|
|
467
|
+
* @summary Deposit(TRADE)
|
|
468
|
+
* @param {DepositRequest} requestParameters Request parameters.
|
|
469
|
+
*
|
|
470
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
471
|
+
* @memberof FiatApiInterface
|
|
472
|
+
*/
|
|
473
|
+
deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;
|
|
474
|
+
/**
|
|
475
|
+
* Submit withdraw request, in this version, we only support BRL withdrawal via bank_transfer.
|
|
476
|
+
*
|
|
477
|
+
* 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.
|
|
478
|
+
*
|
|
479
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
480
|
+
*
|
|
481
|
+
* you need to bind your bank account on web/app before using the corresponding account number
|
|
482
|
+
*
|
|
483
|
+
* Weight: 45000
|
|
484
|
+
*
|
|
485
|
+
* @summary Fiat Withdraw(WITHDRAW)
|
|
486
|
+
* @param {FiatWithdrawRequest} requestParameters Request parameters.
|
|
487
|
+
*
|
|
488
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
489
|
+
* @memberof FiatApiInterface
|
|
490
|
+
*/
|
|
491
|
+
fiatWithdraw(requestParameters: FiatWithdrawRequest): Promise<RestApiResponse<FiatWithdrawResponse>>;
|
|
252
492
|
/**
|
|
253
493
|
* Get Fiat Deposit/Withdraw History
|
|
254
494
|
*
|
|
@@ -282,6 +522,98 @@ interface FiatApiInterface {
|
|
|
282
522
|
* @memberof FiatApiInterface
|
|
283
523
|
*/
|
|
284
524
|
getFiatPaymentsHistory(requestParameters: GetFiatPaymentsHistoryRequest): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;
|
|
525
|
+
/**
|
|
526
|
+
* Get Order Detail
|
|
527
|
+
*
|
|
528
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
529
|
+
*
|
|
530
|
+
* Weight: 1
|
|
531
|
+
*
|
|
532
|
+
* @summary Get Order Detail(USER_DATA)
|
|
533
|
+
* @param {GetOrderDetailRequest} requestParameters Request parameters.
|
|
534
|
+
*
|
|
535
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
536
|
+
* @memberof FiatApiInterface
|
|
537
|
+
*/
|
|
538
|
+
getOrderDetail(requestParameters: GetOrderDetailRequest): Promise<RestApiResponse<GetOrderDetailResponse>>;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Request parameters for deposit operation in FiatApi.
|
|
542
|
+
* @interface DepositRequest
|
|
543
|
+
*/
|
|
544
|
+
interface DepositRequest {
|
|
545
|
+
/**
|
|
546
|
+
*
|
|
547
|
+
* @type {string}
|
|
548
|
+
* @memberof FiatApiDeposit
|
|
549
|
+
*/
|
|
550
|
+
readonly currency: string;
|
|
551
|
+
/**
|
|
552
|
+
*
|
|
553
|
+
* @type {string}
|
|
554
|
+
* @memberof FiatApiDeposit
|
|
555
|
+
*/
|
|
556
|
+
readonly apiPaymentMethod: string;
|
|
557
|
+
/**
|
|
558
|
+
*
|
|
559
|
+
* @type {number | bigint}
|
|
560
|
+
* @memberof FiatApiDeposit
|
|
561
|
+
*/
|
|
562
|
+
readonly amount: number | bigint;
|
|
563
|
+
/**
|
|
564
|
+
*
|
|
565
|
+
* @type {number | bigint}
|
|
566
|
+
* @memberof FiatApiDeposit
|
|
567
|
+
*/
|
|
568
|
+
readonly recvWindow?: number | bigint;
|
|
569
|
+
/**
|
|
570
|
+
*
|
|
571
|
+
* @type {object}
|
|
572
|
+
* @memberof FiatApiDeposit
|
|
573
|
+
*/
|
|
574
|
+
readonly ext?: object;
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Request parameters for fiatWithdraw operation in FiatApi.
|
|
578
|
+
* @interface FiatWithdrawRequest
|
|
579
|
+
*/
|
|
580
|
+
interface FiatWithdrawRequest {
|
|
581
|
+
/**
|
|
582
|
+
*
|
|
583
|
+
* @type {string}
|
|
584
|
+
* @memberof FiatApiFiatWithdraw
|
|
585
|
+
*/
|
|
586
|
+
readonly currency: string;
|
|
587
|
+
/**
|
|
588
|
+
*
|
|
589
|
+
* @type {string}
|
|
590
|
+
* @memberof FiatApiFiatWithdraw
|
|
591
|
+
*/
|
|
592
|
+
readonly apiPaymentMethod: string;
|
|
593
|
+
/**
|
|
594
|
+
*
|
|
595
|
+
* @type {number | bigint}
|
|
596
|
+
* @memberof FiatApiFiatWithdraw
|
|
597
|
+
*/
|
|
598
|
+
readonly amount: number | bigint;
|
|
599
|
+
/**
|
|
600
|
+
*
|
|
601
|
+
* @type {AccountInfo}
|
|
602
|
+
* @memberof FiatApiFiatWithdraw
|
|
603
|
+
*/
|
|
604
|
+
readonly accountInfo: AccountInfo;
|
|
605
|
+
/**
|
|
606
|
+
*
|
|
607
|
+
* @type {number | bigint}
|
|
608
|
+
* @memberof FiatApiFiatWithdraw
|
|
609
|
+
*/
|
|
610
|
+
readonly recvWindow?: number | bigint;
|
|
611
|
+
/**
|
|
612
|
+
*
|
|
613
|
+
* @type {object}
|
|
614
|
+
* @memberof FiatApiFiatWithdraw
|
|
615
|
+
*/
|
|
616
|
+
readonly ext?: object;
|
|
285
617
|
}
|
|
286
618
|
/**
|
|
287
619
|
* Request parameters for getFiatDepositWithdrawHistory operation in FiatApi.
|
|
@@ -367,6 +699,24 @@ interface GetFiatPaymentsHistoryRequest {
|
|
|
367
699
|
*/
|
|
368
700
|
readonly recvWindow?: number | bigint;
|
|
369
701
|
}
|
|
702
|
+
/**
|
|
703
|
+
* Request parameters for getOrderDetail operation in FiatApi.
|
|
704
|
+
* @interface GetOrderDetailRequest
|
|
705
|
+
*/
|
|
706
|
+
interface GetOrderDetailRequest {
|
|
707
|
+
/**
|
|
708
|
+
* order id retrieved from the api call of withdrawal
|
|
709
|
+
* @type {string}
|
|
710
|
+
* @memberof FiatApiGetOrderDetail
|
|
711
|
+
*/
|
|
712
|
+
readonly orderNo: string;
|
|
713
|
+
/**
|
|
714
|
+
*
|
|
715
|
+
* @type {number | bigint}
|
|
716
|
+
* @memberof FiatApiGetOrderDetail
|
|
717
|
+
*/
|
|
718
|
+
readonly recvWindow?: number | bigint;
|
|
719
|
+
}
|
|
370
720
|
/**
|
|
371
721
|
* FiatApi - object-oriented interface
|
|
372
722
|
* @class FiatApi
|
|
@@ -375,6 +725,44 @@ declare class FiatApi implements FiatApiInterface {
|
|
|
375
725
|
private readonly configuration;
|
|
376
726
|
private localVarAxiosParamCreator;
|
|
377
727
|
constructor(configuration: ConfigurationRestAPI);
|
|
728
|
+
/**
|
|
729
|
+
* Submit deposit request, in this version, we only support BRL deposit via pix.
|
|
730
|
+
*
|
|
731
|
+
*
|
|
732
|
+
*
|
|
733
|
+
* For BRL deposit via pix, you need to place an order before making a transfer from your bank.
|
|
734
|
+
*
|
|
735
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
736
|
+
*
|
|
737
|
+
* Weight: 45000
|
|
738
|
+
*
|
|
739
|
+
* @summary Deposit(TRADE)
|
|
740
|
+
* @param {DepositRequest} requestParameters Request parameters.
|
|
741
|
+
* @returns {Promise<RestApiResponse<DepositResponse>>}
|
|
742
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
743
|
+
* @memberof FiatApi
|
|
744
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}
|
|
745
|
+
*/
|
|
746
|
+
deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;
|
|
747
|
+
/**
|
|
748
|
+
* Submit withdraw request, in this version, we only support BRL withdrawal via bank_transfer.
|
|
749
|
+
*
|
|
750
|
+
* 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.
|
|
751
|
+
*
|
|
752
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
753
|
+
*
|
|
754
|
+
* you need to bind your bank account on web/app before using the corresponding account number
|
|
755
|
+
*
|
|
756
|
+
* Weight: 45000
|
|
757
|
+
*
|
|
758
|
+
* @summary Fiat Withdraw(WITHDRAW)
|
|
759
|
+
* @param {FiatWithdrawRequest} requestParameters Request parameters.
|
|
760
|
+
* @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}
|
|
761
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
762
|
+
* @memberof FiatApi
|
|
763
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}
|
|
764
|
+
*/
|
|
765
|
+
fiatWithdraw(requestParameters: FiatWithdrawRequest): Promise<RestApiResponse<FiatWithdrawResponse>>;
|
|
378
766
|
/**
|
|
379
767
|
* Get Fiat Deposit/Withdraw History
|
|
380
768
|
*
|
|
@@ -410,6 +798,21 @@ declare class FiatApi implements FiatApiInterface {
|
|
|
410
798
|
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
411
799
|
*/
|
|
412
800
|
getFiatPaymentsHistory(requestParameters: GetFiatPaymentsHistoryRequest): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;
|
|
801
|
+
/**
|
|
802
|
+
* Get Order Detail
|
|
803
|
+
*
|
|
804
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
805
|
+
*
|
|
806
|
+
* Weight: 1
|
|
807
|
+
*
|
|
808
|
+
* @summary Get Order Detail(USER_DATA)
|
|
809
|
+
* @param {GetOrderDetailRequest} requestParameters Request parameters.
|
|
810
|
+
* @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}
|
|
811
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
812
|
+
* @memberof FiatApi
|
|
813
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}
|
|
814
|
+
*/
|
|
815
|
+
getOrderDetail(requestParameters: GetOrderDetailRequest): Promise<RestApiResponse<GetOrderDetailResponse>>;
|
|
413
816
|
}
|
|
414
817
|
//#endregion
|
|
415
818
|
//#region src/rest-api/rest-api.d.ts
|
|
@@ -421,20 +824,60 @@ declare class RestAPI {
|
|
|
421
824
|
* Generic function to send a request.
|
|
422
825
|
* @param endpoint - The API endpoint to call.
|
|
423
826
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
424
|
-
* @param
|
|
827
|
+
* @param queryParams - Query parameters for the request.
|
|
828
|
+
* @param bodyParams - Body parameters for the request.
|
|
425
829
|
*
|
|
426
830
|
* @returns A promise resolving to the response data object.
|
|
427
831
|
*/
|
|
428
|
-
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
832
|
+
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
429
833
|
/**
|
|
430
834
|
* Generic function to send a signed request.
|
|
431
835
|
* @param endpoint - The API endpoint to call.
|
|
432
836
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
433
|
-
* @param
|
|
837
|
+
* @param queryParams - Query parameters for the request.
|
|
838
|
+
* @param bodyParams - Body parameters for the request.
|
|
434
839
|
*
|
|
435
840
|
* @returns A promise resolving to the response data object.
|
|
436
841
|
*/
|
|
437
|
-
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
842
|
+
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
843
|
+
/**
|
|
844
|
+
* Submit deposit request, in this version, we only support BRL deposit via pix.
|
|
845
|
+
*
|
|
846
|
+
*
|
|
847
|
+
*
|
|
848
|
+
* For BRL deposit via pix, you need to place an order before making a transfer from your bank.
|
|
849
|
+
*
|
|
850
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
851
|
+
*
|
|
852
|
+
* Weight: 45000
|
|
853
|
+
*
|
|
854
|
+
* @summary Deposit(TRADE)
|
|
855
|
+
* @param {DepositRequest} requestParameters Request parameters.
|
|
856
|
+
*
|
|
857
|
+
* @returns {Promise<RestApiResponse<DepositResponse>>}
|
|
858
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
859
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}
|
|
860
|
+
*/
|
|
861
|
+
deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;
|
|
862
|
+
/**
|
|
863
|
+
* Submit withdraw request, in this version, we only support BRL withdrawal via bank_transfer.
|
|
864
|
+
*
|
|
865
|
+
* 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.
|
|
866
|
+
*
|
|
867
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
868
|
+
*
|
|
869
|
+
* you need to bind your bank account on web/app before using the corresponding account number
|
|
870
|
+
*
|
|
871
|
+
* Weight: 45000
|
|
872
|
+
*
|
|
873
|
+
* @summary Fiat Withdraw(WITHDRAW)
|
|
874
|
+
* @param {FiatWithdrawRequest} requestParameters Request parameters.
|
|
875
|
+
*
|
|
876
|
+
* @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}
|
|
877
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
878
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}
|
|
879
|
+
*/
|
|
880
|
+
fiatWithdraw(requestParameters: FiatWithdrawRequest): Promise<RestApiResponse<FiatWithdrawResponse>>;
|
|
438
881
|
/**
|
|
439
882
|
* Get Fiat Deposit/Withdraw History
|
|
440
883
|
*
|
|
@@ -470,9 +913,24 @@ declare class RestAPI {
|
|
|
470
913
|
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
471
914
|
*/
|
|
472
915
|
getFiatPaymentsHistory(requestParameters: GetFiatPaymentsHistoryRequest): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;
|
|
916
|
+
/**
|
|
917
|
+
* Get Order Detail
|
|
918
|
+
*
|
|
919
|
+
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
920
|
+
*
|
|
921
|
+
* Weight: 1
|
|
922
|
+
*
|
|
923
|
+
* @summary Get Order Detail(USER_DATA)
|
|
924
|
+
* @param {GetOrderDetailRequest} requestParameters Request parameters.
|
|
925
|
+
*
|
|
926
|
+
* @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}
|
|
927
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
928
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}
|
|
929
|
+
*/
|
|
930
|
+
getOrderDetail(requestParameters: GetOrderDetailRequest): Promise<RestApiResponse<GetOrderDetailResponse>>;
|
|
473
931
|
}
|
|
474
932
|
declare namespace index_d_exports {
|
|
475
|
-
export { FiatApi, FiatApiInterface, GetFiatDepositWithdrawHistoryRequest, GetFiatDepositWithdrawHistoryResponse, GetFiatDepositWithdrawHistoryResponseDataInner, GetFiatPaymentsHistoryRequest, GetFiatPaymentsHistoryResponse, GetFiatPaymentsHistoryResponseDataInner, RestAPI };
|
|
933
|
+
export { AccountInfo, DepositRequest, DepositResponse, DepositResponseData, FiatApi, FiatApiInterface, FiatWithdrawRequest, FiatWithdrawResponse, GetFiatDepositWithdrawHistoryRequest, GetFiatDepositWithdrawHistoryResponse, GetFiatDepositWithdrawHistoryResponseDataInner, GetFiatPaymentsHistoryRequest, GetFiatPaymentsHistoryResponse, GetFiatPaymentsHistoryResponseDataInner, GetOrderDetailRequest, GetOrderDetailResponse, GetOrderDetailResponseData, RestAPI };
|
|
476
934
|
}
|
|
477
935
|
//#endregion
|
|
478
936
|
//#region src/fiat.d.ts
|
|
@@ -484,5 +942,5 @@ declare class Fiat {
|
|
|
484
942
|
constructor(config: ConfigurationFiat);
|
|
485
943
|
}
|
|
486
944
|
//#endregion
|
|
487
|
-
export { BadRequestError, ConfigurationFiat, ConnectorClientError, FIAT_REST_API_PROD_URL, Fiat, index_d_exports as FiatRestAPI, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
945
|
+
export { BadRequestError, type ConfigurationFiat, ConnectorClientError, FIAT_REST_API_PROD_URL, Fiat, index_d_exports as FiatRestAPI, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
488
946
|
//# sourceMappingURL=index.d.ts.map
|