ccxt 4.5.44 → 4.5.46
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/README.md +9 -12
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -12
- package/dist/cjs/src/abstract/kucoinfutures.js +1 -1
- package/dist/cjs/src/base/Exchange.js +39 -3
- package/dist/cjs/src/base/functions/encode.js +2 -2
- package/dist/cjs/src/base/functions/generic.js +8 -2
- package/dist/cjs/src/binance.js +11 -2
- package/dist/cjs/src/bitget.js +3 -1
- package/dist/cjs/src/bitmart.js +144 -21
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/bybit.js +58 -56
- package/dist/cjs/src/bydfi.js +102 -100
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/gate.js +264 -170
- package/dist/cjs/src/grvt.js +3 -2
- package/dist/cjs/src/hyperliquid.js +16 -5
- package/dist/cjs/src/kraken.js +4 -2
- package/dist/cjs/src/krakenfutures.js +1 -5
- package/dist/cjs/src/kucoin.js +4733 -972
- package/dist/cjs/src/kucoinfutures.js +14 -3434
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/okx.js +75 -57
- package/dist/cjs/src/paradex.js +2 -6
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/bydfi.js +19 -19
- package/dist/cjs/src/pro/gate.js +114 -53
- package/dist/cjs/src/pro/grvt.js +5 -3
- package/dist/cjs/src/pro/htx.js +4 -4
- package/dist/cjs/src/pro/kucoin.js +819 -178
- package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
- package/dist/cjs/src/pro/mexc.js +10 -5
- package/dist/cjs/src/pro/okx.js +85 -40
- package/index.d.cts +2 -0
- package/js/ccxt.d.ts +2 -14
- package/js/ccxt.js +2 -10
- package/js/src/abstract/bitmart.d.ts +7 -0
- package/js/src/abstract/bydfi.d.ts +29 -29
- package/js/src/abstract/kraken.d.ts +1 -0
- package/js/src/abstract/kucoin.d.ts +46 -2
- package/js/src/abstract/kucoinfutures.d.ts +27 -11
- package/js/src/base/Exchange.d.ts +13 -1
- package/js/src/base/Exchange.js +39 -3
- package/js/src/base/functions/encode.js +2 -2
- package/js/src/base/functions/generic.js +9 -3
- package/js/src/binance.js +11 -2
- package/js/src/bitget.js +3 -1
- package/js/src/bitmart.d.ts +18 -4
- package/js/src/bitmart.js +144 -21
- package/js/src/bitrue.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/bybit.d.ts +1 -0
- package/js/src/bybit.js +58 -56
- package/js/src/bydfi.d.ts +31 -31
- package/js/src/bydfi.js +102 -100
- package/js/src/cex.js +2 -1
- package/js/src/gate.d.ts +125 -119
- package/js/src/gate.js +264 -170
- package/js/src/grvt.js +3 -2
- package/js/src/hyperliquid.d.ts +3 -1
- package/js/src/hyperliquid.js +16 -5
- package/js/src/kraken.js +4 -2
- package/js/src/krakenfutures.js +1 -5
- package/js/src/kucoin.d.ts +696 -100
- package/js/src/kucoin.js +4734 -973
- package/js/src/kucoinfutures.d.ts +4 -522
- package/js/src/kucoinfutures.js +14 -3434
- package/js/src/lbank.js +1 -1
- package/js/src/okx.d.ts +1 -0
- package/js/src/okx.js +75 -57
- package/js/src/paradex.d.ts +0 -1
- package/js/src/paradex.js +2 -6
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/bydfi.d.ts +18 -18
- package/js/src/pro/bydfi.js +19 -19
- package/js/src/pro/gate.d.ts +30 -1
- package/js/src/pro/gate.js +114 -53
- package/js/src/pro/grvt.js +5 -3
- package/js/src/pro/htx.js +4 -4
- package/js/src/pro/kucoin.d.ts +70 -30
- package/js/src/pro/kucoin.js +821 -180
- package/js/src/pro/kucoinfutures.d.ts +17 -195
- package/js/src/pro/kucoinfutures.js +96 -1262
- package/js/src/pro/mexc.js +10 -5
- package/js/src/pro/okx.d.ts +1 -0
- package/js/src/pro/okx.js +85 -40
- package/package.json +2 -2
- package/dist/cjs/src/abstract/alp.js +0 -11
- package/dist/cjs/src/abstract/defx.js +0 -11
- package/dist/cjs/src/abstract/timex.js +0 -11
- package/dist/cjs/src/alp.js +0 -1059
- package/dist/cjs/src/defx.js +0 -2142
- package/dist/cjs/src/pro/defx.js +0 -866
- package/dist/cjs/src/timex.js +0 -1793
- package/js/src/abstract/alp.d.ts +0 -21
- package/js/src/abstract/alp.js +0 -5
- package/js/src/abstract/defx.d.ts +0 -72
- package/js/src/abstract/defx.js +0 -5
- package/js/src/abstract/timex.d.ts +0 -65
- package/js/src/abstract/timex.js +0 -5
- package/js/src/alp.d.ts +0 -209
- package/js/src/alp.js +0 -1052
- package/js/src/defx.d.ts +0 -348
- package/js/src/defx.js +0 -2135
- package/js/src/pro/defx.d.ts +0 -236
- package/js/src/pro/defx.js +0 -859
- package/js/src/timex.d.ts +0 -247
- package/js/src/timex.js +0 -1786
|
@@ -79,6 +79,13 @@ interface Exchange {
|
|
|
79
79
|
privateGetHfMarginOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
80
80
|
privateGetHfMarginOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
81
81
|
privateGetHfMarginFills(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
privateGetHfMarginStopOrders(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
privateGetHfMarginStopOrderOrderId(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
privateGetHfMarginStopOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
privateGetHfMarginOcoOrderOrderId(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
privateGetHfMarginOcoOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
privateGetHfMarginOcoOrderDetailOrderId(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
privateGetHfMarginOcoOrders(params?: {}): Promise<implicitReturnType>;
|
|
82
89
|
privateGetEtfInfo(params?: {}): Promise<implicitReturnType>;
|
|
83
90
|
privateGetMarginCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
84
91
|
privateGetRiskLimitStrategy(params?: {}): Promise<implicitReturnType>;
|
|
@@ -104,7 +111,6 @@ interface Exchange {
|
|
|
104
111
|
privateGetConvertLimitOrderDetail(params?: {}): Promise<implicitReturnType>;
|
|
105
112
|
privateGetConvertLimitOrders(params?: {}): Promise<implicitReturnType>;
|
|
106
113
|
privateGetAffiliateInviterStatistics(params?: {}): Promise<implicitReturnType>;
|
|
107
|
-
privateGetEarnRedeemPreview(params?: {}): Promise<implicitReturnType>;
|
|
108
114
|
privatePostSubUserCreated(params?: {}): Promise<implicitReturnType>;
|
|
109
115
|
privatePostSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
110
116
|
privatePostSubApiKeyUpdate(params?: {}): Promise<implicitReturnType>;
|
|
@@ -129,8 +135,10 @@ interface Exchange {
|
|
|
129
135
|
privatePostOcoOrder(params?: {}): Promise<implicitReturnType>;
|
|
130
136
|
privatePostHfMarginOrder(params?: {}): Promise<implicitReturnType>;
|
|
131
137
|
privatePostHfMarginOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
138
|
+
privatePostHfMarginStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
132
139
|
privatePostMarginOrder(params?: {}): Promise<implicitReturnType>;
|
|
133
140
|
privatePostMarginOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
141
|
+
privatePostHfMarginOcoOrder(params?: {}): Promise<implicitReturnType>;
|
|
134
142
|
privatePostMarginBorrow(params?: {}): Promise<implicitReturnType>;
|
|
135
143
|
privatePostMarginRepay(params?: {}): Promise<implicitReturnType>;
|
|
136
144
|
privatePostPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -162,10 +170,17 @@ interface Exchange {
|
|
|
162
170
|
privateDeleteHfMarginOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
163
171
|
privateDeleteHfMarginOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
164
172
|
privateDeleteHfMarginOrders(params?: {}): Promise<implicitReturnType>;
|
|
173
|
+
privateDeleteHfMarginStopOrderCancelById(params?: {}): Promise<implicitReturnType>;
|
|
174
|
+
privateDeleteHfMarginStopOrderCancelByClientOid(params?: {}): Promise<implicitReturnType>;
|
|
175
|
+
privateDeleteHfMarginStopOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
176
|
+
privateDeleteHfMarginOcoOrderCancelById(params?: {}): Promise<implicitReturnType>;
|
|
177
|
+
privateDeleteHfMarginOcoOrderCancelByClientOid(params?: {}): Promise<implicitReturnType>;
|
|
178
|
+
privateDeleteHfMarginOcoOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
165
179
|
privateDeleteConvertLimitOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
166
180
|
futuresPublicGetContractsActive(params?: {}): Promise<implicitReturnType>;
|
|
167
181
|
futuresPublicGetContractsSymbol(params?: {}): Promise<implicitReturnType>;
|
|
168
182
|
futuresPublicGetTicker(params?: {}): Promise<implicitReturnType>;
|
|
183
|
+
futuresPublicGetAllTickers(params?: {}): Promise<implicitReturnType>;
|
|
169
184
|
futuresPublicGetLevel2Snapshot(params?: {}): Promise<implicitReturnType>;
|
|
170
185
|
futuresPublicGetLevel2Depth20(params?: {}): Promise<implicitReturnType>;
|
|
171
186
|
futuresPublicGetLevel2Depth100(params?: {}): Promise<implicitReturnType>;
|
|
@@ -181,6 +196,9 @@ interface Exchange {
|
|
|
181
196
|
futuresPublicGetTimestamp(params?: {}): Promise<implicitReturnType>;
|
|
182
197
|
futuresPublicGetStatus(params?: {}): Promise<implicitReturnType>;
|
|
183
198
|
futuresPublicGetLevel2MessageQuery(params?: {}): Promise<implicitReturnType>;
|
|
199
|
+
futuresPublicGetContractsRiskLimitSymbol(params?: {}): Promise<implicitReturnType>;
|
|
200
|
+
futuresPublicGetLevel3MessageQuery(params?: {}): Promise<implicitReturnType>;
|
|
201
|
+
futuresPublicGetLevel3Snapshot(params?: {}): Promise<implicitReturnType>;
|
|
184
202
|
futuresPublicPostBulletPublic(params?: {}): Promise<implicitReturnType>;
|
|
185
203
|
futuresPrivateGetTransactionHistory(params?: {}): Promise<implicitReturnType>;
|
|
186
204
|
futuresPrivateGetAccountOverview(params?: {}): Promise<implicitReturnType>;
|
|
@@ -193,6 +211,7 @@ interface Exchange {
|
|
|
193
211
|
futuresPrivateGetOrdersByClientOid(params?: {}): Promise<implicitReturnType>;
|
|
194
212
|
futuresPrivateGetFills(params?: {}): Promise<implicitReturnType>;
|
|
195
213
|
futuresPrivateGetRecentFills(params?: {}): Promise<implicitReturnType>;
|
|
214
|
+
futuresPrivateGetTradeFees(params?: {}): Promise<implicitReturnType>;
|
|
196
215
|
futuresPrivateGetOpenOrderStatistics(params?: {}): Promise<implicitReturnType>;
|
|
197
216
|
futuresPrivateGetPosition(params?: {}): Promise<implicitReturnType>;
|
|
198
217
|
futuresPrivateGetPositions(params?: {}): Promise<implicitReturnType>;
|
|
@@ -201,9 +220,21 @@ interface Exchange {
|
|
|
201
220
|
futuresPrivateGetFundingHistory(params?: {}): Promise<implicitReturnType>;
|
|
202
221
|
futuresPrivateGetCopyTradeFuturesGetMaxOpenSize(params?: {}): Promise<implicitReturnType>;
|
|
203
222
|
futuresPrivateGetCopyTradeFuturesPositionMarginMaxWithdrawMargin(params?: {}): Promise<implicitReturnType>;
|
|
223
|
+
futuresPrivateGetHistoryPositions(params?: {}): Promise<implicitReturnType>;
|
|
224
|
+
futuresPrivateGetPositionGetMarginMode(params?: {}): Promise<implicitReturnType>;
|
|
225
|
+
futuresPrivateGetPositionGetPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
226
|
+
futuresPrivateGetDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
227
|
+
futuresPrivateGetDepositList(params?: {}): Promise<implicitReturnType>;
|
|
228
|
+
futuresPrivateGetWithdrawalsQuotas(params?: {}): Promise<implicitReturnType>;
|
|
229
|
+
futuresPrivateGetWithdrawalList(params?: {}): Promise<implicitReturnType>;
|
|
230
|
+
futuresPrivateGetSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
231
|
+
futuresPrivateGetTradeStatistics(params?: {}): Promise<implicitReturnType>;
|
|
232
|
+
futuresPrivateGetGetMaxOpenSize(params?: {}): Promise<implicitReturnType>;
|
|
233
|
+
futuresPrivateGetGetCrossUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
204
234
|
futuresPrivatePostTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
205
235
|
futuresPrivatePostTransferIn(params?: {}): Promise<implicitReturnType>;
|
|
206
236
|
futuresPrivatePostOrders(params?: {}): Promise<implicitReturnType>;
|
|
237
|
+
futuresPrivatePostStOrders(params?: {}): Promise<implicitReturnType>;
|
|
207
238
|
futuresPrivatePostOrdersTest(params?: {}): Promise<implicitReturnType>;
|
|
208
239
|
futuresPrivatePostOrdersMulti(params?: {}): Promise<implicitReturnType>;
|
|
209
240
|
futuresPrivatePostPositionMarginAutoDepositStatus(params?: {}): Promise<implicitReturnType>;
|
|
@@ -221,6 +252,12 @@ interface Exchange {
|
|
|
221
252
|
futuresPrivatePostCopyTradeFuturesPositionChangeCrossUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
222
253
|
futuresPrivatePostCopyTradeGetCrossModeMarginRequirement(params?: {}): Promise<implicitReturnType>;
|
|
223
254
|
futuresPrivatePostCopyTradePositionSwitchPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
255
|
+
futuresPrivatePostChangeCrossUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
256
|
+
futuresPrivatePostWithdrawals(params?: {}): Promise<implicitReturnType>;
|
|
257
|
+
futuresPrivatePostSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
258
|
+
futuresPrivatePostSubApiKeyUpdate(params?: {}): Promise<implicitReturnType>;
|
|
259
|
+
futuresPrivatePostPositionChangeMarginMode(params?: {}): Promise<implicitReturnType>;
|
|
260
|
+
futuresPrivatePostPositionSwitchPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
224
261
|
futuresPrivatePostBulletPrivate(params?: {}): Promise<implicitReturnType>;
|
|
225
262
|
futuresPrivateDeleteOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
226
263
|
futuresPrivateDeleteOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
@@ -228,7 +265,12 @@ interface Exchange {
|
|
|
228
265
|
futuresPrivateDeleteStopOrders(params?: {}): Promise<implicitReturnType>;
|
|
229
266
|
futuresPrivateDeleteCopyTradeFuturesOrders(params?: {}): Promise<implicitReturnType>;
|
|
230
267
|
futuresPrivateDeleteCopyTradeFuturesOrdersClientOrder(params?: {}): Promise<implicitReturnType>;
|
|
268
|
+
futuresPrivateDeleteOrdersMultiCancel(params?: {}): Promise<implicitReturnType>;
|
|
269
|
+
futuresPrivateDeleteWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
|
|
270
|
+
futuresPrivateDeleteCancelTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
271
|
+
futuresPrivateDeleteSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
231
272
|
webExchangeGetCurrencyCurrencyChainInfo(params?: {}): Promise<implicitReturnType>;
|
|
273
|
+
webExchangeGetContractSymbolFundingRates(params?: {}): Promise<implicitReturnType>;
|
|
232
274
|
brokerGetBrokerNdInfo(params?: {}): Promise<implicitReturnType>;
|
|
233
275
|
brokerGetBrokerNdAccount(params?: {}): Promise<implicitReturnType>;
|
|
234
276
|
brokerGetBrokerNdAccountApikey(params?: {}): Promise<implicitReturnType>;
|
|
@@ -259,7 +301,7 @@ interface Exchange {
|
|
|
259
301
|
earnDeleteEarnOrders(params?: {}): Promise<implicitReturnType>;
|
|
260
302
|
utaGetMarketAnnouncement(params?: {}): Promise<implicitReturnType>;
|
|
261
303
|
utaGetMarketCurrency(params?: {}): Promise<implicitReturnType>;
|
|
262
|
-
|
|
304
|
+
utaGetAssetCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
263
305
|
utaGetMarketInstrument(params?: {}): Promise<implicitReturnType>;
|
|
264
306
|
utaGetMarketTicker(params?: {}): Promise<implicitReturnType>;
|
|
265
307
|
utaGetMarketTrade(params?: {}): Promise<implicitReturnType>;
|
|
@@ -278,6 +320,7 @@ interface Exchange {
|
|
|
278
320
|
utaPrivateGetAccountMode(params?: {}): Promise<implicitReturnType>;
|
|
279
321
|
utaPrivateGetAccountLedger(params?: {}): Promise<implicitReturnType>;
|
|
280
322
|
utaPrivateGetAccountInterestHistory(params?: {}): Promise<implicitReturnType>;
|
|
323
|
+
utaPrivateGetAssetDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
281
324
|
utaPrivateGetAccountDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
282
325
|
utaPrivateGetAccountModeAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
283
326
|
utaPrivateGetAccountModeAccountOverview(params?: {}): Promise<implicitReturnType>;
|
|
@@ -298,6 +341,7 @@ interface Exchange {
|
|
|
298
341
|
utaPrivatePostAccountModeOrderPlaceBatch(params?: {}): Promise<implicitReturnType>;
|
|
299
342
|
utaPrivatePostAccountModeOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
300
343
|
utaPrivatePostAccountModeOrderCancelBatch(params?: {}): Promise<implicitReturnType>;
|
|
344
|
+
utaPrivatePostAccountModeOrderCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
301
345
|
utaPrivatePostSubAccountCanTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
302
346
|
utaPrivatePostDcpSet(params?: {}): Promise<implicitReturnType>;
|
|
303
347
|
}
|
|
@@ -79,6 +79,13 @@ interface kucoin {
|
|
|
79
79
|
privateGetHfMarginOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
80
80
|
privateGetHfMarginOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
81
81
|
privateGetHfMarginFills(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
privateGetHfMarginStopOrders(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
privateGetHfMarginStopOrderOrderId(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
privateGetHfMarginStopOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
privateGetHfMarginOcoOrderOrderId(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
privateGetHfMarginOcoOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
privateGetHfMarginOcoOrderDetailOrderId(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
privateGetHfMarginOcoOrders(params?: {}): Promise<implicitReturnType>;
|
|
82
89
|
privateGetEtfInfo(params?: {}): Promise<implicitReturnType>;
|
|
83
90
|
privateGetMarginCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
84
91
|
privateGetRiskLimitStrategy(params?: {}): Promise<implicitReturnType>;
|
|
@@ -104,7 +111,6 @@ interface kucoin {
|
|
|
104
111
|
privateGetConvertLimitOrderDetail(params?: {}): Promise<implicitReturnType>;
|
|
105
112
|
privateGetConvertLimitOrders(params?: {}): Promise<implicitReturnType>;
|
|
106
113
|
privateGetAffiliateInviterStatistics(params?: {}): Promise<implicitReturnType>;
|
|
107
|
-
privateGetEarnRedeemPreview(params?: {}): Promise<implicitReturnType>;
|
|
108
114
|
privatePostSubUserCreated(params?: {}): Promise<implicitReturnType>;
|
|
109
115
|
privatePostSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
110
116
|
privatePostSubApiKeyUpdate(params?: {}): Promise<implicitReturnType>;
|
|
@@ -129,8 +135,10 @@ interface kucoin {
|
|
|
129
135
|
privatePostOcoOrder(params?: {}): Promise<implicitReturnType>;
|
|
130
136
|
privatePostHfMarginOrder(params?: {}): Promise<implicitReturnType>;
|
|
131
137
|
privatePostHfMarginOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
138
|
+
privatePostHfMarginStopOrder(params?: {}): Promise<implicitReturnType>;
|
|
132
139
|
privatePostMarginOrder(params?: {}): Promise<implicitReturnType>;
|
|
133
140
|
privatePostMarginOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
141
|
+
privatePostHfMarginOcoOrder(params?: {}): Promise<implicitReturnType>;
|
|
134
142
|
privatePostMarginBorrow(params?: {}): Promise<implicitReturnType>;
|
|
135
143
|
privatePostMarginRepay(params?: {}): Promise<implicitReturnType>;
|
|
136
144
|
privatePostPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -162,10 +170,17 @@ interface kucoin {
|
|
|
162
170
|
privateDeleteHfMarginOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
163
171
|
privateDeleteHfMarginOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
164
172
|
privateDeleteHfMarginOrders(params?: {}): Promise<implicitReturnType>;
|
|
173
|
+
privateDeleteHfMarginStopOrderCancelById(params?: {}): Promise<implicitReturnType>;
|
|
174
|
+
privateDeleteHfMarginStopOrderCancelByClientOid(params?: {}): Promise<implicitReturnType>;
|
|
175
|
+
privateDeleteHfMarginStopOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
176
|
+
privateDeleteHfMarginOcoOrderCancelById(params?: {}): Promise<implicitReturnType>;
|
|
177
|
+
privateDeleteHfMarginOcoOrderCancelByClientOid(params?: {}): Promise<implicitReturnType>;
|
|
178
|
+
privateDeleteHfMarginOcoOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
165
179
|
privateDeleteConvertLimitOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
166
180
|
futuresPublicGetContractsActive(params?: {}): Promise<implicitReturnType>;
|
|
167
181
|
futuresPublicGetContractsSymbol(params?: {}): Promise<implicitReturnType>;
|
|
168
182
|
futuresPublicGetTicker(params?: {}): Promise<implicitReturnType>;
|
|
183
|
+
futuresPublicGetAllTickers(params?: {}): Promise<implicitReturnType>;
|
|
169
184
|
futuresPublicGetLevel2Snapshot(params?: {}): Promise<implicitReturnType>;
|
|
170
185
|
futuresPublicGetLevel2Depth20(params?: {}): Promise<implicitReturnType>;
|
|
171
186
|
futuresPublicGetLevel2Depth100(params?: {}): Promise<implicitReturnType>;
|
|
@@ -182,8 +197,6 @@ interface kucoin {
|
|
|
182
197
|
futuresPublicGetStatus(params?: {}): Promise<implicitReturnType>;
|
|
183
198
|
futuresPublicGetLevel2MessageQuery(params?: {}): Promise<implicitReturnType>;
|
|
184
199
|
futuresPublicGetContractsRiskLimitSymbol(params?: {}): Promise<implicitReturnType>;
|
|
185
|
-
futuresPublicGetAllTickers(params?: {}): Promise<implicitReturnType>;
|
|
186
|
-
futuresPublicGetLevel2DepthLimit(params?: {}): Promise<implicitReturnType>;
|
|
187
200
|
futuresPublicGetLevel3MessageQuery(params?: {}): Promise<implicitReturnType>;
|
|
188
201
|
futuresPublicGetLevel3Snapshot(params?: {}): Promise<implicitReturnType>;
|
|
189
202
|
futuresPublicPostBulletPublic(params?: {}): Promise<implicitReturnType>;
|
|
@@ -198,6 +211,7 @@ interface kucoin {
|
|
|
198
211
|
futuresPrivateGetOrdersByClientOid(params?: {}): Promise<implicitReturnType>;
|
|
199
212
|
futuresPrivateGetFills(params?: {}): Promise<implicitReturnType>;
|
|
200
213
|
futuresPrivateGetRecentFills(params?: {}): Promise<implicitReturnType>;
|
|
214
|
+
futuresPrivateGetTradeFees(params?: {}): Promise<implicitReturnType>;
|
|
201
215
|
futuresPrivateGetOpenOrderStatistics(params?: {}): Promise<implicitReturnType>;
|
|
202
216
|
futuresPrivateGetPosition(params?: {}): Promise<implicitReturnType>;
|
|
203
217
|
futuresPrivateGetPositions(params?: {}): Promise<implicitReturnType>;
|
|
@@ -206,20 +220,21 @@ interface kucoin {
|
|
|
206
220
|
futuresPrivateGetFundingHistory(params?: {}): Promise<implicitReturnType>;
|
|
207
221
|
futuresPrivateGetCopyTradeFuturesGetMaxOpenSize(params?: {}): Promise<implicitReturnType>;
|
|
208
222
|
futuresPrivateGetCopyTradeFuturesPositionMarginMaxWithdrawMargin(params?: {}): Promise<implicitReturnType>;
|
|
223
|
+
futuresPrivateGetHistoryPositions(params?: {}): Promise<implicitReturnType>;
|
|
224
|
+
futuresPrivateGetPositionGetMarginMode(params?: {}): Promise<implicitReturnType>;
|
|
225
|
+
futuresPrivateGetPositionGetPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
209
226
|
futuresPrivateGetDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
210
227
|
futuresPrivateGetDepositList(params?: {}): Promise<implicitReturnType>;
|
|
211
228
|
futuresPrivateGetWithdrawalsQuotas(params?: {}): Promise<implicitReturnType>;
|
|
212
229
|
futuresPrivateGetWithdrawalList(params?: {}): Promise<implicitReturnType>;
|
|
213
230
|
futuresPrivateGetSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
214
231
|
futuresPrivateGetTradeStatistics(params?: {}): Promise<implicitReturnType>;
|
|
215
|
-
futuresPrivateGetTradeFees(params?: {}): Promise<implicitReturnType>;
|
|
216
|
-
futuresPrivateGetHistoryPositions(params?: {}): Promise<implicitReturnType>;
|
|
217
232
|
futuresPrivateGetGetMaxOpenSize(params?: {}): Promise<implicitReturnType>;
|
|
218
233
|
futuresPrivateGetGetCrossUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
219
|
-
futuresPrivateGetPositionGetMarginMode(params?: {}): Promise<implicitReturnType>;
|
|
220
234
|
futuresPrivatePostTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
221
235
|
futuresPrivatePostTransferIn(params?: {}): Promise<implicitReturnType>;
|
|
222
236
|
futuresPrivatePostOrders(params?: {}): Promise<implicitReturnType>;
|
|
237
|
+
futuresPrivatePostStOrders(params?: {}): Promise<implicitReturnType>;
|
|
223
238
|
futuresPrivatePostOrdersTest(params?: {}): Promise<implicitReturnType>;
|
|
224
239
|
futuresPrivatePostOrdersMulti(params?: {}): Promise<implicitReturnType>;
|
|
225
240
|
futuresPrivatePostPositionMarginAutoDepositStatus(params?: {}): Promise<implicitReturnType>;
|
|
@@ -237,24 +252,23 @@ interface kucoin {
|
|
|
237
252
|
futuresPrivatePostCopyTradeFuturesPositionChangeCrossUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
238
253
|
futuresPrivatePostCopyTradeGetCrossModeMarginRequirement(params?: {}): Promise<implicitReturnType>;
|
|
239
254
|
futuresPrivatePostCopyTradePositionSwitchPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
240
|
-
|
|
255
|
+
futuresPrivatePostChangeCrossUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
241
256
|
futuresPrivatePostWithdrawals(params?: {}): Promise<implicitReturnType>;
|
|
242
|
-
futuresPrivatePostStOrders(params?: {}): Promise<implicitReturnType>;
|
|
243
257
|
futuresPrivatePostSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
244
258
|
futuresPrivatePostSubApiKeyUpdate(params?: {}): Promise<implicitReturnType>;
|
|
245
|
-
futuresPrivatePostChangeCrossUserLeverage(params?: {}): Promise<implicitReturnType>;
|
|
246
259
|
futuresPrivatePostPositionChangeMarginMode(params?: {}): Promise<implicitReturnType>;
|
|
247
260
|
futuresPrivatePostPositionSwitchPositionMode(params?: {}): Promise<implicitReturnType>;
|
|
261
|
+
futuresPrivatePostBulletPrivate(params?: {}): Promise<implicitReturnType>;
|
|
248
262
|
futuresPrivateDeleteOrdersOrderId(params?: {}): Promise<implicitReturnType>;
|
|
249
263
|
futuresPrivateDeleteOrdersClientOrderClientOid(params?: {}): Promise<implicitReturnType>;
|
|
250
264
|
futuresPrivateDeleteOrders(params?: {}): Promise<implicitReturnType>;
|
|
251
265
|
futuresPrivateDeleteStopOrders(params?: {}): Promise<implicitReturnType>;
|
|
252
266
|
futuresPrivateDeleteCopyTradeFuturesOrders(params?: {}): Promise<implicitReturnType>;
|
|
253
267
|
futuresPrivateDeleteCopyTradeFuturesOrdersClientOrder(params?: {}): Promise<implicitReturnType>;
|
|
268
|
+
futuresPrivateDeleteOrdersMultiCancel(params?: {}): Promise<implicitReturnType>;
|
|
254
269
|
futuresPrivateDeleteWithdrawalsWithdrawalId(params?: {}): Promise<implicitReturnType>;
|
|
255
270
|
futuresPrivateDeleteCancelTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
256
271
|
futuresPrivateDeleteSubApiKey(params?: {}): Promise<implicitReturnType>;
|
|
257
|
-
futuresPrivateDeleteOrdersMultiCancel(params?: {}): Promise<implicitReturnType>;
|
|
258
272
|
webExchangeGetCurrencyCurrencyChainInfo(params?: {}): Promise<implicitReturnType>;
|
|
259
273
|
webExchangeGetContractSymbolFundingRates(params?: {}): Promise<implicitReturnType>;
|
|
260
274
|
brokerGetBrokerNdInfo(params?: {}): Promise<implicitReturnType>;
|
|
@@ -287,7 +301,7 @@ interface kucoin {
|
|
|
287
301
|
earnDeleteEarnOrders(params?: {}): Promise<implicitReturnType>;
|
|
288
302
|
utaGetMarketAnnouncement(params?: {}): Promise<implicitReturnType>;
|
|
289
303
|
utaGetMarketCurrency(params?: {}): Promise<implicitReturnType>;
|
|
290
|
-
|
|
304
|
+
utaGetAssetCurrencies(params?: {}): Promise<implicitReturnType>;
|
|
291
305
|
utaGetMarketInstrument(params?: {}): Promise<implicitReturnType>;
|
|
292
306
|
utaGetMarketTicker(params?: {}): Promise<implicitReturnType>;
|
|
293
307
|
utaGetMarketTrade(params?: {}): Promise<implicitReturnType>;
|
|
@@ -306,6 +320,7 @@ interface kucoin {
|
|
|
306
320
|
utaPrivateGetAccountMode(params?: {}): Promise<implicitReturnType>;
|
|
307
321
|
utaPrivateGetAccountLedger(params?: {}): Promise<implicitReturnType>;
|
|
308
322
|
utaPrivateGetAccountInterestHistory(params?: {}): Promise<implicitReturnType>;
|
|
323
|
+
utaPrivateGetAssetDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
309
324
|
utaPrivateGetAccountDepositAddress(params?: {}): Promise<implicitReturnType>;
|
|
310
325
|
utaPrivateGetAccountModeAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
311
326
|
utaPrivateGetAccountModeAccountOverview(params?: {}): Promise<implicitReturnType>;
|
|
@@ -326,6 +341,7 @@ interface kucoin {
|
|
|
326
341
|
utaPrivatePostAccountModeOrderPlaceBatch(params?: {}): Promise<implicitReturnType>;
|
|
327
342
|
utaPrivatePostAccountModeOrderCancel(params?: {}): Promise<implicitReturnType>;
|
|
328
343
|
utaPrivatePostAccountModeOrderCancelBatch(params?: {}): Promise<implicitReturnType>;
|
|
344
|
+
utaPrivatePostAccountModeOrderCancelAll(params?: {}): Promise<implicitReturnType>;
|
|
329
345
|
utaPrivatePostSubAccountCanTransferOut(params?: {}): Promise<implicitReturnType>;
|
|
330
346
|
utaPrivatePostDcpSet(params?: {}): Promise<implicitReturnType>;
|
|
331
347
|
}
|
|
@@ -551,7 +551,7 @@ export default class Exchange {
|
|
|
551
551
|
parseToInt(number: any): number;
|
|
552
552
|
parseToNumeric(number: any): number;
|
|
553
553
|
isRoundNumber(value: number): boolean;
|
|
554
|
-
|
|
554
|
+
isEmptyString(value: any): boolean;
|
|
555
555
|
safeNumberOmitZero(obj: object, key: IndexType, defaultValue?: Num): Num;
|
|
556
556
|
safeIntegerOmitZero(obj: object, key: IndexType, defaultValue?: Int): Int;
|
|
557
557
|
afterConstruct(): void;
|
|
@@ -622,6 +622,7 @@ export default class Exchange {
|
|
|
622
622
|
parseFeeNumeric(fee: any): any;
|
|
623
623
|
findNearestCeiling(arr: number[], providedValue: number): number;
|
|
624
624
|
invertFlatStringDictionary(dict: any): {};
|
|
625
|
+
stringToBase16(str: any): string;
|
|
625
626
|
reduceFeesByCurrency(fees: any): any[];
|
|
626
627
|
safeTicker(ticker: Dict, market?: Market): Ticker;
|
|
627
628
|
fetchBorrowRate(code: string, amount: number, params?: {}): Promise<{}>;
|
|
@@ -632,6 +633,8 @@ export default class Exchange {
|
|
|
632
633
|
borrowMargin(code: string, amount: number, symbol?: Str, params?: {}): Promise<{}>;
|
|
633
634
|
repayMargin(code: string, amount: number, symbol?: Str, params?: {}): Promise<{}>;
|
|
634
635
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
636
|
+
fetchSpotOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
637
|
+
fetchContractOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
635
638
|
fetchOHLCVWs(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
636
639
|
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
637
640
|
convertTradingViewToOHLCV(ohlcvs: number[][], timestamp?: string, open?: string, high?: string, low?: string, close?: string, volume?: string, ms?: boolean): any[];
|
|
@@ -756,6 +759,8 @@ export default class Exchange {
|
|
|
756
759
|
fetchTickerWs(symbol: string, params?: {}): Promise<Ticker>;
|
|
757
760
|
watchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
758
761
|
fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
762
|
+
fetchSpotTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
763
|
+
fetchContractTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
759
764
|
fetchMarkPrices(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
760
765
|
fetchTickersWs(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
761
766
|
fetchOrderBooks(symbols?: Strings, limit?: Int, params?: {}): Promise<OrderBooks>;
|
|
@@ -804,9 +809,13 @@ export default class Exchange {
|
|
|
804
809
|
setTakeProfitAndStopLossParams(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, takeProfit?: Num, stopLoss?: Num, params?: {}): {};
|
|
805
810
|
createOrderWithTakeProfitAndStopLossWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, takeProfit?: Num, stopLoss?: Num, params?: {}): Promise<Order>;
|
|
806
811
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
812
|
+
createSpotOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
813
|
+
createContractOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
807
814
|
editOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
|
808
815
|
createOrderWs(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
809
816
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
817
|
+
cancelSpotOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
818
|
+
cancelContractOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
810
819
|
/**
|
|
811
820
|
* @method
|
|
812
821
|
* @name cancelOrderWithClientOrderId
|
|
@@ -831,6 +840,8 @@ export default class Exchange {
|
|
|
831
840
|
cancelOrdersWithClientOrderIds(clientOrderIds: string[], symbol?: Str, params?: {}): Promise<Order[]>;
|
|
832
841
|
cancelOrdersWs(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
|
|
833
842
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
843
|
+
cancelAllSpotOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
844
|
+
cancelAllContractOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
834
845
|
cancelAllOrdersAfter(timeout: Int, params?: {}): Promise<{}>;
|
|
835
846
|
cancelOrdersForSymbols(orders: CancellationRequest[], params?: {}): Promise<Order[]>;
|
|
836
847
|
cancelAllOrdersWs(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
@@ -867,6 +878,7 @@ export default class Exchange {
|
|
|
867
878
|
fetchL3OrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
868
879
|
parseLastPrice(price: any, market?: Market): LastPrice;
|
|
869
880
|
fetchDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
|
|
881
|
+
fetchContractDepositAddress(code: string, params?: {}): Promise<DepositAddress>;
|
|
870
882
|
account(): BalanceAccount;
|
|
871
883
|
commonCurrencyCode(code: string): string;
|
|
872
884
|
currency(code: string): CurrencyInterface;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -2855,8 +2855,8 @@ export default class Exchange {
|
|
|
2855
2855
|
const res = this.parseToNumeric((value % 1));
|
|
2856
2856
|
return res === 0;
|
|
2857
2857
|
}
|
|
2858
|
-
|
|
2859
|
-
return this.valueIsDefined(value)
|
|
2858
|
+
isEmptyString(value) {
|
|
2859
|
+
return !this.valueIsDefined(value) || value === '';
|
|
2860
2860
|
}
|
|
2861
2861
|
safeNumberOmitZero(obj, key, defaultValue = undefined) {
|
|
2862
2862
|
const value = this.safeString(obj, key);
|
|
@@ -4056,6 +4056,9 @@ export default class Exchange {
|
|
|
4056
4056
|
}
|
|
4057
4057
|
return reversed;
|
|
4058
4058
|
}
|
|
4059
|
+
stringToBase16(str) {
|
|
4060
|
+
return '0x' + this.binaryToBase16(this.base64ToBinary(this.stringToBase64(str)));
|
|
4061
|
+
}
|
|
4059
4062
|
reduceFeesByCurrency(fees) {
|
|
4060
4063
|
//
|
|
4061
4064
|
// this function takes a list of fee structures having the following format
|
|
@@ -4264,6 +4267,12 @@ export default class Exchange {
|
|
|
4264
4267
|
}
|
|
4265
4268
|
throw new NotSupported(this.id + ' fetchOHLCV() is not supported yet' + message);
|
|
4266
4269
|
}
|
|
4270
|
+
async fetchSpotOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
4271
|
+
throw new NotSupported(this.id + ' fetchSpotOHLCV() is not supported yet');
|
|
4272
|
+
}
|
|
4273
|
+
async fetchContractOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
4274
|
+
throw new NotSupported(this.id + ' fetchContractOHLCV() is not supported yet');
|
|
4275
|
+
}
|
|
4267
4276
|
async fetchOHLCVWs(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
4268
4277
|
let message = '';
|
|
4269
4278
|
if (this.has['fetchTradesWs']) {
|
|
@@ -5598,11 +5607,17 @@ export default class Exchange {
|
|
|
5598
5607
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
5599
5608
|
throw new NotSupported(this.id + ' fetchTickers() is not supported yet');
|
|
5600
5609
|
}
|
|
5610
|
+
async fetchSpotTickers(symbols = undefined, params = {}) {
|
|
5611
|
+
throw new NotSupported(this.id + ' fetchSpotTickers() is not supported yet');
|
|
5612
|
+
}
|
|
5613
|
+
async fetchContractTickers(symbols = undefined, params = {}) {
|
|
5614
|
+
throw new NotSupported(this.id + ' fetchContractTickers() is not supported yet');
|
|
5615
|
+
}
|
|
5601
5616
|
async fetchMarkPrices(symbols = undefined, params = {}) {
|
|
5602
5617
|
throw new NotSupported(this.id + ' fetchMarkPrices() is not supported yet');
|
|
5603
5618
|
}
|
|
5604
5619
|
async fetchTickersWs(symbols = undefined, params = {}) {
|
|
5605
|
-
throw new NotSupported(this.id + '
|
|
5620
|
+
throw new NotSupported(this.id + ' fetchTickersWs() is not supported yet');
|
|
5606
5621
|
}
|
|
5607
5622
|
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
5608
5623
|
throw new NotSupported(this.id + ' fetchOrderBooks() is not supported yet');
|
|
@@ -6107,6 +6122,12 @@ export default class Exchange {
|
|
|
6107
6122
|
async createOrders(orders, params = {}) {
|
|
6108
6123
|
throw new NotSupported(this.id + ' createOrders() is not supported yet');
|
|
6109
6124
|
}
|
|
6125
|
+
async createSpotOrders(orders, params = {}) {
|
|
6126
|
+
throw new NotSupported(this.id + ' createSpotOrders() is not supported yet');
|
|
6127
|
+
}
|
|
6128
|
+
async createContractOrders(orders, params = {}) {
|
|
6129
|
+
throw new NotSupported(this.id + ' createContractOrders() is not supported yet');
|
|
6130
|
+
}
|
|
6110
6131
|
async editOrders(orders, params = {}) {
|
|
6111
6132
|
throw new NotSupported(this.id + ' editOrders() is not supported yet');
|
|
6112
6133
|
}
|
|
@@ -6116,6 +6137,12 @@ export default class Exchange {
|
|
|
6116
6137
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
6117
6138
|
throw new NotSupported(this.id + ' cancelOrder() is not supported yet');
|
|
6118
6139
|
}
|
|
6140
|
+
async cancelSpotOrder(id, symbol = undefined, params = {}) {
|
|
6141
|
+
throw new NotSupported(this.id + ' cancelSpotOrder() is not supported yet');
|
|
6142
|
+
}
|
|
6143
|
+
async cancelContractOrder(id, symbol = undefined, params = {}) {
|
|
6144
|
+
throw new NotSupported(this.id + ' cancelContractOrder() is not supported yet');
|
|
6145
|
+
}
|
|
6119
6146
|
/**
|
|
6120
6147
|
* @method
|
|
6121
6148
|
* @name cancelOrderWithClientOrderId
|
|
@@ -6154,6 +6181,12 @@ export default class Exchange {
|
|
|
6154
6181
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
6155
6182
|
throw new NotSupported(this.id + ' cancelAllOrders() is not supported yet');
|
|
6156
6183
|
}
|
|
6184
|
+
async cancelAllSpotOrders(symbol = undefined, params = {}) {
|
|
6185
|
+
throw new NotSupported(this.id + ' cancelAllSpotOrders() is not supported yet');
|
|
6186
|
+
}
|
|
6187
|
+
async cancelAllContractOrders(symbol = undefined, params = {}) {
|
|
6188
|
+
throw new NotSupported(this.id + ' cancelAllContractOrders() is not supported yet');
|
|
6189
|
+
}
|
|
6157
6190
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
6158
6191
|
throw new NotSupported(this.id + ' cancelAllOrdersAfter() is not supported yet');
|
|
6159
6192
|
}
|
|
@@ -6316,6 +6349,9 @@ export default class Exchange {
|
|
|
6316
6349
|
throw new NotSupported(this.id + ' fetchDepositAddress() is not supported yet');
|
|
6317
6350
|
}
|
|
6318
6351
|
}
|
|
6352
|
+
async fetchContractDepositAddress(code, params = {}) {
|
|
6353
|
+
throw new NotSupported(this.id + ' fetchContractDepositAddress() is not supported yet');
|
|
6354
|
+
}
|
|
6319
6355
|
account() {
|
|
6320
6356
|
return {
|
|
6321
6357
|
'free': undefined,
|
|
@@ -6,8 +6,8 @@ import { serialize } from '../../static_dependencies/messagepack/msgpack.js';
|
|
|
6
6
|
import qs from '../../static_dependencies/qs/index.js';
|
|
7
7
|
/* ------------------------------------------------------------------------ */
|
|
8
8
|
const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedObject = (object) => ((typeof object === 'string') &&
|
|
9
|
-
(object.length >= 2) &&
|
|
10
|
-
((object[0] === '{') || (object[0] === '['))), binaryToString = utf8.encode, stringToBinary = utf8.decode, stringToBase64 = (string) => base64.encode(utf8.decode(string)), base64ToString = (string) => utf8.encode(base64.decode(string)), base64ToBinary = base64.decode, binaryToBase64 = base64.encode, base16ToBinary = base16.decode, binaryToBase16 = base16.encode, base58ToBinary = base58.decode, binaryToBase58 = base58.encode, binaryConcat = concatBytes, binaryConcatArray = (arr) => concatBytes(...arr), urlencode = (object, sort = false) => qs.stringify(object), urlencodeNested = (object) => qs.stringify(object) // implemented only in python
|
|
9
|
+
// (object.length >= 2) && // commented: https://github.com/ccxt/ccxt/pull/28193
|
|
10
|
+
((object[0] === '{') || (object[0] === '['))), binaryToString = utf8.encode, stringToBinary = utf8.decode, stringToBase64 = (string) => base64.encode(utf8.decode(string)), base64ToString = (string) => utf8.encode(base64.decode(string)), base64ToBinary = base64.decode, binaryToBase64 = base64.encode, base16ToBinary = base16.decode, binaryToBase16 = base16.encode, base58ToBinary = base58.decode, binaryToBase58 = base58.encode, binaryConcat = concatBytes, binaryConcatArray = (arr) => concatBytes(...arr), urlencode = (object, sort = false) => qs.stringify(object), urlencodeNested = (object) => qs.stringify(object, { encodeValuesOnly: true }) // implemented only in python
|
|
11
11
|
, urlencodeWithArrayRepeat = (object) => qs.stringify(object, { arrayFormat: 'repeat' }), rawencode = (object, sort = false) => qs.stringify(object, { encode: false }), encode = utf8.decode // lol
|
|
12
12
|
, decode = utf8.encode
|
|
13
13
|
// Url-safe-base64 without equals signs, with + replaced by - and slashes replaced by underscores
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ----------------------------------------------------------------------------
|
|
2
|
-
import { isNumber, isArray } from './type.js';
|
|
2
|
+
import { isNumber, isDictionary, isArray } from './type.js';
|
|
3
3
|
// ----------------------------------------------------------------------------
|
|
4
4
|
const keys = Object.keys; // eslint-disable-line padding-line-between-statements
|
|
5
5
|
const values = (x) => ((!isArray(x)) ? Object.values(x) : x); // don't copy arrays if they're already arrays
|
|
@@ -14,10 +14,16 @@ const arrayConcat = (a, b) => a.concat(b);
|
|
|
14
14
|
const inArray = (needle, haystack) => haystack.includes(needle);
|
|
15
15
|
const toArray = (object) => Object.values(object);
|
|
16
16
|
const isEmpty = (object) => {
|
|
17
|
-
if (
|
|
17
|
+
if (object === null || object === undefined) {
|
|
18
18
|
return true;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
if (Array.isArray(object)) {
|
|
21
|
+
return object.length < 1;
|
|
22
|
+
}
|
|
23
|
+
if (isDictionary(object)) {
|
|
24
|
+
return Object.keys(object).length < 1;
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
21
27
|
};
|
|
22
28
|
const keysort = (x, out = {}) => {
|
|
23
29
|
for (const k of keys(x).sort()) {
|
package/js/src/binance.js
CHANGED
|
@@ -1379,8 +1379,11 @@ export default class binance extends Exchange {
|
|
|
1379
1379
|
},
|
|
1380
1380
|
'networks': {
|
|
1381
1381
|
'ERC20': 'ETH',
|
|
1382
|
+
'ETH': 'ETH',
|
|
1382
1383
|
'TRC20': 'TRX',
|
|
1384
|
+
'TRX': 'TRX',
|
|
1383
1385
|
'BEP2': 'BNB',
|
|
1386
|
+
'BSC': 'BSC',
|
|
1384
1387
|
'BEP20': 'BSC',
|
|
1385
1388
|
'EOS': 'EOS',
|
|
1386
1389
|
'SPL': 'SOL',
|
|
@@ -1393,6 +1396,7 @@ export default class binance extends Exchange {
|
|
|
1393
1396
|
'MATIC': 'MATIC',
|
|
1394
1397
|
'BASE': 'BASE',
|
|
1395
1398
|
'SUI': 'SUI',
|
|
1399
|
+
'OP': 'OPTIMISM',
|
|
1396
1400
|
'OPTIMISM': 'OPTIMISM',
|
|
1397
1401
|
'NEAR': 'NEAR',
|
|
1398
1402
|
'APT': 'APT',
|
|
@@ -1438,7 +1442,11 @@ export default class binance extends Exchange {
|
|
|
1438
1442
|
'ONT': 'ONT', // ontology
|
|
1439
1443
|
},
|
|
1440
1444
|
'networksById': {
|
|
1441
|
-
'
|
|
1445
|
+
'TRX': 'TRC20',
|
|
1446
|
+
'BSC': 'BEP20',
|
|
1447
|
+
'ETH': 'ERC20',
|
|
1448
|
+
'SOL': 'SOL',
|
|
1449
|
+
'OPTIMISM': 'OP',
|
|
1442
1450
|
},
|
|
1443
1451
|
'impliedNetworks': {
|
|
1444
1452
|
'ETH': { 'ERC20': 'ETH' },
|
|
@@ -8959,7 +8967,8 @@ export default class binance extends Exchange {
|
|
|
8959
8967
|
if (internalInteger !== undefined) {
|
|
8960
8968
|
internal = (internalInteger !== 0) ? true : false;
|
|
8961
8969
|
}
|
|
8962
|
-
const
|
|
8970
|
+
const networkId = this.safeString(transaction, 'network');
|
|
8971
|
+
const network = this.networkIdToCode(networkId, code);
|
|
8963
8972
|
return {
|
|
8964
8973
|
'info': transaction,
|
|
8965
8974
|
'id': id,
|
package/js/src/bitget.js
CHANGED
|
@@ -1452,7 +1452,9 @@ export default class bitget extends Exchange {
|
|
|
1452
1452
|
'20003': ExchangeError,
|
|
1453
1453
|
'01001': ExchangeError,
|
|
1454
1454
|
'40024': RestrictedLocation,
|
|
1455
|
-
'
|
|
1455
|
+
'41117': InvalidOrder,
|
|
1456
|
+
'43111': PermissionDenied,
|
|
1457
|
+
'45113': InvalidOrder, // {"code":"45113","msg":"Maximum order value limit triggered","requestTime":1774884278712,"data":null}
|
|
1456
1458
|
},
|
|
1457
1459
|
'broad': {
|
|
1458
1460
|
'invalid size, valid range': ExchangeError,
|