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