ccxt 4.4.22 → 4.4.23

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.
Files changed (48) hide show
  1. package/README.md +112 -111
  2. package/dist/ccxt.browser.min.js +4 -4
  3. package/dist/cjs/ccxt.js +6 -1
  4. package/dist/cjs/src/abstract/coincatch.js +9 -0
  5. package/dist/cjs/src/binance.js +69 -44
  6. package/dist/cjs/src/bitfinex.js +4 -0
  7. package/dist/cjs/src/bitflyer.js +1 -0
  8. package/dist/cjs/src/bitrue.js +3 -0
  9. package/dist/cjs/src/bybit.js +2 -2
  10. package/dist/cjs/src/cex.js +4 -0
  11. package/dist/cjs/src/coinbase.js +1 -1
  12. package/dist/cjs/src/coinbaseexchange.js +3 -0
  13. package/dist/cjs/src/coincatch.js +5370 -0
  14. package/dist/cjs/src/coinex.js +63 -1
  15. package/dist/cjs/src/latoken.js +6 -0
  16. package/dist/cjs/src/mexc.js +1 -1
  17. package/dist/cjs/src/oceanex.js +2 -0
  18. package/dist/cjs/src/okcoin.js +1 -0
  19. package/dist/cjs/src/poloniex.js +5 -0
  20. package/dist/cjs/src/pro/coincatch.js +1554 -0
  21. package/js/ccxt.d.ts +8 -2
  22. package/js/ccxt.js +6 -2
  23. package/js/src/abstract/binance.d.ts +21 -0
  24. package/js/src/abstract/binancecoinm.d.ts +21 -0
  25. package/js/src/abstract/binanceus.d.ts +21 -0
  26. package/js/src/abstract/binanceusdm.d.ts +21 -0
  27. package/js/src/abstract/coincatch.d.ts +97 -0
  28. package/js/src/abstract/coincatch.js +11 -0
  29. package/js/src/binance.js +69 -44
  30. package/js/src/bitfinex.js +4 -0
  31. package/js/src/bitflyer.js +1 -0
  32. package/js/src/bitrue.js +3 -0
  33. package/js/src/bybit.js +2 -2
  34. package/js/src/cex.js +4 -0
  35. package/js/src/coinbase.js +1 -1
  36. package/js/src/coinbaseexchange.js +3 -0
  37. package/js/src/coincatch.d.ts +130 -0
  38. package/js/src/coincatch.js +5371 -0
  39. package/js/src/coinex.d.ts +1 -0
  40. package/js/src/coinex.js +63 -1
  41. package/js/src/latoken.js +6 -0
  42. package/js/src/mexc.js +1 -1
  43. package/js/src/oceanex.js +2 -0
  44. package/js/src/okcoin.js +1 -0
  45. package/js/src/poloniex.js +5 -0
  46. package/js/src/pro/coincatch.d.ts +57 -0
  47. package/js/src/pro/coincatch.js +1555 -0
  48. package/package.json +1 -1
package/dist/cjs/ccxt.js CHANGED
@@ -53,6 +53,7 @@ var coinbase = require('./src/coinbase.js');
53
53
  var coinbaseadvanced = require('./src/coinbaseadvanced.js');
54
54
  var coinbaseexchange = require('./src/coinbaseexchange.js');
55
55
  var coinbaseinternational = require('./src/coinbaseinternational.js');
56
+ var coincatch = require('./src/coincatch.js');
56
57
  var coincheck = require('./src/coincheck.js');
57
58
  var coinex = require('./src/coinex.js');
58
59
  var coinlist = require('./src/coinlist.js');
@@ -148,6 +149,7 @@ var coinbase$1 = require('./src/pro/coinbase.js');
148
149
  var coinbaseadvanced$1 = require('./src/pro/coinbaseadvanced.js');
149
150
  var coinbaseexchange$1 = require('./src/pro/coinbaseexchange.js');
