ccxt 4.4.22 → 4.4.24
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 +6 -5
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +6 -1
- package/dist/cjs/src/abstract/coincatch.js +9 -0
- package/dist/cjs/src/base/Exchange.js +4 -3
- package/dist/cjs/src/binance.js +69 -44
- package/dist/cjs/src/bitfinex.js +4 -0
- package/dist/cjs/src/bitflyer.js +1 -0
- package/dist/cjs/src/bitrue.js +3 -0
- package/dist/cjs/src/bybit.js +43 -6
- package/dist/cjs/src/cex.js +4 -0
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbaseexchange.js +3 -0
- package/dist/cjs/src/coincatch.js +5370 -0
- package/dist/cjs/src/coinex.js +63 -1
- package/dist/cjs/src/gate.js +195 -59
- package/dist/cjs/src/hyperliquid.js +1 -1
- package/dist/cjs/src/kucoin.js +18 -8
- package/dist/cjs/src/latoken.js +6 -0
- package/dist/cjs/src/mexc.js +1 -1
- package/dist/cjs/src/oceanex.js +2 -0
- package/dist/cjs/src/okcoin.js +1 -0
- package/dist/cjs/src/poloniex.js +5 -0
- package/dist/cjs/src/pro/coincatch.js +1554 -0
- package/dist/cjs/src/pro/kucoin.js +2 -1
- package/dist/cjs/src/pro/onetrading.js +2 -1
- package/dist/cjs/src/yobit.js +1 -1
- package/js/ccxt.d.ts +8 -2
- package/js/ccxt.js +6 -2
- package/js/src/abstract/binance.d.ts +21 -0
- package/js/src/abstract/binancecoinm.d.ts +21 -0
- package/js/src/abstract/binanceus.d.ts +21 -0
- package/js/src/abstract/binanceusdm.d.ts +21 -0
- package/js/src/abstract/coincatch.d.ts +97 -0
- package/js/src/abstract/coincatch.js +11 -0
- package/js/src/abstract/kucoin.d.ts +1 -0
- package/js/src/abstract/kucoinfutures.d.ts +1 -0
- package/js/src/base/Exchange.js +4 -3
- package/js/src/binance.js +69 -44
- package/js/src/bitfinex.js +4 -0
- package/js/src/bitflyer.js +1 -0
- package/js/src/bitrue.js +3 -0
- package/js/src/bybit.js +43 -6
- package/js/src/cex.js +4 -0
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.js +3 -0
- package/js/src/coincatch.d.ts +130 -0
- package/js/src/coincatch.js +5371 -0
- package/js/src/coinex.d.ts +1 -0
- package/js/src/coinex.js +63 -1
- package/js/src/gate.d.ts +13 -1
- package/js/src/gate.js +195 -59
- package/js/src/hyperliquid.js +1 -1
- package/js/src/kucoin.js +18 -8
- package/js/src/latoken.js +6 -0
- package/js/src/mexc.js +1 -1
- package/js/src/oceanex.js +2 -0
- package/js/src/okcoin.js +1 -0
- package/js/src/poloniex.js +5 -0
- package/js/src/pro/coincatch.d.ts +57 -0
- package/js/src/pro/coincatch.js +1555 -0
- package/js/src/pro/kucoin.js +2 -1
- package/js/src/pro/onetrading.js +2 -1
- package/js/src/yobit.js +1 -1
- 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.
|
|
200
|
+
const version = '4.4.24';
|
|
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;
|
|
@@ -2632,9 +2632,10 @@ class Exchange {
|
|
|
2632
2632
|
const isTriggerOrSLTpOrder = ((this.safeString(order, 'triggerPrice') !== undefined || (this.safeString(order, 'stopLossPrice') !== undefined)) || (this.safeString(order, 'takeProfitPrice') !== undefined));
|
|
2633
2633
|
if (parseFilled || parseCost || shouldParseFees) {
|
|
2634
2634
|
const rawTrades = this.safeValue(order, 'trades', trades);
|
|
2635
|
-
const oldNumber = this.number;
|
|
2635
|
+
// const oldNumber = this.number;
|
|
2636
2636
|
// we parse trades as strings here!
|
|
2637
|
-
this
|
|
2637
|
+
// i don't think this is needed anymore
|
|
2638
|
+
// (this as any).number = String;
|
|
2638
2639
|
const firstTrade = this.safeValue(rawTrades, 0);
|
|
2639
2640
|
// parse trades if they haven't already been parsed
|
|
2640
2641
|
const tradesAreParsed = ((firstTrade !== undefined) && ('info' in firstTrade) && ('id' in firstTrade));
|
|
@@ -2644,7 +2645,7 @@ class Exchange {
|
|
|
2644
2645
|
else {
|
|
2645
2646
|
trades = rawTrades;
|
|
2646
2647
|
}
|
|
2647
|
-
this.number = oldNumber;
|
|
2648
|
+
// this.number = oldNumber; why parse trades as strings if you read the value using `safeString` ?
|
|
2648
2649
|
let tradesLength = 0;
|
|
2649
2650
|
const isArray = Array.isArray(trades);
|
|
2650
2651
|
if (isArray) {
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -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,
|
|
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':
|
|
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':
|
|
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':
|
|
1057
|
-
'account':
|
|
1058
|
-
'margin/maxBorrowable':
|
|
1059
|
-
'margin/maxWithdraw':
|
|
1060
|
-
'um/positionRisk':
|
|
1061
|
-
'cm/positionRisk':
|
|
1062
|
-
'um/positionSide/dual':
|
|
1063
|
-
'cm/positionSide/dual':
|
|
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':
|
|
1067
|
-
'cm/leverageBracket':
|
|
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':
|
|
1072
|
-
'um/commissionRate':
|
|
1073
|
-
'cm/commissionRate':
|
|
1074
|
-
'margin/marginLoan':
|
|
1075
|
-
'margin/repayLoan':
|
|
1076
|
-
'margin/marginInterestHistory':
|
|
1077
|
-
'portfolio/interest-history':
|
|
1078
|
-
'um/income':
|
|
1079
|
-
'cm/income':
|
|
1080
|
-
'um/account':
|
|
1081
|
-
'cm/account':
|
|
1082
|
-
'repay-futures-switch':
|
|
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':
|
|
1092
|
-
'marginLoan':
|
|
1093
|
-
'repayLoan':
|
|
1094
|
-
'margin/order/oco':
|
|
1095
|
-
'um/leverage':
|
|
1096
|
-
'cm/leverage':
|
|
1097
|
-
'um/positionSide/dual':
|
|
1098
|
-
'cm/positionSide/dual':
|
|
1099
|
-
'auto-collection':
|
|
1100
|
-
'bnb-transfer':
|
|
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':
|
|
1104
|
-
'asset-collection':
|
|
1105
|
-
'margin/repay-debt':
|
|
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':
|
|
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':
|
|
1145
|
+
'margin/order': 2,
|
|
1121
1146
|
'margin/allOpenOrders': 5,
|
|
1122
1147
|
'margin/orderList': 2,
|
|
1123
|
-
'listenKey':
|
|
1148
|
+
'listenKey': 0.2,
|
|
1124
1149
|
},
|
|
1125
1150
|
},
|
|
1126
1151
|
},
|
package/dist/cjs/src/bitfinex.js
CHANGED
|
@@ -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,
|
package/dist/cjs/src/bitflyer.js
CHANGED
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -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,
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -1010,6 +1010,7 @@ class bybit extends bybit$1 {
|
|
|
1010
1010
|
},
|
|
1011
1011
|
'enableUnifiedMargin': undefined,
|
|
1012
1012
|
'enableUnifiedAccount': undefined,
|
|
1013
|
+
'unifiedMarginStatus': undefined,
|
|
1013
1014
|
'createMarketBuyOrderRequiresPrice': true,
|
|
1014
1015
|
'createUnifiedMarginAccount': false,
|
|
1015
1016
|
'defaultType': 'swap',
|
|
@@ -1139,6 +1140,8 @@ class bybit extends bybit$1 {
|
|
|
1139
1140
|
/**
|
|
1140
1141
|
* @method
|
|
1141
1142
|
* @name bybit#isUnifiedEnabled
|
|
1143
|
+
* @see https://bybit-exchange.github.io/docs/v5/user/apikey-info#http-request
|
|
1144
|
+
* @see https://bybit-exchange.github.io/docs/v5/account/account-info
|
|
1142
1145
|
* @description returns [enableUnifiedMargin, enableUnifiedAccount] so the user can check if unified account is enabled
|
|
1143
1146
|
*/
|
|
1144
1147
|
// The API key of user id must own one of permissions will be allowed to call following API endpoints.
|
|
@@ -1152,9 +1155,13 @@ class bybit extends bybit$1 {
|
|
|
1152
1155
|
// so we're assuming UTA is enabled
|
|
1153
1156
|
this.options['enableUnifiedMargin'] = false;
|
|
1154
1157
|
this.options['enableUnifiedAccount'] = true;
|
|
1158
|
+
this.options['unifiedMarginStatus'] = 3;
|
|
1155
1159
|
return [this.options['enableUnifiedMargin'], this.options['enableUnifiedAccount']];
|
|
1156
1160
|
}
|
|
1157
|
-
const
|
|
1161
|
+
const rawPromises = [this.privateGetV5UserQueryApi(params), this.privateGetV5AccountInfo(params)];
|
|
1162
|
+
const promises = await Promise.all(rawPromises);
|
|
1163
|
+
const response = promises[0];
|
|
1164
|
+
const accountInfo = promises[1];
|
|
1158
1165
|
//
|
|
1159
1166
|
// {
|
|
1160
1167
|
// "retCode": 0,
|
|
@@ -1194,14 +1201,37 @@ class bybit extends bybit$1 {
|
|
|
1194
1201
|
// "retExtInfo": {},
|
|
1195
1202
|
// "time": 1676891757649
|
|
1196
1203
|
// }
|
|
1204
|
+
// account info
|
|
1205
|
+
// {
|
|
1206
|
+
// "retCode": 0,
|
|
1207
|
+
// "retMsg": "OK",
|
|
1208
|
+
// "result": {
|
|
1209
|
+
// "marginMode": "REGULAR_MARGIN",
|
|
1210
|
+
// "updatedTime": "1697078946000",
|
|
1211
|
+
// "unifiedMarginStatus": 4,
|
|
1212
|
+
// "dcpStatus": "OFF",
|
|
1213
|
+
// "timeWindow": 10,
|
|
1214
|
+
// "smpGroup": 0,
|
|
1215
|
+
// "isMasterTrader": false,
|
|
1216
|
+
// "spotHedgingStatus": "OFF"
|
|
1217
|
+
// }
|
|
1218
|
+
// }
|
|
1197
1219
|
//
|
|
1198
1220
|
const result = this.safeDict(response, 'result', {});
|
|
1221
|
+
const accountResult = this.safeDict(accountInfo, 'result', {});
|
|
1199
1222
|
this.options['enableUnifiedMargin'] = this.safeInteger(result, 'unified') === 1;
|
|
1200
1223
|
this.options['enableUnifiedAccount'] = this.safeInteger(result, 'uta') === 1;
|
|
1224
|
+
this.options['unifiedMarginStatus'] = this.safeInteger(accountResult, 'unifiedMarginStatus', 3); // default to uta.1 if not found
|
|
1201
1225
|
}
|
|
1202
1226
|
return [this.options['enableUnifiedMargin'], this.options['enableUnifiedAccount']];
|
|
1203
1227
|
}
|
|
1204
1228
|
async upgradeUnifiedTradeAccount(params = {}) {
|
|
1229
|
+
/**
|
|
1230
|
+
* @method
|
|
1231
|
+
* @name bybit#upgradeUnifiedTradeAccount
|
|
1232
|
+
* @see https://bybit-exchange.github.io/docs/v5/account/upgrade-unified-account
|
|
1233
|
+
* @description upgrades the account to unified trade account *warning* this is irreversible
|
|
1234
|
+
*/
|
|
1205
1235
|
return await this.privatePostV5AccountUpgradeToUta(params);
|
|
1206
1236
|
}
|
|
1207
1237
|
createExpiredOptionMarket(symbol) {
|
|
@@ -3169,11 +3199,18 @@ class bybit extends bybit$1 {
|
|
|
3169
3199
|
const isInverse = (type === 'inverse');
|
|
3170
3200
|
const isFunding = (lowercaseRawType === 'fund') || (lowercaseRawType === 'funding');
|
|
3171
3201
|
if (isUnifiedAccount) {
|
|
3172
|
-
|
|
3173
|
-
|
|
3202
|
+
const unifiedMarginStatus = this.safeInteger(this.options, 'unifiedMarginStatus', 3);
|
|
3203
|
+
if (unifiedMarginStatus < 5) {
|
|
3204
|
+
// it's not uta.20 where inverse are unified
|
|
3205
|
+
if (isInverse) {
|
|
3206
|
+
type = 'contract';
|
|
3207
|
+
}
|
|
3208
|
+
else {
|
|
3209
|
+
type = 'unified';
|
|
3210
|
+
}
|
|
3174
3211
|
}
|
|
3175
3212
|
else {
|
|
3176
|
-
type = 'unified';
|
|
3213
|
+
type = 'unified'; // uta.20 where inverse are unified
|
|
3177
3214
|
}
|
|
3178
3215
|
}
|
|
3179
3216
|
else {
|
|
@@ -7644,13 +7681,13 @@ class bybit extends bybit$1 {
|
|
|
7644
7681
|
}
|
|
7645
7682
|
parseMarginLoan(info, currency = undefined) {
|
|
7646
7683
|
//
|
|
7647
|
-
//
|
|
7684
|
+
// borrowCrossMargin
|
|
7648
7685
|
//
|
|
7649
7686
|
// {
|
|
7650
7687
|
// "transactId": "14143"
|
|
7651
7688
|
// }
|
|
7652
7689
|
//
|
|
7653
|
-
//
|
|
7690
|
+
// repayCrossMargin
|
|
7654
7691
|
//
|
|
7655
7692
|
// {
|
|
7656
7693
|
// "repayId": "12128"
|
package/dist/cjs/src/cex.js
CHANGED
|
@@ -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,
|
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -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,
|
|
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,
|