ccxt 4.0.78 → 4.0.79
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 +3 -3
- package/dist/ccxt.browser.js +143 -146
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/binance.js +78 -67
- package/dist/cjs/src/bithumb.js +1 -1
- package/dist/cjs/src/mexc.js +1 -0
- package/dist/cjs/src/phemex.js +8 -3
- package/dist/cjs/src/poloniex.js +54 -74
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +12 -1
- package/js/src/abstract/binancecoinm.d.ts +12 -1
- package/js/src/abstract/binanceus.d.ts +12 -1
- package/js/src/abstract/binanceusdm.d.ts +12 -1
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/abstract/mexc3.d.ts +1 -0
- package/js/src/binance.js +78 -67
- package/js/src/bithumb.js +1 -1
- package/js/src/mexc.js +1 -0
- package/js/src/phemex.js +8 -3
- package/js/src/poloniex.js +54 -74
- package/package.json +1 -1
|
@@ -47,6 +47,7 @@ interface binance {
|
|
|
47
47
|
sapiGetMarginExchangeSmallLiability(params?: {}): Promise<implicitReturnType>;
|
|
48
48
|
sapiGetMarginExchangeSmallLiabilityHistory(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
sapiGetMarginNextHourlyInterestRate(params?: {}): Promise<implicitReturnType>;
|
|
50
|
+
sapiGetMarginDelistSchedule(params?: {}): Promise<implicitReturnType>;
|
|
50
51
|
sapiGetLoanVipLoanableData(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
sapiGetLoanVipCollateralData(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
sapiGetLoanVipRequestData(params?: {}): Promise<implicitReturnType>;
|
|
@@ -98,7 +99,8 @@ interface binance {
|
|
|
98
99
|
sapiGetSubAccountTransferSubUserHistory(params?: {}): Promise<implicitReturnType>;
|
|
99
100
|
sapiGetSubAccountUniversalTransfer(params?: {}): Promise<implicitReturnType>;
|
|
100
101
|
sapiGetSubAccountApiRestrictionsIpRestrictionThirdPartyList(params?: {}): Promise<implicitReturnType>;
|
|
101
|
-
|
|
102
|
+
sapiGetSubAccountTransactionStatistics(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
sapiGetSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
|
|
102
104
|
sapiGetManagedSubaccountAsset(params?: {}): Promise<implicitReturnType>;
|
|
103
105
|
sapiGetManagedSubaccountAccountSnapshot(params?: {}): Promise<implicitReturnType>;
|
|
104
106
|
sapiGetManagedSubaccountQueryTransLogForInvestor(params?: {}): Promise<implicitReturnType>;
|
|
@@ -174,6 +176,9 @@ interface binance {
|
|
|
174
176
|
sapiGetGiftcardVerify(params?: {}): Promise<implicitReturnType>;
|
|
175
177
|
sapiGetGiftcardCryptographyRsaPublicKey(params?: {}): Promise<implicitReturnType>;
|
|
176
178
|
sapiGetGiftcardBuyCodeTokenLimit(params?: {}): Promise<implicitReturnType>;
|
|
179
|
+
sapiGetAlgoSpotOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
180
|
+
sapiGetAlgoSpotHistoricalOrders(params?: {}): Promise<implicitReturnType>;
|
|
181
|
+
sapiGetAlgoSpotSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
177
182
|
sapiGetAlgoFuturesOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
178
183
|
sapiGetAlgoFuturesHistoricalOrders(params?: {}): Promise<implicitReturnType>;
|
|
179
184
|
sapiGetAlgoFuturesSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -282,6 +287,7 @@ interface binance {
|
|
|
282
287
|
sapiPostGiftcardCreateCode(params?: {}): Promise<implicitReturnType>;
|
|
283
288
|
sapiPostGiftcardRedeemCode(params?: {}): Promise<implicitReturnType>;
|
|
284
289
|
sapiPostGiftcardBuyCode(params?: {}): Promise<implicitReturnType>;
|
|
290
|
+
sapiPostAlgoSpotNewOrderTwap(params?: {}): Promise<implicitReturnType>;
|
|
285
291
|
sapiPostAlgoFuturesNewOrderVp(params?: {}): Promise<implicitReturnType>;
|
|
286
292
|
sapiPostAlgoFuturesNewOrderTwap(params?: {}): Promise<implicitReturnType>;
|
|
287
293
|
sapiPostStakingPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -321,9 +327,12 @@ interface binance {
|
|
|
321
327
|
sapiDeleteUserDataStreamIsolated(params?: {}): Promise<implicitReturnType>;
|
|
322
328
|
sapiDeleteBrokerSubAccountApi(params?: {}): Promise<implicitReturnType>;
|
|
323
329
|
sapiDeleteBrokerSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
|
|
330
|
+
sapiDeleteAlgoSpotOrder(params?: {}): Promise<implicitReturnType>;
|
|
324
331
|
sapiDeleteAlgoFuturesOrder(params?: {}): Promise<implicitReturnType>;
|
|
332
|
+
sapiDeleteSubAccountSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
|
|
325
333
|
sapiV2GetSubAccountFuturesAccount(params?: {}): Promise<implicitReturnType>;
|
|
326
334
|
sapiV2GetSubAccountFuturesPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
335
|
+
sapiV2PostSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
|
|
327
336
|
sapiV3GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
|
|
328
337
|
sapiV3PostAssetGetUserAsset(params?: {}): Promise<implicitReturnType>;
|
|
329
338
|
sapiV4GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
|
|
@@ -518,10 +527,12 @@ interface binance {
|
|
|
518
527
|
publicGetAggTrades(params?: {}): Promise<implicitReturnType>;
|
|
519
528
|
publicGetHistoricalTrades(params?: {}): Promise<implicitReturnType>;
|
|
520
529
|
publicGetKlines(params?: {}): Promise<implicitReturnType>;
|
|
530
|
+
publicGetUiKlines(params?: {}): Promise<implicitReturnType>;
|
|
521
531
|
publicGetTicker24hr(params?: {}): Promise<implicitReturnType>;
|
|
522
532
|
publicGetTickerPrice(params?: {}): Promise<implicitReturnType>;
|
|
523
533
|
publicGetTickerBookTicker(params?: {}): Promise<implicitReturnType>;
|
|
524
534
|
publicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
535
|
+
publicGetAvgPrice(params?: {}): Promise<implicitReturnType>;
|
|
525
536
|
publicPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
526
537
|
publicPostUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
527
538
|
publicDeleteUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
@@ -47,6 +47,7 @@ interface binance {
|
|
|
47
47
|
sapiGetMarginExchangeSmallLiability(params?: {}): Promise<implicitReturnType>;
|
|
48
48
|
sapiGetMarginExchangeSmallLiabilityHistory(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
sapiGetMarginNextHourlyInterestRate(params?: {}): Promise<implicitReturnType>;
|
|
50
|
+
sapiGetMarginDelistSchedule(params?: {}): Promise<implicitReturnType>;
|
|
50
51
|
sapiGetLoanVipLoanableData(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
sapiGetLoanVipCollateralData(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
sapiGetLoanVipRequestData(params?: {}): Promise<implicitReturnType>;
|
|
@@ -98,7 +99,8 @@ interface binance {
|
|
|
98
99
|
sapiGetSubAccountTransferSubUserHistory(params?: {}): Promise<implicitReturnType>;
|
|
99
100
|
sapiGetSubAccountUniversalTransfer(params?: {}): Promise<implicitReturnType>;
|
|
100
101
|
sapiGetSubAccountApiRestrictionsIpRestrictionThirdPartyList(params?: {}): Promise<implicitReturnType>;
|
|
101
|
-
|
|
102
|
+
sapiGetSubAccountTransactionStatistics(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
sapiGetSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
|
|
102
104
|
sapiGetManagedSubaccountAsset(params?: {}): Promise<implicitReturnType>;
|
|
103
105
|
sapiGetManagedSubaccountAccountSnapshot(params?: {}): Promise<implicitReturnType>;
|
|
104
106
|
sapiGetManagedSubaccountQueryTransLogForInvestor(params?: {}): Promise<implicitReturnType>;
|
|
@@ -174,6 +176,9 @@ interface binance {
|
|
|
174
176
|
sapiGetGiftcardVerify(params?: {}): Promise<implicitReturnType>;
|
|
175
177
|
sapiGetGiftcardCryptographyRsaPublicKey(params?: {}): Promise<implicitReturnType>;
|
|
176
178
|
sapiGetGiftcardBuyCodeTokenLimit(params?: {}): Promise<implicitReturnType>;
|
|
179
|
+
sapiGetAlgoSpotOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
180
|
+
sapiGetAlgoSpotHistoricalOrders(params?: {}): Promise<implicitReturnType>;
|
|
181
|
+
sapiGetAlgoSpotSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
177
182
|
sapiGetAlgoFuturesOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
178
183
|
sapiGetAlgoFuturesHistoricalOrders(params?: {}): Promise<implicitReturnType>;
|
|
179
184
|
sapiGetAlgoFuturesSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -282,6 +287,7 @@ interface binance {
|
|
|
282
287
|
sapiPostGiftcardCreateCode(params?: {}): Promise<implicitReturnType>;
|
|
283
288
|
sapiPostGiftcardRedeemCode(params?: {}): Promise<implicitReturnType>;
|
|
284
289
|
sapiPostGiftcardBuyCode(params?: {}): Promise<implicitReturnType>;
|
|
290
|
+
sapiPostAlgoSpotNewOrderTwap(params?: {}): Promise<implicitReturnType>;
|
|
285
291
|
sapiPostAlgoFuturesNewOrderVp(params?: {}): Promise<implicitReturnType>;
|
|
286
292
|
sapiPostAlgoFuturesNewOrderTwap(params?: {}): Promise<implicitReturnType>;
|
|
287
293
|
sapiPostStakingPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -321,9 +327,12 @@ interface binance {
|
|
|
321
327
|
sapiDeleteUserDataStreamIsolated(params?: {}): Promise<implicitReturnType>;
|
|
322
328
|
sapiDeleteBrokerSubAccountApi(params?: {}): Promise<implicitReturnType>;
|
|
323
329
|
sapiDeleteBrokerSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
|
|
330
|
+
sapiDeleteAlgoSpotOrder(params?: {}): Promise<implicitReturnType>;
|
|
324
331
|
sapiDeleteAlgoFuturesOrder(params?: {}): Promise<implicitReturnType>;
|
|
332
|
+
sapiDeleteSubAccountSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
|
|
325
333
|
sapiV2GetSubAccountFuturesAccount(params?: {}): Promise<implicitReturnType>;
|
|
326
334
|
sapiV2GetSubAccountFuturesPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
335
|
+
sapiV2PostSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
|
|
327
336
|
sapiV3GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
|
|
328
337
|
sapiV3PostAssetGetUserAsset(params?: {}): Promise<implicitReturnType>;
|
|
329
338
|
sapiV4GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
|
|
@@ -518,10 +527,12 @@ interface binance {
|
|
|
518
527
|
publicGetAggTrades(params?: {}): Promise<implicitReturnType>;
|
|
519
528
|
publicGetHistoricalTrades(params?: {}): Promise<implicitReturnType>;
|
|
520
529
|
publicGetKlines(params?: {}): Promise<implicitReturnType>;
|
|
530
|
+
publicGetUiKlines(params?: {}): Promise<implicitReturnType>;
|
|
521
531
|
publicGetTicker24hr(params?: {}): Promise<implicitReturnType>;
|
|
522
532
|
publicGetTickerPrice(params?: {}): Promise<implicitReturnType>;
|
|
523
533
|
publicGetTickerBookTicker(params?: {}): Promise<implicitReturnType>;
|
|
524
534
|
publicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
535
|
+
publicGetAvgPrice(params?: {}): Promise<implicitReturnType>;
|
|
525
536
|
publicPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
526
537
|
publicPostUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
527
538
|
publicDeleteUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
@@ -47,6 +47,7 @@ interface binance {
|
|
|
47
47
|
sapiGetMarginExchangeSmallLiability(params?: {}): Promise<implicitReturnType>;
|
|
48
48
|
sapiGetMarginExchangeSmallLiabilityHistory(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
sapiGetMarginNextHourlyInterestRate(params?: {}): Promise<implicitReturnType>;
|
|
50
|
+
sapiGetMarginDelistSchedule(params?: {}): Promise<implicitReturnType>;
|
|
50
51
|
sapiGetLoanVipLoanableData(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
sapiGetLoanVipCollateralData(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
sapiGetLoanVipRequestData(params?: {}): Promise<implicitReturnType>;
|
|
@@ -98,7 +99,8 @@ interface binance {
|
|
|
98
99
|
sapiGetSubAccountTransferSubUserHistory(params?: {}): Promise<implicitReturnType>;
|
|
99
100
|
sapiGetSubAccountUniversalTransfer(params?: {}): Promise<implicitReturnType>;
|
|
100
101
|
sapiGetSubAccountApiRestrictionsIpRestrictionThirdPartyList(params?: {}): Promise<implicitReturnType>;
|
|
101
|
-
|
|
102
|
+
sapiGetSubAccountTransactionStatistics(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
sapiGetSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
|
|
102
104
|
sapiGetManagedSubaccountAsset(params?: {}): Promise<implicitReturnType>;
|
|
103
105
|
sapiGetManagedSubaccountAccountSnapshot(params?: {}): Promise<implicitReturnType>;
|
|
104
106
|
sapiGetManagedSubaccountQueryTransLogForInvestor(params?: {}): Promise<implicitReturnType>;
|
|
@@ -174,6 +176,9 @@ interface binance {
|
|
|
174
176
|
sapiGetGiftcardVerify(params?: {}): Promise<implicitReturnType>;
|
|
175
177
|
sapiGetGiftcardCryptographyRsaPublicKey(params?: {}): Promise<implicitReturnType>;
|
|
176
178
|
sapiGetGiftcardBuyCodeTokenLimit(params?: {}): Promise<implicitReturnType>;
|
|
179
|
+
sapiGetAlgoSpotOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
180
|
+
sapiGetAlgoSpotHistoricalOrders(params?: {}): Promise<implicitReturnType>;
|
|
181
|
+
sapiGetAlgoSpotSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
177
182
|
sapiGetAlgoFuturesOpenOrders(params?: {}): Promise<implicitReturnType>;
|
|
178
183
|
sapiGetAlgoFuturesHistoricalOrders(params?: {}): Promise<implicitReturnType>;
|
|
179
184
|
sapiGetAlgoFuturesSubOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -282,6 +287,7 @@ interface binance {
|
|
|
282
287
|
sapiPostGiftcardCreateCode(params?: {}): Promise<implicitReturnType>;
|
|
283
288
|
sapiPostGiftcardRedeemCode(params?: {}): Promise<implicitReturnType>;
|
|
284
289
|
sapiPostGiftcardBuyCode(params?: {}): Promise<implicitReturnType>;
|
|
290
|
+
sapiPostAlgoSpotNewOrderTwap(params?: {}): Promise<implicitReturnType>;
|
|
285
291
|
sapiPostAlgoFuturesNewOrderVp(params?: {}): Promise<implicitReturnType>;
|
|
286
292
|
sapiPostAlgoFuturesNewOrderTwap(params?: {}): Promise<implicitReturnType>;
|
|
287
293
|
sapiPostStakingPurchase(params?: {}): Promise<implicitReturnType>;
|
|
@@ -321,9 +327,12 @@ interface binance {
|
|
|
321
327
|
sapiDeleteUserDataStreamIsolated(params?: {}): Promise<implicitReturnType>;
|
|
322
328
|
sapiDeleteBrokerSubAccountApi(params?: {}): Promise<implicitReturnType>;
|
|
323
329
|
sapiDeleteBrokerSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
|
|
330
|
+
sapiDeleteAlgoSpotOrder(params?: {}): Promise<implicitReturnType>;
|
|
324
331
|
sapiDeleteAlgoFuturesOrder(params?: {}): Promise<implicitReturnType>;
|
|
332
|
+
sapiDeleteSubAccountSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
|
|
325
333
|
sapiV2GetSubAccountFuturesAccount(params?: {}): Promise<implicitReturnType>;
|
|
326
334
|
sapiV2GetSubAccountFuturesPositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
335
|
+
sapiV2PostSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
|
|
327
336
|
sapiV3GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
|
|
328
337
|
sapiV3PostAssetGetUserAsset(params?: {}): Promise<implicitReturnType>;
|
|
329
338
|
sapiV4GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
|
|
@@ -518,10 +527,12 @@ interface binance {
|
|
|
518
527
|
publicGetAggTrades(params?: {}): Promise<implicitReturnType>;
|
|
519
528
|
publicGetHistoricalTrades(params?: {}): Promise<implicitReturnType>;
|
|
520
529
|
publicGetKlines(params?: {}): Promise<implicitReturnType>;
|
|
530
|
+
publicGetUiKlines(params?: {}): Promise<implicitReturnType>;
|
|
521
531
|
publicGetTicker24hr(params?: {}): Promise<implicitReturnType>;
|
|
522
532
|
publicGetTickerPrice(params?: {}): Promise<implicitReturnType>;
|
|
523
533
|
publicGetTickerBookTicker(params?: {}): Promise<implicitReturnType>;
|
|
524
534
|
publicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
535
|
+
publicGetAvgPrice(params?: {}): Promise<implicitReturnType>;
|
|
525
536
|
publicPutUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
526
537
|
publicPostUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
527
538
|
publicDeleteUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
@@ -48,6 +48,7 @@ interface Exchange {
|
|
|
48
48
|
spotPrivateGetRebateDetail(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
spotPrivateGetRebateDetailKickback(params?: {}): Promise<implicitReturnType>;
|
|
50
50
|
spotPrivateGetRebateReferCode(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
spotPrivateGetRebateAffiliateCommission(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
spotPrivateGetMxDeductEnable(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
spotPrivateGetUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
spotPrivatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
@@ -48,6 +48,7 @@ interface mexc {
|
|
|
48
48
|
spotPrivateGetRebateDetail(params?: {}): Promise<implicitReturnType>;
|
|
49
49
|
spotPrivateGetRebateDetailKickback(params?: {}): Promise<implicitReturnType>;
|
|
50
50
|
spotPrivateGetRebateReferCode(params?: {}): Promise<implicitReturnType>;
|
|
51
|
+
spotPrivateGetRebateAffiliateCommission(params?: {}): Promise<implicitReturnType>;
|
|
51
52
|
spotPrivateGetMxDeductEnable(params?: {}): Promise<implicitReturnType>;
|
|
52
53
|
spotPrivateGetUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
53
54
|
spotPrivatePostOrder(params?: {}): Promise<implicitReturnType>;
|
package/js/src/binance.js
CHANGED
|
@@ -189,12 +189,11 @@ export default class binance extends Exchange {
|
|
|
189
189
|
'api': {
|
|
190
190
|
// the API structure below will need 3-layer apidefs
|
|
191
191
|
'sapi': {
|
|
192
|
-
// IP (api) = 1200 per minute => (rateLimit = 50)
|
|
193
192
|
// IP (sapi) request rate limit of 12 000 per minute
|
|
194
|
-
// 1 IP (sapi) => cost = 0.1
|
|
193
|
+
// 1 IP (sapi) => cost = 0.1 => (1000 / (50 * 0.1)) * 60 = 12000
|
|
195
194
|
// 10 IP (sapi) => cost = 1
|
|
196
195
|
// UID (sapi) request rate limit of 180 000 per minute
|
|
197
|
-
// 1 UID (sapi) => cost =
|
|
196
|
+
// 1 UID (sapi) => cost = 0.006667 => (1000 / (50 * 0.006667)) * 60 = 180000
|
|
198
197
|
'get': {
|
|
199
198
|
'system/status': 0.1,
|
|
200
199
|
// these endpoints require this.apiKey
|
|
@@ -210,7 +209,7 @@ export default class binance extends Exchange {
|
|
|
210
209
|
'asset/transfer': 0.1,
|
|
211
210
|
'asset/assetDetail': 0.1,
|
|
212
211
|
'asset/tradeFee': 0.1,
|
|
213
|
-
'asset/ledger-transfer/cloud-mining/queryByPage': 4,
|
|
212
|
+
'asset/ledger-transfer/cloud-mining/queryByPage': 4.0002,
|
|
214
213
|
'asset/convert-transfer/queryByPage': 0.033335,
|
|
215
214
|
'margin/loan': 1,
|
|
216
215
|
'margin/repay': 1,
|
|
@@ -239,15 +238,16 @@ export default class binance extends Exchange {
|
|
|
239
238
|
'margin/isolatedMarginTier': 0.1,
|
|
240
239
|
'margin/rateLimit/order': 2,
|
|
241
240
|
'margin/dribblet': 0.1,
|
|
242
|
-
'margin/dust': 20,
|
|
241
|
+
'margin/dust': 20.001,
|
|
243
242
|
'margin/crossMarginCollateralRatio': 10,
|
|
244
243
|
'margin/exchange-small-liability': 0.6667,
|
|
245
244
|
'margin/exchange-small-liability-history': 0.6667,
|
|
246
245
|
'margin/next-hourly-interest-rate': 0.6667,
|
|
246
|
+
'margin/delist-schedule': 0.6667,
|
|
247
247
|
'loan/vip/loanable/data': 40,
|
|
248
248
|
'loan/vip/collateral/data': 40,
|
|
249
|
-
'loan/vip/request/data':
|
|
250
|
-
'loan/income': 40,
|
|
249
|
+
'loan/vip/request/data': 2.6668,
|
|
250
|
+
'loan/income': 40.002,
|
|
251
251
|
'loan/ongoing/orders': 40,
|
|
252
252
|
'loan/ltv/adjustment/history': 40,
|
|
253
253
|
'loan/borrow/history': 40,
|
|
@@ -266,7 +266,7 @@ export default class binance extends Exchange {
|
|
|
266
266
|
'futures/loan/wallet': 1,
|
|
267
267
|
'futures/loan/adjustCollateral/history': 1,
|
|
268
268
|
'futures/loan/liquidationHistory': 1,
|
|
269
|
-
'rebate/taxQuery':
|
|
269
|
+
'rebate/taxQuery': 80.004,
|
|
270
270
|
// https://binance-docs.github.io/apidocs/spot/en/#withdraw-sapi
|
|
271
271
|
'capital/config/getall': 1,
|
|
272
272
|
'capital/deposit/address': 1,
|
|
@@ -275,7 +275,7 @@ export default class binance extends Exchange {
|
|
|
275
275
|
'capital/deposit/subHisrec': 0.1,
|
|
276
276
|
'capital/withdraw/history': 0.1,
|
|
277
277
|
'capital/contract/convertible-coins': 4.0002,
|
|
278
|
-
'convert/tradeFlow': 20.
|
|
278
|
+
'convert/tradeFlow': 20.001,
|
|
279
279
|
'convert/exchangeInfo': 50,
|
|
280
280
|
'convert/assetInfo': 10,
|
|
281
281
|
'convert/orderStatus': 0.6667,
|
|
@@ -283,7 +283,6 @@ export default class binance extends Exchange {
|
|
|
283
283
|
'account/apiTradingStatus': 0.1,
|
|
284
284
|
'account/apiRestrictions/ipRestriction': 0.1,
|
|
285
285
|
'bnbBurn': 0.1,
|
|
286
|
-
// 'sub-account/assets': 1, (v3 endpoint)
|
|
287
286
|
'sub-account/futures/account': 1,
|
|
288
287
|
'sub-account/futures/accountSummary': 0.1,
|
|
289
288
|
'sub-account/futures/positionRisk': 1,
|
|
@@ -297,15 +296,16 @@ export default class binance extends Exchange {
|
|
|
297
296
|
'sub-account/transfer/subUserHistory': 0.1,
|
|
298
297
|
'sub-account/universalTransfer': 0.1,
|
|
299
298
|
'sub-account/apiRestrictions/ipRestriction/thirdPartyList': 1,
|
|
300
|
-
'sub-account/transaction-
|
|
299
|
+
'sub-account/transaction-statistics': 0.40002,
|
|
300
|
+
'sub-account/subAccountApi/ipRestriction': 20.001,
|
|
301
301
|
'managed-subaccount/asset': 0.1,
|
|
302
302
|
'managed-subaccount/accountSnapshot': 240,
|
|
303
303
|
'managed-subaccount/queryTransLogForInvestor': 0.1,
|
|
304
|
-
'managed-subaccount/queryTransLogForTradeParent': 0.
|
|
305
|
-
'managed-subaccount/fetch-future-asset': 0.
|
|
304
|
+
'managed-subaccount/queryTransLogForTradeParent': 0.40002,
|
|
305
|
+
'managed-subaccount/fetch-future-asset': 0.40002,
|
|
306
306
|
'managed-subaccount/marginAsset': 0.1,
|
|
307
|
-
'managed-subaccount/info': 0.
|
|
308
|
-
'managed-subaccount/deposit/address': 0.
|
|
307
|
+
'managed-subaccount/info': 0.40002,
|
|
308
|
+
'managed-subaccount/deposit/address': 0.006667,
|
|
309
309
|
'managed-subaccount/query-trans-log': 0.40002,
|
|
310
310
|
// lending endpoints
|
|
311
311
|
'lending/daily/product/list': 0.1,
|
|
@@ -383,6 +383,9 @@ export default class binance extends Exchange {
|
|
|
383
383
|
'giftcard/verify': 0.1,
|
|
384
384
|
'giftcard/cryptography/rsa-public-key': 0.1,
|
|
385
385
|
'giftcard/buyCode/token-limit': 0.1,
|
|
386
|
+
'algo/spot/openOrders': 0.1,
|
|
387
|
+
'algo/spot/historicalOrders': 0.1,
|
|
388
|
+
'algo/spot/subOrders': 0.1,
|
|
386
389
|
'algo/futures/openOrders': 0.1,
|
|
387
390
|
'algo/futures/historicalOrders': 0.1,
|
|
388
391
|
'algo/futures/subOrders': 0.1,
|
|
@@ -424,9 +427,9 @@ export default class binance extends Exchange {
|
|
|
424
427
|
'simple-earn/flexible/history/collateralRecord': 0.1,
|
|
425
428
|
},
|
|
426
429
|
'post': {
|
|
427
|
-
'asset/dust':
|
|
430
|
+
'asset/dust': 0.06667,
|
|
428
431
|
'asset/dust-btc': 0.1,
|
|
429
|
-
'asset/transfer':
|
|
432
|
+
'asset/transfer': 6.0003,
|
|
430
433
|
'asset/get-funding-asset': 0.1,
|
|
431
434
|
'asset/convert-transfer': 0.033335,
|
|
432
435
|
'account/disableFastWithdrawSwitch': 0.1,
|
|
@@ -436,12 +439,12 @@ export default class binance extends Exchange {
|
|
|
436
439
|
'capital/withdraw/apply': 4.0002,
|
|
437
440
|
'capital/contract/convertible-coins': 4.0002,
|
|
438
441
|
'capital/deposit/credit-apply': 0.1,
|
|
439
|
-
'margin/transfer':
|
|
442
|
+
'margin/transfer': 4.0002,
|
|
440
443
|
'margin/loan': 20.001,
|
|
441
444
|
'margin/repay': 20.001,
|
|
442
445
|
'margin/order': 0.040002,
|
|
443
446
|
'margin/order/oco': 0.040002,
|
|
444
|
-
'margin/dust': 20,
|
|
447
|
+
'margin/dust': 20.001,
|
|
445
448
|
'margin/exchange-small-liability': 20.001,
|
|
446
449
|
// 'margin/isolated/create': 1, discontinued
|
|
447
450
|
'margin/isolated/transfer': 4.0002,
|
|
@@ -458,8 +461,6 @@ export default class binance extends Exchange {
|
|
|
458
461
|
'sub-account/transfer/subToMaster': 0.1,
|
|
459
462
|
'sub-account/universalTransfer': 0.1,
|
|
460
463
|
'sub-account/options/enable': 0.1,
|
|
461
|
-
// v2 not supported yet
|
|
462
|
-
// 'sub-account/subAccountApi/ipRestriction': 20,
|
|
463
464
|
'managed-subaccount/deposit': 0.1,
|
|
464
465
|
'managed-subaccount/withdraw': 0.1,
|
|
465
466
|
'userDataStream': 0.1,
|
|
@@ -505,6 +506,7 @@ export default class binance extends Exchange {
|
|
|
505
506
|
'giftcard/createCode': 0.1,
|
|
506
507
|
'giftcard/redeemCode': 0.1,
|
|
507
508
|
'giftcard/buyCode': 0.1,
|
|
509
|
+
'algo/spot/newOrderTwap': 20.001,
|
|
508
510
|
'algo/futures/newOrderVp': 20.001,
|
|
509
511
|
'algo/futures/newOrderTwap': 20.001,
|
|
510
512
|
// staking
|
|
@@ -512,14 +514,14 @@ export default class binance extends Exchange {
|
|
|
512
514
|
'staking/redeem': 0.1,
|
|
513
515
|
'staking/setAutoStaking': 0.1,
|
|
514
516
|
'portfolio/repay': 20.001,
|
|
515
|
-
'loan/vip/renew': 40,
|
|
516
|
-
'loan/vip/borrow': 40,
|
|
517
|
-
'loan/borrow': 40,
|
|
518
|
-
'loan/repay': 40,
|
|
519
|
-
'loan/adjust/ltv': 40,
|
|
520
|
-
'loan/customize/margin_call': 40,
|
|
521
|
-
'loan/vip/repay': 40,
|
|
522
|
-
'convert/getQuote':
|
|
517
|
+
'loan/vip/renew': 40.002,
|
|
518
|
+
'loan/vip/borrow': 40.002,
|
|
519
|
+
'loan/borrow': 40.002,
|
|
520
|
+
'loan/repay': 40.002,
|
|
521
|
+
'loan/adjust/ltv': 40.002,
|
|
522
|
+
'loan/customize/margin_call': 40.002,
|
|
523
|
+
'loan/vip/repay': 40.002,
|
|
524
|
+
'convert/getQuote': 1.3334,
|
|
523
525
|
'convert/acceptQuote': 3.3335,
|
|
524
526
|
'portfolio/auto-collection': 150,
|
|
525
527
|
'portfolio/asset-collection': 6,
|
|
@@ -544,15 +546,17 @@ export default class binance extends Exchange {
|
|
|
544
546
|
'delete': {
|
|
545
547
|
// 'account/apiRestrictions/ipRestriction/ipList': 1, discontinued
|
|
546
548
|
'margin/openOrders': 0.1,
|
|
547
|
-
'margin/order': 0.
|
|
548
|
-
'margin/orderList': 0.
|
|
549
|
+
'margin/order': 0.006667,
|
|
550
|
+
'margin/orderList': 0.006667,
|
|
549
551
|
'margin/isolated/account': 2.0001,
|
|
550
552
|
'userDataStream': 0.1,
|
|
551
553
|
'userDataStream/isolated': 0.1,
|
|
552
554
|
// brokerage API TODO NO MENTION OF RATELIMIT IN BROKERAGE DOCS
|
|
553
555
|
'broker/subAccountApi': 1,
|
|
554
556
|
'broker/subAccountApi/ipRestriction/ipList': 1,
|
|
557
|
+
'algo/spot/order': 0.1,
|
|
555
558
|
'algo/futures/order': 0.1,
|
|
559
|
+
'sub-account/subAccountApi/ipRestriction/ipList': 20.001, // Weight(UID): 3000 => cost = 0.006667 * 3000 = 20.001
|
|
556
560
|
},
|
|
557
561
|
},
|
|
558
562
|
'sapiV2': {
|
|
@@ -560,10 +564,13 @@ export default class binance extends Exchange {
|
|
|
560
564
|
'sub-account/futures/account': 0.1,
|
|
561
565
|
'sub-account/futures/positionRisk': 0.1,
|
|
562
566
|
},
|
|
567
|
+
'post': {
|
|
568
|
+
'sub-account/subAccountApi/ipRestriction': 20.001, // Weight(UID): 3000 => cost = 0.006667 * 3000 = 20.001
|
|
569
|
+
},
|
|
563
570
|
},
|
|
564
571
|
'sapiV3': {
|
|
565
572
|
'get': {
|
|
566
|
-
'sub-account/assets':
|
|
573
|
+
'sub-account/assets': 0.40002, // Weight(UID): 60 => cost = 0.006667 * 60 = 0.40002
|
|
567
574
|
},
|
|
568
575
|
'post': {
|
|
569
576
|
'asset/getUserAsset': 0.5,
|
|
@@ -571,7 +578,7 @@ export default class binance extends Exchange {
|
|
|
571
578
|
},
|
|
572
579
|
'sapiV4': {
|
|
573
580
|
'get': {
|
|
574
|
-
'sub-account/assets':
|
|
581
|
+
'sub-account/assets': 0.40002, // Weight(UID): 60 => cost = 0.006667 * 60 = 0.40002
|
|
575
582
|
},
|
|
576
583
|
},
|
|
577
584
|
// deprecated
|
|
@@ -826,55 +833,59 @@ export default class binance extends Exchange {
|
|
|
826
833
|
},
|
|
827
834
|
},
|
|
828
835
|
'public': {
|
|
836
|
+
// IP (api) request rate limit of 6000 per minute
|
|
837
|
+
// 1 IP (api) => cost = 0.2 => (1000 / (50 * 0.2)) * 60 = 6000
|
|
829
838
|
'get': {
|
|
830
|
-
'ping':
|
|
831
|
-
'time':
|
|
832
|
-
'depth': { 'cost':
|
|
833
|
-
'trades':
|
|
834
|
-
'aggTrades':
|
|
835
|
-
'historicalTrades':
|
|
836
|
-
'klines':
|
|
837
|
-
'
|
|
838
|
-
'ticker/
|
|
839
|
-
'ticker/
|
|
840
|
-
'
|
|
839
|
+
'ping': 0.2,
|
|
840
|
+
'time': 0.2,
|
|
841
|
+
'depth': { 'cost': 0.4, 'byLimit': [[100, 0.4], [500, 2], [1000, 4], [5000, 20]] },
|
|
842
|
+
'trades': 0.4,
|
|
843
|
+
'aggTrades': 0.4,
|
|
844
|
+
'historicalTrades': 2,
|
|
845
|
+
'klines': 0.4,
|
|
846
|
+
'uiKlines': 0.4,
|
|
847
|
+
'ticker/24hr': { 'cost': 0.4, 'noSymbol': 16 },
|
|
848
|
+
'ticker/price': { 'cost': 0.4, 'noSymbol': 0.8 },
|
|
849
|
+
'ticker/bookTicker': { 'cost': 0.4, 'noSymbol': 0.8 },
|
|
850
|
+
'exchangeInfo': 4,
|
|
851
|
+
'avgPrice': 0.4,
|
|
841
852
|
},
|
|
842
853
|
'put': {
|
|
843
|
-
'userDataStream':
|
|
854
|
+
'userDataStream': 0.4,
|
|
844
855
|
},
|
|
845
856
|
'post': {
|
|
846
|
-
'userDataStream':
|
|
857
|
+
'userDataStream': 0.4,
|
|
847
858
|
},
|
|
848
859
|
'delete': {
|
|
849
|
-
'userDataStream':
|
|
860
|
+
'userDataStream': 0.4,
|
|
850
861
|
},
|
|
851
862
|
},
|
|
852
863
|
'private': {
|
|
853
864
|
'get': {
|
|
854
|
-
'allOrderList':
|
|
855
|
-
'openOrderList':
|
|
856
|
-
'orderList':
|
|
857
|
-
'order':
|
|
858
|
-
'openOrders': { 'cost':
|
|
859
|
-
'allOrders':
|
|
860
|
-
'account':
|
|
861
|
-
'myTrades':
|
|
862
|
-
'rateLimit/order':
|
|
863
|
-
'myPreventedMatches':
|
|
864
|
-
'myAllocations':
|
|
865
|
+
'allOrderList': 4,
|
|
866
|
+
'openOrderList': 1.2,
|
|
867
|
+
'orderList': 0.8,
|
|
868
|
+
'order': 0.8,
|
|
869
|
+
'openOrders': { 'cost': 1.2, 'noSymbol': 16 },
|
|
870
|
+
'allOrders': 4,
|
|
871
|
+
'account': 4,
|
|
872
|
+
'myTrades': 4,
|
|
873
|
+
'rateLimit/order': 8,
|
|
874
|
+
'myPreventedMatches': 4,
|
|
875
|
+
'myAllocations': 4,
|
|
865
876
|
},
|
|
866
877
|
'post': {
|
|
867
|
-
'order/oco':
|
|
868
|
-
'sor/order':
|
|
869
|
-
'sor/order/test':
|
|
870
|
-
'order':
|
|
871
|
-
'order/cancelReplace':
|
|
872
|
-
'order/test':
|
|
878
|
+
'order/oco': 0.2,
|
|
879
|
+
'sor/order': 0.2,
|
|
880
|
+
'sor/order/test': 0.2,
|
|
881
|
+
'order': 0.2,
|
|
882
|
+
'order/cancelReplace': 0.2,
|
|
883
|
+
'order/test': 0.2,
|
|
873
884
|
},
|
|
874
885
|
'delete': {
|
|
875
|
-
'openOrders':
|
|
876
|
-
'orderList':
|
|
877
|
-
'order':
|
|
886
|
+
'openOrders': 0.2,
|
|
887
|
+
'orderList': 0.2,
|
|
888
|
+
'order': 0.2,
|
|
878
889
|
},
|
|
879
890
|
},
|
|
880
891
|
'papi': {
|
package/js/src/bithumb.js
CHANGED
|
@@ -636,7 +636,7 @@ export default class bithumb extends Exchange {
|
|
|
636
636
|
await this.loadMarkets();
|
|
637
637
|
const market = this.market(symbol);
|
|
638
638
|
const request = {
|
|
639
|
-
'currency': market['base'],
|
|
639
|
+
'currency': market['base'] + '_' + market['quote'],
|
|
640
640
|
};
|
|
641
641
|
if (limit !== undefined) {
|
|
642
642
|
request['count'] = limit; // default 20, max 100
|
package/js/src/mexc.js
CHANGED
package/js/src/phemex.js
CHANGED
|
@@ -1610,8 +1610,13 @@ export default class phemex extends Exchange {
|
|
|
1610
1610
|
id = this.safeString2(trade, 'execId', 'execID');
|
|
1611
1611
|
orderId = this.safeString(trade, 'orderID');
|
|
1612
1612
|
if (market['settle'] === 'USDT') {
|
|
1613
|
-
const sideId = this.
|
|
1614
|
-
|
|
1613
|
+
const sideId = this.safeStringLower(trade, 'side');
|
|
1614
|
+
if ((sideId === 'buy') || (sideId === 'sell')) {
|
|
1615
|
+
side = sideId;
|
|
1616
|
+
}
|
|
1617
|
+
else if (sideId !== undefined) {
|
|
1618
|
+
side = (sideId === '1') ? 'buy' : 'sell';
|
|
1619
|
+
}
|
|
1615
1620
|
const ordType = this.safeString(trade, 'ordType');
|
|
1616
1621
|
if (ordType === '1') {
|
|
1617
1622
|
type = 'market';
|
|
@@ -1619,7 +1624,7 @@ export default class phemex extends Exchange {
|
|
|
1619
1624
|
else if (ordType === '2') {
|
|
1620
1625
|
type = 'limit';
|
|
1621
1626
|
}
|
|
1622
|
-
priceString = this.safeString(trade, '
|
|
1627
|
+
priceString = this.safeString(trade, 'execPriceRp');
|
|
1623
1628
|
amountString = this.safeString(trade, 'execQtyRq');
|
|
1624
1629
|
costString = this.safeString(trade, 'execValueRv');
|
|
1625
1630
|
feeCostString = this.safeString(trade, 'execFeeRv');
|