150
151
  var coinbaseinternational$1 = require('./src/pro/coinbaseinternational.js');
152
+ var coincatch$1 = require('./src/pro/coincatch.js');
151
153
  var coincheck$1 = require('./src/pro/coincheck.js');
152
154
  var coinex$1 = require('./src/pro/coinex.js');
153
155
  var coinone$1 = require('./src/pro/coinone.js');
@@ -195,7 +197,7 @@ var xt$1 = require('./src/pro/xt.js');
195
197
 
196
198
  //-----------------------------------------------------------------------------
197
199
  // this is updated by vss.js when building
198
- const version = '4.4.22';
200
+ const version = '4.4.23';
199
201
  Exchange["default"].ccxtVersion = version;
200
202
  const exchanges = {
201
203
  'ace': ace,
@@ -239,6 +241,7 @@ const exchanges = {
239
241
  'coinbaseadvanced': coinbaseadvanced,
240
242
  'coinbaseexchange': coinbaseexchange,
241
243
  'coinbaseinternational': coinbaseinternational,
244
+ 'coincatch': coincatch,
242
245
  'coincheck': coincheck,
243
246
  'coinex': coinex,
244
247
  'coinlist': coinlist,
@@ -336,6 +339,7 @@ const pro = {
336
339
  'coinbaseadvanced': coinbaseadvanced$1,
337
340
  'coinbaseexchange': coinbaseexchange$1,
338
341
  'coinbaseinternational': coinbaseinternational$1,
342
+ 'coincatch': coincatch$1,
339
343
  'coincheck': coincheck$1,
340
344
  'coinex': coinex$1,
341
345
  'coinone': coinone$1,
@@ -472,6 +476,7 @@ exports.coinbase = coinbase;
472
476
  exports.coinbaseadvanced = coinbaseadvanced;
473
477
  exports.coinbaseexchange = coinbaseexchange;
474
478
  exports.coinbaseinternational = coinbaseinternational;
479
+ exports.coincatch = coincatch;
475
480
  exports.coincheck = coincheck;
476
481
  exports.coinex = coinex;
477
482
  exports.coinlist = coinlist;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var Exchange$1 = require('../base/Exchange.js');
4
+
5
+ // -------------------------------------------------------------------------------
6
+ class Exchange extends Exchange$1["default"] {
7
+ }
8
+
9
+ module.exports = Exchange;
@@ -471,6 +471,7 @@ class binance extends binance$1 {
471
471
  'portfolio/asset-index-price': 0.1,
472
472
  'portfolio/repay-futures-switch': 3,
473
473
  'portfolio/margin-asset-leverage': 5,
474
+ 'portfolio/balance': 2,
474
475
  // staking
475
476
  'staking/productList': 0.1,
476
477
  'staking/position': 0.1,
@@ -672,7 +673,8 @@ class binance extends binance$1 {
672
673
  'loan/flexible/repay/history': 40,
673
674
  'loan/flexible/ltv/adjustment/history': 40,
674
675
  'loan/flexible/loanable/data': 40,
675
- 'loan/flexible/collateral/data': 40, // Weight(IP): 400 => cost = 0.1 * 400 = 40
676
+ 'loan/flexible/collateral/data': 40,
677
+ 'portfolio/account': 2,
676
678
  },
677
679
  'post': {
678
680
  'eth-staking/eth/stake': 15,
@@ -750,6 +752,10 @@ class binance extends binance$1 {
750
752
  'commissionRate': 20,
751
753
  'income/asyn': 5,
752
754
  'income/asyn/id': 5,
755
+ 'trade/asyn': 0.5,
756
+ 'trade/asyn/id': 0.5,
757
+ 'order/asyn': 0.5,
758
+ 'order/asyn/id': 0.5,
753
759
  'pmExchangeInfo': 0.5,
754
760
  'pmAccountInfo': 0.5, // Weight(IP): 5 => cost = 0.1 * 5 = 0.5
755
761
  },
@@ -1028,8 +1034,12 @@ class binance extends binance$1 {
1028
1034
  },
1029
1035
  },
1030
1036
  'papi': {
1037
+ // IP (papi) request rate limit of 6000 per minute
1038
+ // 1 IP (papi) => cost = 0.2 => (1000 / (50 * 0.2)) * 60 = 6000
1039
+ // Order (papi) request rate limit of 1200 per minute
1040
+ // 1 Order (papi) => cost = 1 => (1000 / (50 * 1)) * 60 = 1200
1031
1041
  'get': {
1032
- 'ping': 1,
1042
+ 'ping': 0.2,
1033
1043
  'um/order': 1,
1034
1044
  'um/openOrder': 1,
1035
1045
  'um/openOrders': { 'cost': 1, 'noSymbol': 40 },
@@ -1041,72 +1051,87 @@ class binance extends binance$1 {
1041
1051
  'um/conditional/openOrder': 1,
1042
1052
  'um/conditional/openOrders': { 'cost': 1, 'noSymbol': 40 },
1043
1053
  'um/conditional/orderHistory': 1,
1044
- 'um/conditional/allOrders': 40,
1054
+ 'um/conditional/allOrders': { 'cost': 1, 'noSymbol': 40 },
1045
1055
  'cm/conditional/openOrder': 1,
1046
1056
  'cm/conditional/openOrders': { 'cost': 1, 'noSymbol': 40 },
1047
1057
  'cm/conditional/orderHistory': 1,
1048
1058
  'cm/conditional/allOrders': 40,
1049
- 'margin/order': 5,
1059
+ 'margin/order': 10,
1050
1060
  'margin/openOrders': 5,
1051
1061
  'margin/allOrders': 100,
1052
1062
  'margin/orderList': 5,
1053
1063
  'margin/allOrderList': 100,
1054
1064
  'margin/openOrderList': 5,
1055
1065
  'margin/myTrades': 5,
1056
- 'balance': 20,
1057
- 'account': 20,
1058
- 'margin/maxBorrowable': 5,
1059
- 'margin/maxWithdraw': 5,
1060
- 'um/positionRisk': 5,
1061
- 'cm/positionRisk': 1,
1062
- 'um/positionSide/dual': 30,
1063
- 'cm/positionSide/dual': 30,
1066
+ 'balance': 4,
1067
+ 'account': 4,
1068
+ 'margin/maxBorrowable': 1,
1069
+ 'margin/maxWithdraw': 1,
1070
+ 'um/positionRisk': 1,
1071
+ 'cm/positionRisk': 0.2,
1072
+ 'um/positionSide/dual': 6,
1073
+ 'cm/positionSide/dual': 6,
1064
1074
  'um/userTrades': 5,
1065
1075
  'cm/userTrades': 20,
1066
- 'um/leverageBracket': 1,
1067
- 'cm/leverageBracket': 1,
1076
+ 'um/leverageBracket': 0.2,
1077
+ 'cm/leverageBracket': 0.2,
1068
1078
  'margin/forceOrders': 1,
1069
- 'um/forceOrders': 20,
1070
- 'cm/forceOrders': 20,
1071
- 'um/apiTradingStatus': 1,
1072
- 'um/commissionRate': 20,
1073
- 'cm/commissionRate': 20,
1074
- 'margin/marginLoan': 10,
1075
- 'margin/repayLoan': 10,
1076
- 'margin/marginInterestHistory': 1,
1077
- 'portfolio/interest-history': 50,
1078
- 'um/income': 30,
1079
- 'cm/income': 30,
1080
- 'um/account': 5,
1081
- 'cm/account': 5,
1082
- 'repay-futures-switch': 3,
1079
+ 'um/forceOrders': { 'cost': 20, 'noSymbol': 50 },
1080
+ 'cm/forceOrders': { 'cost': 20, 'noSymbol': 50 },
1081
+ 'um/apiTradingStatus': { 'cost': 0.2, 'noSymbol': 2 },
1082
+ 'um/commissionRate': 4,
1083
+ 'cm/commissionRate': 4,
1084
+ 'margin/marginLoan': 2,
1085
+ 'margin/repayLoan': 2,
1086
+ 'margin/marginInterestHistory': 0.2,
1087
+ 'portfolio/interest-history': 10,
1088
+ 'um/income': 6,
1089
+ 'cm/income': 6,
1090
+ 'um/account': 1,
1091
+ 'cm/account': 1,
1092
+ 'repay-futures-switch': 6,
1083
1093
  'um/adlQuantile': 5,
1084
1094
  'cm/adlQuantile': 5,
1095
+ 'um/trade/asyn': 300,
1096
+ 'um/trade/asyn/id': 2,
1097
+ 'um/order/asyn/': 300,
1098
+ 'um/order/asyn/id': 2,
1099
+ 'um/income/asyn': 300,
1100
+ 'um/income/asyn/id': 2,
1101
+ 'um/orderAmendment': 1,
1102
+ 'cm/orderAmendment': 1,
1103
+ 'um/feeBurn': 30,
1104
+ 'um/accountConfig': 1,
1105
+ 'um/symbolConfig': 1,
1106
+ 'cm/accountConfig': 1,
1107
+ 'cm/symbolConfig': 1,
1085
1108
  },
1086
1109
  'post': {
1087
1110
  'um/order': 1,
1088
1111
  'um/conditional/order': 1,
1089
1112
  'cm/order': 1,
1090
1113
  'cm/conditional/order': 1,
1091
- 'margin/order': 0.0133,
1092
- 'marginLoan': 0.1333,
1093
- 'repayLoan': 0.1333,
1094
- 'margin/order/oco': 0.0400,
1095
- 'um/leverage': 1,
1096
- 'cm/leverage': 1,
1097
- 'um/positionSide/dual': 1,
1098
- 'cm/positionSide/dual': 1,
1099
- 'auto-collection': 0.6667,
1100
- 'bnb-transfer': 0.6667,
1114
+ 'margin/order': 1,
1115
+ 'marginLoan': 100,
1116
+ 'repayLoan': 100,
1117
+ 'margin/order/oco': 1,
1118
+ 'um/leverage': 0.2,
1119
+ 'cm/leverage': 0.2,
1120
+ 'um/positionSide/dual': 0.2,
1121
+ 'cm/positionSide/dual': 0.2,
1122
+ 'auto-collection': 150,
1123
+ 'bnb-transfer': 150,
1101
1124
  'repay-futures-switch': 150,
1102
1125
  'repay-futures-negative-balance': 150,
1103
- 'listenKey': 1,
1104
- 'asset-collection': 3,
1105
- 'margin/repay-debt': 0.4,
1126
+ 'listenKey': 0.2,
1127
+ 'asset-collection': 6,
1128
+ 'margin/repay-debt': 3000,
1106
1129
  'um/feeBurn': 1,
1107
1130
  },
1108
1131
  'put': {
1109
- 'listenKey': 1, // 1
1132
+ 'listenKey': 0.2,
1133
+ 'um/order': 1,
1134
+ 'cm/order': 1,
1110
1135
  },
1111
1136
  'delete': {
1112
1137
  'um/order': 1,
@@ -1117,10 +1142,10 @@ class binance extends binance$1 {
1117
1142
  'cm/conditional/order': 1,
1118
1143
  'cm/allOpenOrders': 1,
1119
1144
  'cm/conditional/allOpenOrders': 1,
1120
- 'margin/order': 1,
1145
+ 'margin/order': 2,
1121
1146
  'margin/allOpenOrders': 5,
1122
1147
  'margin/orderList': 2,
1123
- 'listenKey': 1, // 1
1148
+ 'listenKey': 0.2,
1124
1149
  },
1125
1150
  },
1126
1151
  },
@@ -44,6 +44,10 @@ class bitfinex extends bitfinex$1 {
44
44
  'fetchDepositsWithdrawals': true,
45
45
  'fetchDepositWithdrawFee': 'emulated',
46
46
  'fetchDepositWithdrawFees': true,
47
+ 'fetchFundingHistory': false,
48
+ 'fetchFundingRate': false,
49
+ 'fetchFundingRateHistory': false,
50
+ 'fetchFundingRates': false,
47
51
  'fetchIndexOHLCV': false,
48
52
  'fetchLeverageTiers': false,
49
53
  'fetchMarginMode': false,
@@ -36,6 +36,7 @@ class bitflyer extends bitflyer$1 {
36
36
  'fetchDeposits': true,
37
37
  'fetchFundingRate': true,
38
38
  'fetchFundingRateHistory': false,
39
+ 'fetchFundingRates': false,
39
40
  'fetchMarginMode': false,
40
41
  'fetchMarkets': true,
41
42
  'fetchMyTrades': true,
@@ -52,7 +52,10 @@ class bitrue extends bitrue$1 {
52
52
  'fetchDepositsWithdrawals': false,
53
53
  'fetchDepositWithdrawFee': 'emulated',
54
54
  'fetchDepositWithdrawFees': true,
55
+ 'fetchFundingHistory': false,
55
56
  'fetchFundingRate': false,
57
+ 'fetchFundingRateHistory': false,
58
+ 'fetchFundingRates': false,
56
59
  'fetchIsolatedBorrowRate': false,
57
60
  'fetchIsolatedBorrowRates': false,
58
61
  'fetchMarginMode': false,
@@ -7644,13 +7644,13 @@ class bybit extends bybit$1 {
7644
7644
  }
7645
7645
  parseMarginLoan(info, currency = undefined) {
7646
7646
  //
7647
- // borrowMargin
7647
+ // borrowCrossMargin
7648
7648
  //
7649
7649
  // {
7650
7650
  // "transactId": "14143"
7651
7651
  // }
7652
7652
  //
7653
- // repayMargin
7653
+ // repayCrossMargin
7654
7654
  //
7655
7655
  // {
7656
7656
  // "repayId": "12128"
@@ -36,6 +36,10 @@ class cex extends cex$1 {
36
36
  'fetchCurrencies': true,
37
37
  'fetchDepositAddress': true,
38
38
  'fetchDepositsWithdrawals': true,
39
+ 'fetchFundingHistory': false,
40
+ 'fetchFundingRate': false,
41
+ 'fetchFundingRateHistory': false,
42
+ 'fetchFundingRates': false,
39
43
  'fetchLedger': true,
40
44
  'fetchMarkets': true,
41
45
  'fetchOHLCV': true,
@@ -3698,7 +3698,7 @@ class coinbase extends coinbase$1 {
3698
3698
  let paginate = false;
3699
3699
  [paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
3700
3700
  if (paginate) {
3701
- return await this.fetchPaginatedCallCursor('fetchMyTrades', symbol, since, limit, params, 'cursor', 'cursor', undefined, 100);
3701
+ return await this.fetchPaginatedCallCursor('fetchMyTrades', symbol, since, limit, params, 'cursor', 'cursor', undefined, 250);
3702
3702
  }
3703
3703
  let market = undefined;
3704
3704
  if (symbol !== undefined) {
@@ -42,7 +42,10 @@ class coinbaseexchange extends coinbaseexchange$1 {
42
42
  'fetchDepositAddress': false,
43
43
  'fetchDeposits': true,
44
44
  'fetchDepositsWithdrawals': true,
45
+ 'fetchFundingHistory': false,
45
46
  'fetchFundingRate': false,
47
+ 'fetchFundingRateHistory': false,
48
+ 'fetchFundingRates': false,
46
49
  'fetchLedger': true,
47
50
  'fetchMarginMode': false,
48
51
  'fetchMarkets': true,