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