@binance/convert 5.0.13 → 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 +245 -146
- package/dist/index.d.ts +245 -146
- package/dist/index.js +160 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +160 -75
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -3,9 +3,9 @@ import { BadRequestError, CONVERT_REST_API_PROD_URL, ConfigurationRestAPI, Conne
|
|
|
3
3
|
//#region src/rest-api/types/accept-quote-response.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Convert REST API
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
9
9
|
*
|
|
10
10
|
* The version of the OpenAPI document: 1.0.0
|
|
11
11
|
*
|
|
@@ -33,7 +33,7 @@ interface AcceptQuoteResponse {
|
|
|
33
33
|
*/
|
|
34
34
|
createTime?: number | bigint;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Order processing status
|
|
37
37
|
* @type {string}
|
|
38
38
|
* @memberof AcceptQuoteResponse
|
|
39
39
|
*/
|
|
@@ -42,9 +42,9 @@ interface AcceptQuoteResponse {
|
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/rest-api/types/cancel-limit-order-response.d.ts
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Convert REST API
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
48
48
|
*
|
|
49
49
|
* The version of the OpenAPI document: 1.0.0
|
|
50
50
|
*
|
|
@@ -75,9 +75,9 @@ interface CancelLimitOrderResponse {
|
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/rest-api/types/get-convert-trade-history-response-list-inner.d.ts
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Convert REST API
|
|
79
79
|
*
|
|
80
|
-
*
|
|
80
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
81
81
|
*
|
|
82
82
|
* The version of the OpenAPI document: 1.0.0
|
|
83
83
|
*
|
|
@@ -105,43 +105,43 @@ interface GetConvertTradeHistoryResponseListInner {
|
|
|
105
105
|
*/
|
|
106
106
|
orderId?: number | bigint;
|
|
107
107
|
/**
|
|
108
|
-
*
|
|
108
|
+
* Order status
|
|
109
109
|
* @type {string}
|
|
110
110
|
* @memberof GetConvertTradeHistoryResponseListInner
|
|
111
111
|
*/
|
|
112
112
|
orderStatus?: string;
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* Source asset
|
|
115
115
|
* @type {string}
|
|
116
116
|
* @memberof GetConvertTradeHistoryResponseListInner
|
|
117
117
|
*/
|
|
118
118
|
fromAsset?: string;
|
|
119
119
|
/**
|
|
120
|
-
*
|
|
120
|
+
* Source amount
|
|
121
121
|
* @type {string}
|
|
122
122
|
* @memberof GetConvertTradeHistoryResponseListInner
|
|
123
123
|
*/
|
|
124
124
|
fromAmount?: string;
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
126
|
+
* Destination asset
|
|
127
127
|
* @type {string}
|
|
128
128
|
* @memberof GetConvertTradeHistoryResponseListInner
|
|
129
129
|
*/
|
|
130
130
|
toAsset?: string;
|
|
131
131
|
/**
|
|
132
|
-
*
|
|
132
|
+
* Destination amount
|
|
133
133
|
* @type {string}
|
|
134
134
|
* @memberof GetConvertTradeHistoryResponseListInner
|
|
135
135
|
*/
|
|
136
136
|
toAmount?: string;
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
138
|
+
* Price ratio
|
|
139
139
|
* @type {string}
|
|
140
140
|
* @memberof GetConvertTradeHistoryResponseListInner
|
|
141
141
|
*/
|
|
142
142
|
ratio?: string;
|
|
143
143
|
/**
|
|
144
|
-
*
|
|
144
|
+
* Inverse price ratio
|
|
145
145
|
* @type {string}
|
|
146
146
|
* @memberof GetConvertTradeHistoryResponseListInner
|
|
147
147
|
*/
|
|
@@ -195,9 +195,9 @@ interface GetConvertTradeHistoryResponse {
|
|
|
195
195
|
//#endregion
|
|
196
196
|
//#region src/rest-api/types/list-all-convert-pairs-response-inner.d.ts
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
198
|
+
* Convert REST API
|
|
199
199
|
*
|
|
200
|
-
*
|
|
200
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
201
201
|
*
|
|
202
202
|
* The version of the OpenAPI document: 1.0.0
|
|
203
203
|
*
|
|
@@ -243,7 +243,7 @@ interface ListAllConvertPairsResponseInner {
|
|
|
243
243
|
*/
|
|
244
244
|
toAssetMinAmount?: string;
|
|
245
245
|
/**
|
|
246
|
-
*
|
|
246
|
+
* 9E+24 signals that this symbol has a very large upper limit close to infinity
|
|
247
247
|
* @type {string}
|
|
248
248
|
* @memberof ListAllConvertPairsResponseInner
|
|
249
249
|
*/
|
|
@@ -260,9 +260,9 @@ interface ListAllConvertPairsResponse extends Array<ListAllConvertPairsResponseI
|
|
|
260
260
|
//#endregion
|
|
261
261
|
//#region src/rest-api/types/order-status-response.d.ts
|
|
262
262
|
/**
|
|
263
|
-
*
|
|
263
|
+
* Convert REST API
|
|
264
264
|
*
|
|
265
|
-
*
|
|
265
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
266
266
|
*
|
|
267
267
|
* The version of the OpenAPI document: 1.0.0
|
|
268
268
|
*
|
|
@@ -335,9 +335,9 @@ interface OrderStatusResponse {
|
|
|
335
335
|
//#endregion
|
|
336
336
|
//#region src/rest-api/types/place-limit-order-response.d.ts
|
|
337
337
|
/**
|
|
338
|
-
*
|
|
338
|
+
* Convert REST API
|
|
339
339
|
*
|
|
340
|
-
*
|
|
340
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
341
341
|
*
|
|
342
342
|
* The version of the OpenAPI document: 1.0.0
|
|
343
343
|
*
|
|
@@ -368,9 +368,9 @@ interface PlaceLimitOrderResponse {
|
|
|
368
368
|
//#endregion
|
|
369
369
|
//#region src/rest-api/types/query-limit-open-orders-response-list-inner.d.ts
|
|
370
370
|
/**
|
|
371
|
-
*
|
|
371
|
+
* Convert REST API
|
|
372
372
|
*
|
|
373
|
-
*
|
|
373
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
374
374
|
*
|
|
375
375
|
* The version of the OpenAPI document: 1.0.0
|
|
376
376
|
*
|
|
@@ -470,9 +470,9 @@ interface QueryLimitOpenOrdersResponse {
|
|
|
470
470
|
//#endregion
|
|
471
471
|
//#region src/rest-api/types/query-order-quantity-precision-per-asset-response-inner.d.ts
|
|
472
472
|
/**
|
|
473
|
-
*
|
|
473
|
+
* Convert REST API
|
|
474
474
|
*
|
|
475
|
-
*
|
|
475
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
476
476
|
*
|
|
477
477
|
* The version of the OpenAPI document: 1.0.0
|
|
478
478
|
*
|
|
@@ -511,9 +511,9 @@ interface QueryOrderQuantityPrecisionPerAssetResponse extends Array<QueryOrderQu
|
|
|
511
511
|
//#endregion
|
|
512
512
|
//#region src/rest-api/types/send-quote-request-response.d.ts
|
|
513
513
|
/**
|
|
514
|
-
*
|
|
514
|
+
* Convert REST API
|
|
515
515
|
*
|
|
516
|
-
*
|
|
516
|
+
* Request quotes and execute cryptocurrency conversions via the Convert REST API.
|
|
517
517
|
*
|
|
518
518
|
* The version of the OpenAPI document: 1.0.0
|
|
519
519
|
*
|
|
@@ -573,12 +573,14 @@ interface SendQuoteRequestResponse {
|
|
|
573
573
|
*/
|
|
574
574
|
interface MarketDataApiInterface {
|
|
575
575
|
/**
|
|
576
|
-
* Query for all convertible token pairs and the tokens’ respective
|
|
576
|
+
* Query for all convertible token pairs and the tokens’ respective
|
|
577
|
+
* upper/lower limits
|
|
577
578
|
*
|
|
578
|
-
*
|
|
579
|
-
* If not defined for both fromAsset and toAsset, only partial token pairs will be returned
|
|
579
|
+
* Weight(IP): 3000
|
|
580
580
|
*
|
|
581
|
-
*
|
|
581
|
+
* Notes:
|
|
582
|
+
* - User needs to supply either or both input parameters.
|
|
583
|
+
* - If only one of `fromAsset` and `toAsset` is provided, only partial token pairs are returned.
|
|
582
584
|
*
|
|
583
585
|
* @summary List All Convert Pairs
|
|
584
586
|
* @param {ListAllConvertPairsRequest} requestParameters Request parameters.
|
|
@@ -590,9 +592,11 @@ interface MarketDataApiInterface {
|
|
|
590
592
|
/**
|
|
591
593
|
* Query for supported asset’s precision information
|
|
592
594
|
*
|
|
593
|
-
* Weight: 100
|
|
595
|
+
* Weight(IP): 100
|
|
594
596
|
*
|
|
595
|
-
*
|
|
597
|
+
* Security Type: USER_DATA
|
|
598
|
+
*
|
|
599
|
+
* @summary Query order quantity precision per asset (USER_DATA)
|
|
596
600
|
* @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.
|
|
597
601
|
*
|
|
598
602
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -624,7 +628,7 @@ interface ListAllConvertPairsRequest {
|
|
|
624
628
|
*/
|
|
625
629
|
interface QueryOrderQuantityPrecisionPerAssetRequest {
|
|
626
630
|
/**
|
|
627
|
-
*
|
|
631
|
+
* Request validity window in milliseconds
|
|
628
632
|
* @type {number | bigint}
|
|
629
633
|
* @memberof MarketDataApiQueryOrderQuantityPrecisionPerAsset
|
|
630
634
|
*/
|
|
@@ -639,32 +643,36 @@ declare class MarketDataApi implements MarketDataApiInterface {
|
|
|
639
643
|
private localVarAxiosParamCreator;
|
|
640
644
|
constructor(configuration: ConfigurationRestAPI);
|
|
641
645
|
/**
|
|
642
|
-
* Query for all convertible token pairs and the tokens’ respective
|
|
646
|
+
* Query for all convertible token pairs and the tokens’ respective
|
|
647
|
+
* upper/lower limits
|
|
643
648
|
*
|
|
644
|
-
*
|
|
645
|
-
* If not defined for both fromAsset and toAsset, only partial token pairs will be returned
|
|
649
|
+
* Weight(IP): 3000
|
|
646
650
|
*
|
|
647
|
-
*
|
|
651
|
+
* Notes:
|
|
652
|
+
* - User needs to supply either or both input parameters.
|
|
653
|
+
* - If only one of `fromAsset` and `toAsset` is provided, only partial token pairs are returned.
|
|
648
654
|
*
|
|
649
655
|
* @summary List All Convert Pairs
|
|
650
656
|
* @param {ListAllConvertPairsRequest} requestParameters Request parameters.
|
|
651
657
|
* @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}
|
|
652
658
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
653
659
|
* @memberof MarketDataApi
|
|
654
|
-
* @see {@link https://developers.binance.com/docs/convert/market-data
|
|
660
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#list-all-convert-pairs Binance API Documentation}
|
|
655
661
|
*/
|
|
656
662
|
listAllConvertPairs(requestParameters?: ListAllConvertPairsRequest): Promise<RestApiResponse<ListAllConvertPairsResponse>>;
|
|
657
663
|
/**
|
|
658
664
|
* Query for supported asset’s precision information
|
|
659
665
|
*
|
|
660
|
-
* Weight: 100
|
|
666
|
+
* Weight(IP): 100
|
|
667
|
+
*
|
|
668
|
+
* Security Type: USER_DATA
|
|
661
669
|
*
|
|
662
|
-
* @summary Query order quantity precision per asset(USER_DATA)
|
|
670
|
+
* @summary Query order quantity precision per asset (USER_DATA)
|
|
663
671
|
* @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.
|
|
664
672
|
* @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}
|
|
665
673
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
666
674
|
* @memberof MarketDataApi
|
|
667
|
-
* @see {@link https://developers.binance.com/docs/convert/market-data
|
|
675
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#query-order-quantity-precision-per-asset Binance API Documentation}
|
|
668
676
|
*/
|
|
669
677
|
queryOrderQuantityPrecisionPerAsset(requestParameters?: QueryOrderQuantityPrecisionPerAssetRequest): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>;
|
|
670
678
|
}
|
|
@@ -678,7 +686,9 @@ interface TradeApiInterface {
|
|
|
678
686
|
/**
|
|
679
687
|
* Accept the offered quote by quote ID.
|
|
680
688
|
*
|
|
681
|
-
* Weight: 500
|
|
689
|
+
* Weight(UID): 500
|
|
690
|
+
*
|
|
691
|
+
* Security Type: TRADE
|
|
682
692
|
*
|
|
683
693
|
* @summary Accept Quote (TRADE)
|
|
684
694
|
* @param {AcceptQuoteRequest} requestParameters Request parameters.
|
|
@@ -690,9 +700,11 @@ interface TradeApiInterface {
|
|
|
690
700
|
/**
|
|
691
701
|
* Enable users to cancel a limit order
|
|
692
702
|
*
|
|
693
|
-
* Weight: 200
|
|
703
|
+
* Weight(UID): 200
|
|
694
704
|
*
|
|
695
|
-
*
|
|
705
|
+
* Security Type: TRADE
|
|
706
|
+
*
|
|
707
|
+
* @summary Cancel limit order (TRADE)
|
|
696
708
|
* @param {CancelLimitOrderRequest} requestParameters Request parameters.
|
|
697
709
|
*
|
|
698
710
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -702,11 +714,14 @@ interface TradeApiInterface {
|
|
|
702
714
|
/**
|
|
703
715
|
* Get Convert Trade History
|
|
704
716
|
*
|
|
705
|
-
*
|
|
717
|
+
* Weight(UID): 3000
|
|
718
|
+
*
|
|
719
|
+
* Security Type: USER_DATA
|
|
706
720
|
*
|
|
707
|
-
*
|
|
721
|
+
* Notes:
|
|
722
|
+
* - The max interval between `startTime` and `endTime` is 30 days.
|
|
708
723
|
*
|
|
709
|
-
* @summary Get Convert Trade History(USER_DATA)
|
|
724
|
+
* @summary Get Convert Trade History (USER_DATA)
|
|
710
725
|
* @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.
|
|
711
726
|
*
|
|
712
727
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -716,9 +731,11 @@ interface TradeApiInterface {
|
|
|
716
731
|
/**
|
|
717
732
|
* Query order status by order ID.
|
|
718
733
|
*
|
|
719
|
-
* Weight: 100
|
|
734
|
+
* Weight(UID): 100
|
|
735
|
+
*
|
|
736
|
+
* Security Type: USER_DATA
|
|
720
737
|
*
|
|
721
|
-
* @summary Order status(USER_DATA)
|
|
738
|
+
* @summary Order status (USER_DATA)
|
|
722
739
|
* @param {OrderStatusRequest} requestParameters Request parameters.
|
|
723
740
|
*
|
|
724
741
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -728,13 +745,16 @@ interface TradeApiInterface {
|
|
|
728
745
|
/**
|
|
729
746
|
* Enable users to place a limit order
|
|
730
747
|
*
|
|
731
|
-
*
|
|
732
|
-
* Limit price is defined from `baseAsset` to `quoteAsset`.
|
|
733
|
-
* Either `baseAmount` or `quoteAmount` is used.
|
|
748
|
+
* Weight(UID): 500
|
|
734
749
|
*
|
|
735
|
-
*
|
|
750
|
+
* Security Type: TRADE
|
|
736
751
|
*
|
|
737
|
-
*
|
|
752
|
+
* Notes:
|
|
753
|
+
* - `baseAsset` and `quoteAsset` can be determined via the `exchangeInfo` endpoint.
|
|
754
|
+
* - Limit price is defined from `baseAsset` to `quoteAsset`.
|
|
755
|
+
* - Exactly one of `baseAmount` or `quoteAmount` should be sent.
|
|
756
|
+
*
|
|
757
|
+
* @summary Place limit order (TRADE)
|
|
738
758
|
* @param {PlaceLimitOrderRequest} requestParameters Request parameters.
|
|
739
759
|
*
|
|
740
760
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -742,9 +762,11 @@ interface TradeApiInterface {
|
|
|
742
762
|
*/
|
|
743
763
|
placeLimitOrder(requestParameters: PlaceLimitOrderRequest): Promise<RestApiResponse<PlaceLimitOrderResponse>>;
|
|
744
764
|
/**
|
|
745
|
-
*
|
|
765
|
+
* Query current open limit orders
|
|
766
|
+
*
|
|
767
|
+
* Weight(UID): 3000
|
|
746
768
|
*
|
|
747
|
-
*
|
|
769
|
+
* Security Type: USER_DATA
|
|
748
770
|
*
|
|
749
771
|
* @summary Query limit open orders (USER_DATA)
|
|
750
772
|
* @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.
|
|
@@ -756,12 +778,15 @@ interface TradeApiInterface {
|
|
|
756
778
|
/**
|
|
757
779
|
* Request a quote for the requested token pairs
|
|
758
780
|
*
|
|
759
|
-
*
|
|
760
|
-
* `quoteId` will be returned only if you have enough funds to convert
|
|
781
|
+
* Weight(UID): 200
|
|
761
782
|
*
|
|
762
|
-
*
|
|
783
|
+
* Security Type: TRADE
|
|
763
784
|
*
|
|
764
|
-
*
|
|
785
|
+
* Notes:
|
|
786
|
+
* - Either `fromAmount` or `toAmount` should be sent.
|
|
787
|
+
* - `quoteId` is returned only if you have enough funds to convert.
|
|
788
|
+
*
|
|
789
|
+
* @summary Send Quote Request (TRADE)
|
|
765
790
|
* @param {SendQuoteRequestRequest} requestParameters Request parameters.
|
|
766
791
|
*
|
|
767
792
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -781,7 +806,7 @@ interface AcceptQuoteRequest {
|
|
|
781
806
|
*/
|
|
782
807
|
readonly quoteId: string;
|
|
783
808
|
/**
|
|
784
|
-
*
|
|
809
|
+
* Request validity window in milliseconds
|
|
785
810
|
* @type {number | bigint}
|
|
786
811
|
* @memberof TradeApiAcceptQuote
|
|
787
812
|
*/
|
|
@@ -799,7 +824,7 @@ interface CancelLimitOrderRequest {
|
|
|
799
824
|
*/
|
|
800
825
|
readonly orderId: number | bigint;
|
|
801
826
|
/**
|
|
802
|
-
*
|
|
827
|
+
* Request validity window in milliseconds
|
|
803
828
|
* @type {number | bigint}
|
|
804
829
|
* @memberof TradeApiCancelLimitOrder
|
|
805
830
|
*/
|
|
@@ -823,13 +848,13 @@ interface GetConvertTradeHistoryRequest {
|
|
|
823
848
|
*/
|
|
824
849
|
readonly endTime: number | bigint;
|
|
825
850
|
/**
|
|
826
|
-
*
|
|
851
|
+
* Number of records to return
|
|
827
852
|
* @type {number | bigint}
|
|
828
853
|
* @memberof TradeApiGetConvertTradeHistory
|
|
829
854
|
*/
|
|
830
855
|
readonly limit?: number | bigint;
|
|
831
856
|
/**
|
|
832
|
-
*
|
|
857
|
+
* Request validity window in milliseconds
|
|
833
858
|
* @type {number | bigint}
|
|
834
859
|
* @memberof TradeApiGetConvertTradeHistory
|
|
835
860
|
*/
|
|
@@ -859,7 +884,8 @@ interface OrderStatusRequest {
|
|
|
859
884
|
*/
|
|
860
885
|
interface PlaceLimitOrderRequest {
|
|
861
886
|
/**
|
|
862
|
-
* base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check
|
|
887
|
+
* base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check
|
|
888
|
+
* which one is baseAsset )
|
|
863
889
|
* @type {string}
|
|
864
890
|
* @memberof TradeApiPlaceLimitOrder
|
|
865
891
|
*/
|
|
@@ -878,36 +904,37 @@ interface PlaceLimitOrderRequest {
|
|
|
878
904
|
readonly limitPrice: number;
|
|
879
905
|
/**
|
|
880
906
|
* `BUY` or `SELL`
|
|
881
|
-
* @type {
|
|
907
|
+
* @type {'BUY' | 'SELL'}
|
|
882
908
|
* @memberof TradeApiPlaceLimitOrder
|
|
883
909
|
*/
|
|
884
|
-
readonly side:
|
|
910
|
+
readonly side: PlaceLimitOrderSideEnum;
|
|
885
911
|
/**
|
|
886
|
-
* 1_D, 3_D, 7_D, 30_D
|
|
887
|
-
* @type {
|
|
912
|
+
* Order expiry duration. 1_D, 3_D, 7_D, 30_D (D means day)
|
|
913
|
+
* @type {'1_D' | '3_D' | '7_D' | '30_D'}
|
|
888
914
|
* @memberof TradeApiPlaceLimitOrder
|
|
889
915
|
*/
|
|
890
|
-
readonly expiredType:
|
|
916
|
+
readonly expiredType: PlaceLimitOrderExpiredTypeEnum;
|
|
891
917
|
/**
|
|
892
|
-
* Base asset amount.
|
|
918
|
+
* Base asset amount. (One of `baseAmount` or `quoteAmount` is required)
|
|
893
919
|
* @type {number}
|
|
894
920
|
* @memberof TradeApiPlaceLimitOrder
|
|
895
921
|
*/
|
|
896
922
|
readonly baseAmount?: number;
|
|
897
923
|
/**
|
|
898
|
-
* Quote asset amount.
|
|
924
|
+
* Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)
|
|
899
925
|
* @type {number}
|
|
900
926
|
* @memberof TradeApiPlaceLimitOrder
|
|
901
927
|
*/
|
|
902
928
|
readonly quoteAmount?: number;
|
|
903
929
|
/**
|
|
904
|
-
*
|
|
905
|
-
*
|
|
930
|
+
* Wallet to use for payment. Supported values: `SPOT`, `FUNDING`, `EARN`.
|
|
931
|
+
* Combined wallets also supported: `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN`, `SPOT_EARN`. Default is `SPOT`.
|
|
932
|
+
* @type {'SPOT' | 'FUNDING' | 'EARN' | 'SPOT_FUNDING' | 'FUNDING_EARN' | 'SPOT_FUNDING_EARN' | 'SPOT_EARN'}
|
|
906
933
|
* @memberof TradeApiPlaceLimitOrder
|
|
907
934
|
*/
|
|
908
|
-
readonly walletType?:
|
|
935
|
+
readonly walletType?: PlaceLimitOrderWalletTypeEnum;
|
|
909
936
|
/**
|
|
910
|
-
*
|
|
937
|
+
* Request validity window in milliseconds
|
|
911
938
|
* @type {number | bigint}
|
|
912
939
|
* @memberof TradeApiPlaceLimitOrder
|
|
913
940
|
*/
|
|
@@ -919,7 +946,7 @@ interface PlaceLimitOrderRequest {
|
|
|
919
946
|
*/
|
|
920
947
|
interface QueryLimitOpenOrdersRequest {
|
|
921
948
|
/**
|
|
922
|
-
*
|
|
949
|
+
* Request validity window in milliseconds
|
|
923
950
|
* @type {number | bigint}
|
|
924
951
|
* @memberof TradeApiQueryLimitOpenOrders
|
|
925
952
|
*/
|
|
@@ -955,19 +982,20 @@ interface SendQuoteRequestRequest {
|
|
|
955
982
|
*/
|
|
956
983
|
readonly toAmount?: number;
|
|
957
984
|
/**
|
|
958
|
-
*
|
|
959
|
-
*
|
|
985
|
+
* Wallet to use for payment. Supported values: `SPOT`, `FUNDING`, `EARN`.
|
|
986
|
+
* Combined wallets also supported: `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN`, `SPOT_EARN`. Default is `SPOT`.
|
|
987
|
+
* @type {'SPOT' | 'FUNDING' | 'EARN' | 'SPOT_FUNDING' | 'FUNDING_EARN' | 'SPOT_FUNDING_EARN' | 'SPOT_EARN'}
|
|
960
988
|
* @memberof TradeApiSendQuoteRequest
|
|
961
989
|
*/
|
|
962
|
-
readonly walletType?:
|
|
990
|
+
readonly walletType?: SendQuoteRequestWalletTypeEnum;
|
|
963
991
|
/**
|
|
964
|
-
* 10s, 30s, 1m
|
|
965
|
-
* @type {
|
|
992
|
+
* Quote valid duration. Supported values: 10s, 30s, 1m. Default is 10s.
|
|
993
|
+
* @type {'10s' | '30s' | '1m'}
|
|
966
994
|
* @memberof TradeApiSendQuoteRequest
|
|
967
995
|
*/
|
|
968
|
-
readonly validTime?:
|
|
996
|
+
readonly validTime?: SendQuoteRequestValidTimeEnum;
|
|
969
997
|
/**
|
|
970
|
-
*
|
|
998
|
+
* Request validity window in milliseconds
|
|
971
999
|
* @type {number | bigint}
|
|
972
1000
|
* @memberof TradeApiSendQuoteRequest
|
|
973
1001
|
*/
|
|
@@ -984,104 +1012,154 @@ declare class TradeApi implements TradeApiInterface {
|
|
|
984
1012
|
/**
|
|
985
1013
|
* Accept the offered quote by quote ID.
|
|
986
1014
|
*
|
|
987
|
-
* Weight: 500
|
|
1015
|
+
* Weight(UID): 500
|
|
1016
|
+
*
|
|
1017
|
+
* Security Type: TRADE
|
|
988
1018
|
*
|
|
989
1019
|
* @summary Accept Quote (TRADE)
|
|
990
1020
|
* @param {AcceptQuoteRequest} requestParameters Request parameters.
|
|
991
1021
|
* @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}
|
|
992
1022
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
993
1023
|
* @memberof TradeApi
|
|
994
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1024
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#accept-quote Binance API Documentation}
|
|
995
1025
|
*/
|
|
996
1026
|
acceptQuote(requestParameters: AcceptQuoteRequest): Promise<RestApiResponse<AcceptQuoteResponse>>;
|
|
997
1027
|
/**
|
|
998
1028
|
* Enable users to cancel a limit order
|
|
999
1029
|
*
|
|
1000
|
-
* Weight: 200
|
|
1030
|
+
* Weight(UID): 200
|
|
1031
|
+
*
|
|
1032
|
+
* Security Type: TRADE
|
|
1001
1033
|
*
|
|
1002
|
-
* @summary Cancel limit order (
|
|
1034
|
+
* @summary Cancel limit order (TRADE)
|
|
1003
1035
|
* @param {CancelLimitOrderRequest} requestParameters Request parameters.
|
|
1004
1036
|
* @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}
|
|
1005
1037
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1006
1038
|
* @memberof TradeApi
|
|
1007
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1039
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#cancel-limit-order Binance API Documentation}
|
|
1008
1040
|
*/
|
|
1009
1041
|
cancelLimitOrder(requestParameters: CancelLimitOrderRequest): Promise<RestApiResponse<CancelLimitOrderResponse>>;
|
|
1010
1042
|
/**
|
|
1011
1043
|
* Get Convert Trade History
|
|
1012
1044
|
*
|
|
1013
|
-
*
|
|
1045
|
+
* Weight(UID): 3000
|
|
1014
1046
|
*
|
|
1015
|
-
*
|
|
1047
|
+
* Security Type: USER_DATA
|
|
1016
1048
|
*
|
|
1017
|
-
*
|
|
1049
|
+
* Notes:
|
|
1050
|
+
* - The max interval between `startTime` and `endTime` is 30 days.
|
|
1051
|
+
*
|
|
1052
|
+
* @summary Get Convert Trade History (USER_DATA)
|
|
1018
1053
|
* @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.
|
|
1019
1054
|
* @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}
|
|
1020
1055
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1021
1056
|
* @memberof TradeApi
|
|
1022
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1057
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#get-convert-trade-history Binance API Documentation}
|
|
1023
1058
|
*/
|
|
1024
1059
|
getConvertTradeHistory(requestParameters: GetConvertTradeHistoryRequest): Promise<RestApiResponse<GetConvertTradeHistoryResponse>>;
|
|
1025
1060
|
/**
|
|
1026
1061
|
* Query order status by order ID.
|
|
1027
1062
|
*
|
|
1028
|
-
* Weight: 100
|
|
1063
|
+
* Weight(UID): 100
|
|
1064
|
+
*
|
|
1065
|
+
* Security Type: USER_DATA
|
|
1029
1066
|
*
|
|
1030
|
-
* @summary Order status(USER_DATA)
|
|
1067
|
+
* @summary Order status (USER_DATA)
|
|
1031
1068
|
* @param {OrderStatusRequest} requestParameters Request parameters.
|
|
1032
1069
|
* @returns {Promise<RestApiResponse<OrderStatusResponse>>}
|
|
1033
1070
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1034
1071
|
* @memberof TradeApi
|
|
1035
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1072
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#order-status Binance API Documentation}
|
|
1036
1073
|
*/
|
|
1037
1074
|
orderStatus(requestParameters?: OrderStatusRequest): Promise<RestApiResponse<OrderStatusResponse>>;
|
|
1038
1075
|
/**
|
|
1039
1076
|
* Enable users to place a limit order
|
|
1040
1077
|
*
|
|
1041
|
-
*
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1078
|
+
* Weight(UID): 500
|
|
1079
|
+
*
|
|
1080
|
+
* Security Type: TRADE
|
|
1044
1081
|
*
|
|
1045
|
-
*
|
|
1082
|
+
* Notes:
|
|
1083
|
+
* - `baseAsset` and `quoteAsset` can be determined via the `exchangeInfo` endpoint.
|
|
1084
|
+
* - Limit price is defined from `baseAsset` to `quoteAsset`.
|
|
1085
|
+
* - Exactly one of `baseAmount` or `quoteAmount` should be sent.
|
|
1046
1086
|
*
|
|
1047
|
-
* @summary Place limit order (
|
|
1087
|
+
* @summary Place limit order (TRADE)
|
|
1048
1088
|
* @param {PlaceLimitOrderRequest} requestParameters Request parameters.
|
|
1049
1089
|
* @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}
|
|
1050
1090
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1051
1091
|
* @memberof TradeApi
|
|
1052
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1092
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#place-limit-order Binance API Documentation}
|
|
1053
1093
|
*/
|
|
1054
1094
|
placeLimitOrder(requestParameters: PlaceLimitOrderRequest): Promise<RestApiResponse<PlaceLimitOrderResponse>>;
|
|
1055
1095
|
/**
|
|
1056
|
-
*
|
|
1096
|
+
* Query current open limit orders
|
|
1097
|
+
*
|
|
1098
|
+
* Weight(UID): 3000
|
|
1057
1099
|
*
|
|
1058
|
-
*
|
|
1100
|
+
* Security Type: USER_DATA
|
|
1059
1101
|
*
|
|
1060
1102
|
* @summary Query limit open orders (USER_DATA)
|
|
1061
1103
|
* @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.
|
|
1062
1104
|
* @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}
|
|
1063
1105
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1064
1106
|
* @memberof TradeApi
|
|
1065
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1107
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#query-limit-open-orders Binance API Documentation}
|
|
1066
1108
|
*/
|
|
1067
1109
|
queryLimitOpenOrders(requestParameters?: QueryLimitOpenOrdersRequest): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>;
|
|
1068
1110
|
/**
|
|
1069
1111
|
* Request a quote for the requested token pairs
|
|
1070
1112
|
*
|
|
1071
|
-
*
|
|
1072
|
-
*
|
|
1113
|
+
* Weight(UID): 200
|
|
1114
|
+
*
|
|
1115
|
+
* Security Type: TRADE
|
|
1073
1116
|
*
|
|
1074
|
-
*
|
|
1117
|
+
* Notes:
|
|
1118
|
+
* - Either `fromAmount` or `toAmount` should be sent.
|
|
1119
|
+
* - `quoteId` is returned only if you have enough funds to convert.
|
|
1075
1120
|
*
|
|
1076
|
-
* @summary Send Quote Request(
|
|
1121
|
+
* @summary Send Quote Request (TRADE)
|
|
1077
1122
|
* @param {SendQuoteRequestRequest} requestParameters Request parameters.
|
|
1078
1123
|
* @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}
|
|
1079
1124
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1080
1125
|
* @memberof TradeApi
|
|
1081
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1126
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#send-quote-request Binance API Documentation}
|
|
1082
1127
|
*/
|
|
1083
1128
|
sendQuoteRequest(requestParameters: SendQuoteRequestRequest): Promise<RestApiResponse<SendQuoteRequestResponse>>;
|
|
1084
1129
|
}
|
|
1130
|
+
declare enum PlaceLimitOrderSideEnum {
|
|
1131
|
+
BUY = "BUY",
|
|
1132
|
+
SELL = "SELL",
|
|
1133
|
+
}
|
|
1134
|
+
declare enum PlaceLimitOrderExpiredTypeEnum {
|
|
1135
|
+
EXPIRED_TYPE_1_D = "1_D",
|
|
1136
|
+
EXPIRED_TYPE_3_D = "3_D",
|
|
1137
|
+
EXPIRED_TYPE_7_D = "7_D",
|
|
1138
|
+
EXPIRED_TYPE_30_D = "30_D",
|
|
1139
|
+
}
|
|
1140
|
+
declare enum PlaceLimitOrderWalletTypeEnum {
|
|
1141
|
+
SPOT = "SPOT",
|
|
1142
|
+
FUNDING = "FUNDING",
|
|
1143
|
+
EARN = "EARN",
|
|
1144
|
+
SPOT_FUNDING = "SPOT_FUNDING",
|
|
1145
|
+
FUNDING_EARN = "FUNDING_EARN",
|
|
1146
|
+
SPOT_FUNDING_EARN = "SPOT_FUNDING_EARN",
|
|
1147
|
+
SPOT_EARN = "SPOT_EARN",
|
|
1148
|
+
}
|
|
1149
|
+
declare enum SendQuoteRequestWalletTypeEnum {
|
|
1150
|
+
SPOT = "SPOT",
|
|
1151
|
+
FUNDING = "FUNDING",
|
|
1152
|
+
EARN = "EARN",
|
|
1153
|
+
SPOT_FUNDING = "SPOT_FUNDING",
|
|
1154
|
+
FUNDING_EARN = "FUNDING_EARN",
|
|
1155
|
+
SPOT_FUNDING_EARN = "SPOT_FUNDING_EARN",
|
|
1156
|
+
SPOT_EARN = "SPOT_EARN",
|
|
1157
|
+
}
|
|
1158
|
+
declare enum SendQuoteRequestValidTimeEnum {
|
|
1159
|
+
VALID_TIME_10s = "10s",
|
|
1160
|
+
VALID_TIME_30s = "30s",
|
|
1161
|
+
VALID_TIME_1m = "1m",
|
|
1162
|
+
}
|
|
1085
1163
|
//#endregion
|
|
1086
1164
|
//#region src/rest-api/rest-api.d.ts
|
|
1087
1165
|
declare class RestAPI {
|
|
@@ -1110,137 +1188,158 @@ declare class RestAPI {
|
|
|
1110
1188
|
*/
|
|
1111
1189
|
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
1112
1190
|
/**
|
|
1113
|
-
* Query for all convertible token pairs and the tokens’ respective
|
|
1191
|
+
* Query for all convertible token pairs and the tokens’ respective
|
|
1192
|
+
* upper/lower limits
|
|
1114
1193
|
*
|
|
1115
|
-
*
|
|
1116
|
-
* If not defined for both fromAsset and toAsset, only partial token pairs will be returned
|
|
1194
|
+
* Weight(IP): 3000
|
|
1117
1195
|
*
|
|
1118
|
-
*
|
|
1196
|
+
* Notes:
|
|
1197
|
+
* - User needs to supply either or both input parameters.
|
|
1198
|
+
* - If only one of `fromAsset` and `toAsset` is provided, only partial token pairs are returned.
|
|
1119
1199
|
*
|
|
1120
1200
|
* @summary List All Convert Pairs
|
|
1121
1201
|
* @param {ListAllConvertPairsRequest} requestParameters Request parameters.
|
|
1122
1202
|
*
|
|
1123
1203
|
* @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}
|
|
1124
1204
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1125
|
-
* @see {@link https://developers.binance.com/docs/convert/market-data
|
|
1205
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#list-all-convert-pairs Binance API Documentation}
|
|
1126
1206
|
*/
|
|
1127
1207
|
listAllConvertPairs(requestParameters?: ListAllConvertPairsRequest): Promise<RestApiResponse<ListAllConvertPairsResponse>>;
|
|
1128
1208
|
/**
|
|
1129
1209
|
* Query for supported asset’s precision information
|
|
1130
1210
|
*
|
|
1131
|
-
* Weight: 100
|
|
1211
|
+
* Weight(IP): 100
|
|
1212
|
+
*
|
|
1213
|
+
* Security Type: USER_DATA
|
|
1132
1214
|
*
|
|
1133
|
-
* @summary Query order quantity precision per asset(USER_DATA)
|
|
1215
|
+
* @summary Query order quantity precision per asset (USER_DATA)
|
|
1134
1216
|
* @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.
|
|
1135
1217
|
*
|
|
1136
1218
|
* @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}
|
|
1137
1219
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1138
|
-
* @see {@link https://developers.binance.com/docs/convert/market-data
|
|
1220
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/market-data#query-order-quantity-precision-per-asset Binance API Documentation}
|
|
1139
1221
|
*/
|
|
1140
1222
|
queryOrderQuantityPrecisionPerAsset(requestParameters?: QueryOrderQuantityPrecisionPerAssetRequest): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>;
|
|
1141
1223
|
/**
|
|
1142
1224
|
* Accept the offered quote by quote ID.
|
|
1143
1225
|
*
|
|
1144
|
-
* Weight: 500
|
|
1226
|
+
* Weight(UID): 500
|
|
1227
|
+
*
|
|
1228
|
+
* Security Type: TRADE
|
|
1145
1229
|
*
|
|
1146
1230
|
* @summary Accept Quote (TRADE)
|
|
1147
1231
|
* @param {AcceptQuoteRequest} requestParameters Request parameters.
|
|
1148
1232
|
*
|
|
1149
1233
|
* @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}
|
|
1150
1234
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1151
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1235
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#accept-quote Binance API Documentation}
|
|
1152
1236
|
*/
|
|
1153
1237
|
acceptQuote(requestParameters: AcceptQuoteRequest): Promise<RestApiResponse<AcceptQuoteResponse>>;
|
|
1154
1238
|
/**
|
|
1155
1239
|
* Enable users to cancel a limit order
|
|
1156
1240
|
*
|
|
1157
|
-
* Weight: 200
|
|
1241
|
+
* Weight(UID): 200
|
|
1242
|
+
*
|
|
1243
|
+
* Security Type: TRADE
|
|
1158
1244
|
*
|
|
1159
|
-
* @summary Cancel limit order (
|
|
1245
|
+
* @summary Cancel limit order (TRADE)
|
|
1160
1246
|
* @param {CancelLimitOrderRequest} requestParameters Request parameters.
|
|
1161
1247
|
*
|
|
1162
1248
|
* @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}
|
|
1163
1249
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1164
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1250
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#cancel-limit-order Binance API Documentation}
|
|
1165
1251
|
*/
|
|
1166
1252
|
cancelLimitOrder(requestParameters: CancelLimitOrderRequest): Promise<RestApiResponse<CancelLimitOrderResponse>>;
|
|
1167
1253
|
/**
|
|
1168
1254
|
* Get Convert Trade History
|
|
1169
1255
|
*
|
|
1170
|
-
*
|
|
1256
|
+
* Weight(UID): 3000
|
|
1257
|
+
*
|
|
1258
|
+
* Security Type: USER_DATA
|
|
1171
1259
|
*
|
|
1172
|
-
*
|
|
1260
|
+
* Notes:
|
|
1261
|
+
* - The max interval between `startTime` and `endTime` is 30 days.
|
|
1173
1262
|
*
|
|
1174
|
-
* @summary Get Convert Trade History(USER_DATA)
|
|
1263
|
+
* @summary Get Convert Trade History (USER_DATA)
|
|
1175
1264
|
* @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.
|
|
1176
1265
|
*
|
|
1177
1266
|
* @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}
|
|
1178
1267
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1179
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1268
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#get-convert-trade-history Binance API Documentation}
|
|
1180
1269
|
*/
|
|
1181
1270
|
getConvertTradeHistory(requestParameters: GetConvertTradeHistoryRequest): Promise<RestApiResponse<GetConvertTradeHistoryResponse>>;
|
|
1182
1271
|
/**
|
|
1183
1272
|
* Query order status by order ID.
|
|
1184
1273
|
*
|
|
1185
|
-
* Weight: 100
|
|
1274
|
+
* Weight(UID): 100
|
|
1186
1275
|
*
|
|
1187
|
-
*
|
|
1276
|
+
* Security Type: USER_DATA
|
|
1277
|
+
*
|
|
1278
|
+
* @summary Order status (USER_DATA)
|
|
1188
1279
|
* @param {OrderStatusRequest} requestParameters Request parameters.
|
|
1189
1280
|
*
|
|
1190
1281
|
* @returns {Promise<RestApiResponse<OrderStatusResponse>>}
|
|
1191
1282
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1192
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1283
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#order-status Binance API Documentation}
|
|
1193
1284
|
*/
|
|
1194
1285
|
orderStatus(requestParameters?: OrderStatusRequest): Promise<RestApiResponse<OrderStatusResponse>>;
|
|
1195
1286
|
/**
|
|
1196
1287
|
* Enable users to place a limit order
|
|
1197
1288
|
*
|
|
1198
|
-
*
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1289
|
+
* Weight(UID): 500
|
|
1290
|
+
*
|
|
1291
|
+
* Security Type: TRADE
|
|
1201
1292
|
*
|
|
1202
|
-
*
|
|
1293
|
+
* Notes:
|
|
1294
|
+
* - `baseAsset` and `quoteAsset` can be determined via the `exchangeInfo` endpoint.
|
|
1295
|
+
* - Limit price is defined from `baseAsset` to `quoteAsset`.
|
|
1296
|
+
* - Exactly one of `baseAmount` or `quoteAmount` should be sent.
|
|
1203
1297
|
*
|
|
1204
|
-
* @summary Place limit order (
|
|
1298
|
+
* @summary Place limit order (TRADE)
|
|
1205
1299
|
* @param {PlaceLimitOrderRequest} requestParameters Request parameters.
|
|
1206
1300
|
*
|
|
1207
1301
|
* @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}
|
|
1208
1302
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1209
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1303
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#place-limit-order Binance API Documentation}
|
|
1210
1304
|
*/
|
|
1211
1305
|
placeLimitOrder(requestParameters: PlaceLimitOrderRequest): Promise<RestApiResponse<PlaceLimitOrderResponse>>;
|
|
1212
1306
|
/**
|
|
1213
|
-
*
|
|
1307
|
+
* Query current open limit orders
|
|
1214
1308
|
*
|
|
1215
|
-
* Weight: 3000
|
|
1309
|
+
* Weight(UID): 3000
|
|
1310
|
+
*
|
|
1311
|
+
* Security Type: USER_DATA
|
|
1216
1312
|
*
|
|
1217
1313
|
* @summary Query limit open orders (USER_DATA)
|
|
1218
1314
|
* @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.
|
|
1219
1315
|
*
|
|
1220
1316
|
* @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}
|
|
1221
1317
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1222
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1318
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#query-limit-open-orders Binance API Documentation}
|
|
1223
1319
|
*/
|
|
1224
1320
|
queryLimitOpenOrders(requestParameters?: QueryLimitOpenOrdersRequest): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>;
|
|
1225
1321
|
/**
|
|
1226
1322
|
* Request a quote for the requested token pairs
|
|
1227
1323
|
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1324
|
+
* Weight(UID): 200
|
|
1325
|
+
*
|
|
1326
|
+
* Security Type: TRADE
|
|
1230
1327
|
*
|
|
1231
|
-
*
|
|
1328
|
+
* Notes:
|
|
1329
|
+
* - Either `fromAmount` or `toAmount` should be sent.
|
|
1330
|
+
* - `quoteId` is returned only if you have enough funds to convert.
|
|
1232
1331
|
*
|
|
1233
|
-
* @summary Send Quote Request(
|
|
1332
|
+
* @summary Send Quote Request (TRADE)
|
|
1234
1333
|
* @param {SendQuoteRequestRequest} requestParameters Request parameters.
|
|
1235
1334
|
*
|
|
1236
1335
|
* @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}
|
|
1237
1336
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1238
|
-
* @see {@link https://developers.binance.com/docs/convert/
|
|
1337
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-convert/api/rest-api/trade#send-quote-request Binance API Documentation}
|
|
1239
1338
|
*/
|
|
1240
1339
|
sendQuoteRequest(requestParameters: SendQuoteRequestRequest): Promise<RestApiResponse<SendQuoteRequestResponse>>;
|
|
1241
1340
|
}
|
|
1242
1341
|
declare namespace index_d_exports {
|
|
1243
|
-
export { AcceptQuoteRequest, AcceptQuoteResponse, CancelLimitOrderRequest, CancelLimitOrderResponse, GetConvertTradeHistoryRequest, GetConvertTradeHistoryResponse, GetConvertTradeHistoryResponseListInner, ListAllConvertPairsRequest, ListAllConvertPairsResponse, ListAllConvertPairsResponseInner, MarketDataApi, MarketDataApiInterface, OrderStatusRequest, OrderStatusResponse, PlaceLimitOrderRequest, PlaceLimitOrderResponse, QueryLimitOpenOrdersRequest, QueryLimitOpenOrdersResponse, QueryLimitOpenOrdersResponseListInner, QueryOrderQuantityPrecisionPerAssetRequest, QueryOrderQuantityPrecisionPerAssetResponse, QueryOrderQuantityPrecisionPerAssetResponseInner, RestAPI, SendQuoteRequestRequest, SendQuoteRequestResponse, TradeApi, TradeApiInterface };
|
|
1342
|
+
export { AcceptQuoteRequest, AcceptQuoteResponse, CancelLimitOrderRequest, CancelLimitOrderResponse, GetConvertTradeHistoryRequest, GetConvertTradeHistoryResponse, GetConvertTradeHistoryResponseListInner, ListAllConvertPairsRequest, ListAllConvertPairsResponse, ListAllConvertPairsResponseInner, MarketDataApi, MarketDataApiInterface, OrderStatusRequest, OrderStatusResponse, PlaceLimitOrderExpiredTypeEnum, PlaceLimitOrderRequest, PlaceLimitOrderResponse, PlaceLimitOrderSideEnum, PlaceLimitOrderWalletTypeEnum, QueryLimitOpenOrdersRequest, QueryLimitOpenOrdersResponse, QueryLimitOpenOrdersResponseListInner, QueryOrderQuantityPrecisionPerAssetRequest, QueryOrderQuantityPrecisionPerAssetResponse, QueryOrderQuantityPrecisionPerAssetResponseInner, RestAPI, SendQuoteRequestRequest, SendQuoteRequestResponse, SendQuoteRequestValidTimeEnum, SendQuoteRequestWalletTypeEnum, TradeApi, TradeApiInterface };
|
|
1244
1343
|
}
|
|
1245
1344
|
//#endregion
|
|
1246
1345
|
//#region src/convert.d.ts
|