ccxt 4.1.58 → 4.1.60
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 +5 -5
- package/build.sh +2 -2
- package/dist/ccxt.browser.js +1017 -1031
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -19
- package/dist/cjs/src/base/Exchange.js +45 -24
- package/dist/cjs/src/base/ws/Client.js +1 -1
- package/dist/cjs/src/binance.js +71 -22
- package/dist/cjs/src/bitget.js +74 -52
- package/dist/cjs/src/bitmart.js +10 -18
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bybit.js +36 -33
- package/dist/cjs/src/coinbasepro.js +15 -0
- package/dist/cjs/src/coinex.js +25 -30
- package/dist/cjs/src/htx.js +82 -39
- package/dist/cjs/src/kucoin.js +209 -163
- package/dist/cjs/src/mexc.js +21 -118
- package/dist/cjs/src/okx.js +23 -17
- package/dist/cjs/src/pro/bitget.js +7 -0
- package/dist/cjs/src/pro/bitmart.js +7 -0
- package/dist/cjs/src/pro/bitvavo.js +9 -0
- package/dist/cjs/src/pro/bybit.js +9 -0
- package/dist/cjs/src/pro/htx.js +86 -61
- package/dist/cjs/src/pro/kucoin.js +7 -0
- package/dist/cjs/src/pro/mexc.js +9 -0
- package/js/ccxt.d.ts +2 -23
- package/js/ccxt.js +2 -16
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/mexc.d.ts +0 -4
- package/js/src/base/Exchange.d.ts +9 -2
- package/js/src/base/Exchange.js +45 -24
- package/js/src/base/ws/Client.js +1 -1
- package/js/src/binance.d.ts +20 -2
- package/js/src/binance.js +71 -22
- package/js/src/bitget.d.ts +20 -2
- package/js/src/bitget.js +74 -52
- package/js/src/bitmart.d.ts +2 -2
- package/js/src/bitmart.js +10 -18
- package/js/src/bitrue.js +1 -1
- package/js/src/bybit.d.ts +2 -2
- package/js/src/bybit.js +36 -33
- package/js/src/coinbasepro.js +15 -0
- package/js/src/coinex.d.ts +2 -2
- package/js/src/coinex.js +25 -30
- package/js/src/htx.d.ts +5 -3
- package/js/src/htx.js +82 -39
- package/js/src/kucoin.d.ts +20 -2
- package/js/src/kucoin.js +209 -163
- package/js/src/mexc.d.ts +0 -11
- package/js/src/mexc.js +21 -118
- package/js/src/okx.d.ts +19 -2
- package/js/src/okx.js +23 -17
- package/js/src/pro/bitget.js +7 -0
- package/js/src/pro/bitmart.js +7 -0
- package/js/src/pro/bitvavo.js +9 -0
- package/js/src/pro/bybit.js +9 -0
- package/js/src/pro/htx.d.ts +2 -2
- package/js/src/pro/htx.js +86 -61
- package/js/src/pro/kucoin.js +7 -0
- package/js/src/pro/mexc.js +9 -0
- package/package.json +1 -1
- package/skip-tests.json +5 -1
- package/js/src/abstract/huobipro.d.ts +0 -547
- package/js/src/abstract/huobipro.js +0 -11
- package/js/src/abstract/mexc3.d.ts +0 -180
- package/js/src/abstract/mexc3.js +0 -11
- package/js/src/abstract/okex.d.ts +0 -280
- package/js/src/abstract/okex.js +0 -11
- package/js/src/abstract/okex5.d.ts +0 -280
- package/js/src/abstract/okex5.js +0 -11
package/dist/ccxt.browser.js
CHANGED
|
@@ -7119,7 +7119,7 @@ class Exchange {
|
|
|
7119
7119
|
'fetchPermissions': undefined,
|
|
7120
7120
|
'fetchPosition': undefined,
|
|
7121
7121
|
'fetchPositions': undefined,
|
|
7122
|
-
'
|
|
7122
|
+
'fetchPositionsForSymbol': undefined,
|
|
7123
7123
|
'fetchPositionsRisk': undefined,
|
|
7124
7124
|
'fetchPremiumIndexOHLCV': undefined,
|
|
7125
7125
|
'fetchStatus': 'emulated',
|
|
@@ -9016,17 +9016,17 @@ class Exchange {
|
|
|
9016
9016
|
return result;
|
|
9017
9017
|
}
|
|
9018
9018
|
safeTicker(ticker, market = undefined) {
|
|
9019
|
-
let open = this.
|
|
9020
|
-
let close = this.
|
|
9021
|
-
let last = this.
|
|
9022
|
-
let change = this.
|
|
9023
|
-
let percentage = this.
|
|
9024
|
-
let average = this.
|
|
9025
|
-
let vwap = this.
|
|
9019
|
+
let open = this.omitZero(this.safeString(ticker, 'open'));
|
|
9020
|
+
let close = this.omitZero(this.safeString(ticker, 'close'));
|
|
9021
|
+
let last = this.omitZero(this.safeString(ticker, 'last'));
|
|
9022
|
+
let change = this.omitZero(this.safeString(ticker, 'change'));
|
|
9023
|
+
let percentage = this.omitZero(this.safeString(ticker, 'percentage'));
|
|
9024
|
+
let average = this.omitZero(this.safeString(ticker, 'average'));
|
|
9025
|
+
let vwap = this.omitZero(this.safeString(ticker, 'vwap'));
|
|
9026
9026
|
const baseVolume = this.safeString(ticker, 'baseVolume');
|
|
9027
9027
|
const quoteVolume = this.safeString(ticker, 'quoteVolume');
|
|
9028
9028
|
if (vwap === undefined) {
|
|
9029
|
-
vwap = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise */ .O.stringDiv(quoteVolume, baseVolume);
|
|
9029
|
+
vwap = _Precise_js__WEBPACK_IMPORTED_MODULE_8__/* .Precise */ .O.stringDiv(this.omitZero(quoteVolume), baseVolume);
|
|
9030
9030
|
}
|
|
9031
9031
|
if ((last !== undefined) && (close === undefined)) {
|
|
9032
9032
|
close = last;
|
|
@@ -9054,24 +9054,45 @@ class Exchange {
|
|
|
9054
9054
|
// timestamp and symbol operations don't belong in safeTicker
|
|
9055
9055
|
// they should be done in the derived classes
|
|
9056
9056
|
return this.extend(ticker, {
|
|
9057
|
-
'bid': this.omitZero(this.safeNumber(ticker, 'bid')),
|
|
9057
|
+
'bid': this.parseNumber(this.omitZero(this.safeNumber(ticker, 'bid'))),
|
|
9058
9058
|
'bidVolume': this.safeNumber(ticker, 'bidVolume'),
|
|
9059
|
-
'ask': this.omitZero(this.safeNumber(ticker, 'ask')),
|
|
9059
|
+
'ask': this.parseNumber(this.omitZero(this.safeNumber(ticker, 'ask'))),
|
|
9060
9060
|
'askVolume': this.safeNumber(ticker, 'askVolume'),
|
|
9061
|
-
'high': this.omitZero(this.
|
|
9062
|
-
'low': this.omitZero(this.safeNumber(ticker, 'low')),
|
|
9063
|
-
'open': this.omitZero(this.parseNumber(open)),
|
|
9064
|
-
'close': this.omitZero(this.parseNumber(close)),
|
|
9065
|
-
'last': this.omitZero(this.parseNumber(last)),
|
|
9061
|
+
'high': this.parseNumber(this.omitZero(this.safeString(ticker, 'high"'))),
|
|
9062
|
+
'low': this.parseNumber(this.omitZero(this.safeNumber(ticker, 'low'))),
|
|
9063
|
+
'open': this.parseNumber(this.omitZero(this.parseNumber(open))),
|
|
9064
|
+
'close': this.parseNumber(this.omitZero(this.parseNumber(close))),
|
|
9065
|
+
'last': this.parseNumber(this.omitZero(this.parseNumber(last))),
|
|
9066
9066
|
'change': this.parseNumber(change),
|
|
9067
9067
|
'percentage': this.parseNumber(percentage),
|
|
9068
|
-
'average': this.
|
|
9069
|
-
'vwap': this.
|
|
9068
|
+
'average': this.parseNumber(average),
|
|
9069
|
+
'vwap': this.parseNumber(vwap),
|
|
9070
9070
|
'baseVolume': this.parseNumber(baseVolume),
|
|
9071
9071
|
'quoteVolume': this.parseNumber(quoteVolume),
|
|
9072
9072
|
'previousClose': this.safeNumber(ticker, 'previousClose'),
|
|
9073
9073
|
});
|
|
9074
9074
|
}
|
|
9075
|
+
async fetchBorrowRate(code, amount, params = {}) {
|
|
9076
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchBorrowRate is deprecated, please use fetchCrossBorrowRate or fetchIsolatedBorrowRate instead');
|
|
9077
|
+
}
|
|
9078
|
+
async repayCrossMargin(code, amount, params = {}) {
|
|
9079
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' repayCrossMargin is not support yet');
|
|
9080
|
+
}
|
|
9081
|
+
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
9082
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' repayIsolatedMargin is not support yet');
|
|
9083
|
+
}
|
|
9084
|
+
async borrowCrossMargin(code, amount, params = {}) {
|
|
9085
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' borrowCrossMargin is not support yet');
|
|
9086
|
+
}
|
|
9087
|
+
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
9088
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' borrowIsolatedMargin is not support yet');
|
|
9089
|
+
}
|
|
9090
|
+
async borrowMargin(code, amount, symbol = undefined, params = {}) {
|
|
9091
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' borrowMargin is deprecated, please use borrowCrossMargin or borrowIsolatedMargin instead');
|
|
9092
|
+
}
|
|
9093
|
+
async repayMargin(code, amount, symbol = undefined, params = {}) {
|
|
9094
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' repayMargin is deprecated, please use repayCrossMargin or repayIsolatedMargin instead');
|
|
9095
|
+
}
|
|
9075
9096
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
9076
9097
|
let message = '';
|
|
9077
9098
|
if (this.has['fetchTrades']) {
|
|
@@ -9708,16 +9729,16 @@ class Exchange {
|
|
|
9708
9729
|
async watchPositionForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
|
|
9709
9730
|
return this.watchPositions(symbols, since, limit, params);
|
|
9710
9731
|
}
|
|
9711
|
-
async
|
|
9732
|
+
async fetchPositionsForSymbol(symbol, params = {}) {
|
|
9712
9733
|
/**
|
|
9713
9734
|
* @method
|
|
9714
|
-
* @name exchange#
|
|
9715
|
-
* @description
|
|
9716
|
-
* @param {string} symbol unified market symbol
|
|
9735
|
+
* @name exchange#fetchPositionsForSymbol
|
|
9736
|
+
* @description fetches all open positions for specific symbol, unlike fetchPositions (which is designed to work with multiple symbols) so this method might be preffered for ony-market purposes, because of less rate-limit consumption and speed
|
|
9737
|
+
* @param {string} symbol unified market symbol
|
|
9717
9738
|
* @param {object} params extra parameters specific to the endpoint
|
|
9718
|
-
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure} with maximum 3 items - one position for "one-way" mode, and two positions (long & short) for "two-way" (a.k.a. hedge) mode
|
|
9739
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure} with maximum 3 items - possible one position for "one-way" mode, and possible two positions (long & short) for "two-way" (a.k.a. hedge) mode
|
|
9719
9740
|
*/
|
|
9720
|
-
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + '
|
|
9741
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchPositionsForSymbol() is not supported yet');
|
|
9721
9742
|
}
|
|
9722
9743
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
9723
9744
|
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__.NotSupported(this.id + ' fetchPositions() is not supported yet');
|
|
@@ -13635,8 +13656,8 @@ class ArrayCacheBySymbolBySide extends ArrayCache {
|
|
|
13635
13656
|
/* harmony import */ var _static_dependencies_fflake_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7348);
|
|
13636
13657
|
/* harmony import */ var _Future_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2367);
|
|
13637
13658
|
/* harmony import */ var _base_functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(927);
|
|
13638
|
-
/* harmony import */ var _base_functions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
13639
|
-
/* harmony import */ var _base_functions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
13659
|
+
/* harmony import */ var _base_functions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1621);
|
|
13660
|
+
/* harmony import */ var _base_functions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9125);
|
|
13640
13661
|
/* harmony import */ var _base_functions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1237);
|
|
13641
13662
|
/* harmony import */ var _static_dependencies_scure_base_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9651);
|
|
13642
13663
|
|
|
@@ -13745,7 +13766,7 @@ class Client {
|
|
|
13745
13766
|
if (!this.isOpen()) {
|
|
13746
13767
|
const error = new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.RequestTimeout('Connection to ' + this.url + ' failed due to a connection timeout');
|
|
13747
13768
|
this.onError(error);
|
|
13748
|
-
this.connection.close(
|
|
13769
|
+
this.connection.close(1006);
|
|
13749
13770
|
}
|
|
13750
13771
|
}
|
|
13751
13772
|
setConnectionTimeout() {
|
|
@@ -13772,7 +13793,7 @@ class Client {
|
|
|
13772
13793
|
}
|
|
13773
13794
|
onPingInterval() {
|
|
13774
13795
|
if (this.keepAlive && this.isOpen()) {
|
|
13775
|
-
const now = (0,
|
|
13796
|
+
const now = (0,_base_functions_js__WEBPACK_IMPORTED_MODULE_4__/* .milliseconds */ .m)();
|
|
13776
13797
|
this.lastPong = this.lastPong || now;
|
|
13777
13798
|
if ((this.lastPong + this.keepAlive * this.maxPingPongMisses) < now) {
|
|
13778
13799
|
this.onError(new _base_errors_js__WEBPACK_IMPORTED_MODULE_3__.RequestTimeout('Connection to ' + this.url + ' timed out due to a ping-pong keepalive missing on time'));
|
|
@@ -13781,7 +13802,7 @@ class Client {
|
|
|
13781
13802
|
if (this.ping) {
|
|
13782
13803
|
this.send(this.ping(this));
|
|
13783
13804
|
}
|
|
13784
|
-
else if (
|
|
13805
|
+
else if (_base_functions_js__WEBPACK_IMPORTED_MODULE_5__/* .isNode */ .UG) {
|
|
13785
13806
|
// can't do this inside browser
|
|
13786
13807
|
// https://stackoverflow.com/questions/10585355/sending-websocket-ping-pong-frame-from-browser
|
|
13787
13808
|
this.connection.ping();
|
|
@@ -13800,7 +13821,7 @@ class Client {
|
|
|
13800
13821
|
if (this.verbose) {
|
|
13801
13822
|
this.log(new Date(), 'onOpen');
|
|
13802
13823
|
}
|
|
13803
|
-
this.connectionEstablished = (0,
|
|
13824
|
+
this.connectionEstablished = (0,_base_functions_js__WEBPACK_IMPORTED_MODULE_4__/* .milliseconds */ .m)();
|
|
13804
13825
|
this.isConnected = true;
|
|
13805
13826
|
this.connected.resolve(this.url);
|
|
13806
13827
|
// this.connection.terminate () // debugging
|
|
@@ -13817,7 +13838,7 @@ class Client {
|
|
|
13817
13838
|
}
|
|
13818
13839
|
}
|
|
13819
13840
|
onPong() {
|
|
13820
|
-
this.lastPong = (0,
|
|
13841
|
+
this.lastPong = (0,_base_functions_js__WEBPACK_IMPORTED_MODULE_4__/* .milliseconds */ .m)();
|
|
13821
13842
|
if (this.verbose) {
|
|
13822
13843
|
this.log(new Date(), 'onPong');
|
|
13823
13844
|
}
|
|
@@ -13860,7 +13881,7 @@ class Client {
|
|
|
13860
13881
|
}
|
|
13861
13882
|
message = (typeof message === 'string') ? message : JSON.stringify(message);
|
|
13862
13883
|
const future = (0,_Future_js__WEBPACK_IMPORTED_MODULE_2__/* .createFuture */ .N)();
|
|
13863
|
-
if (
|
|
13884
|
+
if (_base_functions_js__WEBPACK_IMPORTED_MODULE_5__/* .isNode */ .UG) {
|
|
13864
13885
|
function onSendComplete(error) {
|
|
13865
13886
|
if (error) {
|
|
13866
13887
|
future.reject(error);
|
|
@@ -16464,7 +16485,8 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16464
16485
|
'future': true,
|
|
16465
16486
|
'option': true,
|
|
16466
16487
|
'addMargin': true,
|
|
16467
|
-
'
|
|
16488
|
+
'borrowCrossMargin': true,
|
|
16489
|
+
'borrowIsolatedMargin': true,
|
|
16468
16490
|
'cancelAllOrders': true,
|
|
16469
16491
|
'cancelOrder': true,
|
|
16470
16492
|
'cancelOrders': true,
|
|
@@ -16551,7 +16573,8 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16551
16573
|
'fetchWithdrawals': true,
|
|
16552
16574
|
'fetchWithdrawalWhitelist': false,
|
|
16553
16575
|
'reduceMargin': true,
|
|
16554
|
-
'
|
|
16576
|
+
'repayCrossMargin': true,
|
|
16577
|
+
'repayIsolatedMargin': true,
|
|
16555
16578
|
'setLeverage': true,
|
|
16556
16579
|
'setMargin': false,
|
|
16557
16580
|
'setMarginMode': true,
|
|
@@ -16686,6 +16709,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
16686
16709
|
'margin/capital-flow': 10,
|
|
16687
16710
|
'margin/delist-schedule': 10,
|
|
16688
16711
|
'margin/available-inventory': 0.3334,
|
|
16712
|
+
'margin/leverageBracket': 0.1,
|
|
16689
16713
|
'loan/vip/loanable/data': 40,
|
|
16690
16714
|
'loan/vip/collateral/data': 40,
|
|
16691
16715
|
'loan/vip/request/data': 2.6668,
|
|
@@ -25533,32 +25557,55 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
25533
25557
|
'info': info,
|
|
25534
25558
|
};
|
|
25535
25559
|
}
|
|
25536
|
-
async
|
|
25560
|
+
async repayCrossMargin(code, amount, params = {}) {
|
|
25537
25561
|
/**
|
|
25538
25562
|
* @method
|
|
25539
|
-
* @name binance#
|
|
25563
|
+
* @name binance#repayCrossMargin
|
|
25540
25564
|
* @description repay borrowed margin and interest
|
|
25541
25565
|
* @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin
|
|
25542
25566
|
* @param {string} code unified currency code of the currency to repay
|
|
25543
25567
|
* @param {float} amount the amount to repay
|
|
25568
|
+
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
25569
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
25570
|
+
*/
|
|
25571
|
+
await this.loadMarkets();
|
|
25572
|
+
const currency = this.currency(code);
|
|
25573
|
+
const request = {
|
|
25574
|
+
'asset': currency['id'],
|
|
25575
|
+
'amount': this.currencyToPrecision(code, amount),
|
|
25576
|
+
'isIsolated': 'FALSE',
|
|
25577
|
+
};
|
|
25578
|
+
const response = await this.sapiPostMarginRepay(this.extend(request, params));
|
|
25579
|
+
//
|
|
25580
|
+
// {
|
|
25581
|
+
// "tranId": 108988250265,
|
|
25582
|
+
// "clientTag":""
|
|
25583
|
+
// }
|
|
25584
|
+
//
|
|
25585
|
+
return this.parseMarginLoan(response, currency);
|
|
25586
|
+
}
|
|
25587
|
+
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
25588
|
+
/**
|
|
25589
|
+
* @method
|
|
25590
|
+
* @name binance#repayIsolatedMargin
|
|
25591
|
+
* @description repay borrowed margin and interest
|
|
25592
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin
|
|
25544
25593
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
25594
|
+
* @param {string} code unified currency code of the currency to repay
|
|
25595
|
+
* @param {float} amount the amount to repay
|
|
25545
25596
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
25546
25597
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
25547
25598
|
*/
|
|
25548
|
-
const [marginMode, query] = this.handleMarginModeAndParams('repayMargin', params); // cross or isolated
|
|
25549
|
-
this.checkRequiredMarginArgument('repayMargin', symbol, marginMode);
|
|
25550
25599
|
await this.loadMarkets();
|
|
25551
25600
|
const currency = this.currency(code);
|
|
25601
|
+
const market = this.market(symbol);
|
|
25552
25602
|
const request = {
|
|
25553
25603
|
'asset': currency['id'],
|
|
25554
25604
|
'amount': this.currencyToPrecision(code, amount),
|
|
25605
|
+
'symbol': market['id'],
|
|
25606
|
+
'isIsolated': 'TRUE',
|
|
25555
25607
|
};
|
|
25556
|
-
|
|
25557
|
-
const market = this.market(symbol);
|
|
25558
|
-
request['symbol'] = market['id'];
|
|
25559
|
-
request['isIsolated'] = 'TRUE';
|
|
25560
|
-
}
|
|
25561
|
-
const response = await this.sapiPostMarginRepay(this.extend(request, query));
|
|
25608
|
+
const response = await this.sapiPostMarginRepay(this.extend(request, params));
|
|
25562
25609
|
//
|
|
25563
25610
|
// {
|
|
25564
25611
|
// "tranId": 108988250265,
|
|
@@ -25567,32 +25614,55 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
25567
25614
|
//
|
|
25568
25615
|
return this.parseMarginLoan(response, currency);
|
|
25569
25616
|
}
|
|
25570
|
-
async
|
|
25617
|
+
async borrowCrossMargin(code, amount, params = {}) {
|
|
25571
25618
|
/**
|
|
25572
25619
|
* @method
|
|
25573
|
-
* @name binance#
|
|
25620
|
+
* @name binance#borrowCrossMargin
|
|
25574
25621
|
* @description create a loan to borrow margin
|
|
25575
25622
|
* @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-margin
|
|
25576
25623
|
* @param {string} code unified currency code of the currency to borrow
|
|
25577
25624
|
* @param {float} amount the amount to borrow
|
|
25625
|
+
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
25626
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
25627
|
+
*/
|
|
25628
|
+
await this.loadMarkets();
|
|
25629
|
+
const currency = this.currency(code);
|
|
25630
|
+
const request = {
|
|
25631
|
+
'asset': currency['id'],
|
|
25632
|
+
'amount': this.currencyToPrecision(code, amount),
|
|
25633
|
+
'isIsolated': 'FALSE',
|
|
25634
|
+
};
|
|
25635
|
+
const response = await this.sapiPostMarginLoan(this.extend(request, params));
|
|
25636
|
+
//
|
|
25637
|
+
// {
|
|
25638
|
+
// "tranId": 108988250265,
|
|
25639
|
+
// "clientTag":""
|
|
25640
|
+
// }
|
|
25641
|
+
//
|
|
25642
|
+
return this.parseMarginLoan(response, currency);
|
|
25643
|
+
}
|
|
25644
|
+
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
25645
|
+
/**
|
|
25646
|
+
* @method
|
|
25647
|
+
* @name binance#borrowIsolatedMargin
|
|
25648
|
+
* @description create a loan to borrow margin
|
|
25649
|
+
* @see https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-margin
|
|
25578
25650
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
25651
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
25652
|
+
* @param {float} amount the amount to borrow
|
|
25579
25653
|
* @param {object} [params] extra parameters specific to the binance api endpoint
|
|
25580
25654
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
25581
25655
|
*/
|
|
25582
|
-
const [marginMode, query] = this.handleMarginModeAndParams('borrowMargin', params); // cross or isolated
|
|
25583
|
-
this.checkRequiredMarginArgument('borrowMargin', symbol, marginMode);
|
|
25584
25656
|
await this.loadMarkets();
|
|
25585
25657
|
const currency = this.currency(code);
|
|
25658
|
+
const market = this.market(symbol);
|
|
25586
25659
|
const request = {
|
|
25587
25660
|
'asset': currency['id'],
|
|
25588
25661
|
'amount': this.currencyToPrecision(code, amount),
|
|
25662
|
+
'symbol': market['id'],
|
|
25663
|
+
'isIsolated': 'TRUE',
|
|
25589
25664
|
};
|
|
25590
|
-
|
|
25591
|
-
const market = this.market(symbol);
|
|
25592
|
-
request['symbol'] = market['id'];
|
|
25593
|
-
request['isIsolated'] = 'TRUE';
|
|
25594
|
-
}
|
|
25595
|
-
const response = await this.sapiPostMarginLoan(this.extend(request, query));
|
|
25665
|
+
const response = await this.sapiPostMarginLoan(this.extend(request, params));
|
|
25596
25666
|
//
|
|
25597
25667
|
// {
|
|
25598
25668
|
// "tranId": 108988250265,
|
|
@@ -39537,7 +39607,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39537
39607
|
'future': true,
|
|
39538
39608
|
'option': false,
|
|
39539
39609
|
'addMargin': true,
|
|
39540
|
-
'
|
|
39610
|
+
'borrowCrossMargin': true,
|
|
39611
|
+
'borrowIsolatedMargin': true,
|
|
39541
39612
|
'cancelAllOrders': true,
|
|
39542
39613
|
'cancelOrder': true,
|
|
39543
39614
|
'cancelOrders': true,
|
|
@@ -39601,7 +39672,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
39601
39672
|
'fetchWithdrawal': false,
|
|
39602
39673
|
'fetchWithdrawals': true,
|
|
39603
39674
|
'reduceMargin': true,
|
|
39604
|
-
'
|
|
39675
|
+
'repayCrossMargin': true,
|
|
39676
|
+
'repayIsolatedMargin': true,
|
|
39605
39677
|
'setLeverage': true,
|
|
39606
39678
|
'setMarginMode': true,
|
|
39607
39679
|
'setPositionMode': true,
|
|
@@ -45802,18 +45874,15 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45802
45874
|
'info': interest,
|
|
45803
45875
|
}, market);
|
|
45804
45876
|
}
|
|
45805
|
-
async
|
|
45877
|
+
async borrowCrossMargin(code, amount, params = {}) {
|
|
45806
45878
|
/**
|
|
45807
45879
|
* @method
|
|
45808
|
-
* @name bitget#
|
|
45880
|
+
* @name bitget#borrowCrossMargin
|
|
45809
45881
|
* @description create a loan to borrow margin
|
|
45810
45882
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-borrow
|
|
45811
|
-
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-borrow
|
|
45812
45883
|
* @param {string} code unified currency code of the currency to borrow
|
|
45813
45884
|
* @param {string} amount the amount to borrow
|
|
45814
|
-
* @param {string} [symbol] unified market symbol
|
|
45815
45885
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
45816
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross', symbol is required for 'isolated'
|
|
45817
45886
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
45818
45887
|
*/
|
|
45819
45888
|
await this.loadMarkets();
|
|
@@ -45822,91 +45891,91 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45822
45891
|
'coin': currency['info']['coinName'],
|
|
45823
45892
|
'borrowAmount': this.currencyToPrecision(code, amount),
|
|
45824
45893
|
};
|
|
45825
|
-
|
|
45826
|
-
let marginMode = undefined;
|
|
45827
|
-
[marginMode, params] = this.handleMarginModeAndParams('borrowMargin', params);
|
|
45828
|
-
if ((symbol !== undefined) || (marginMode === 'isolated')) {
|
|
45829
|
-
if (symbol === undefined) {
|
|
45830
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
|
|
45831
|
-
}
|
|
45832
|
-
const market = this.market(symbol);
|
|
45833
|
-
const marketId = market['id'];
|
|
45834
|
-
const parts = marketId.split('_');
|
|
45835
|
-
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
45836
|
-
request['symbol'] = marginMarketId;
|
|
45837
|
-
response = await this.privateMarginPostMarginV1IsolatedAccountBorrow(this.extend(request, params));
|
|
45838
|
-
}
|
|
45839
|
-
else {
|
|
45840
|
-
response = await this.privateMarginPostMarginV1CrossAccountBorrow(this.extend(request, params));
|
|
45841
|
-
}
|
|
45894
|
+
const response = await this.privateMarginPostMarginV1CrossAccountBorrow(this.extend(request, params));
|
|
45842
45895
|
//
|
|
45843
|
-
//
|
|
45896
|
+
// cross
|
|
45844
45897
|
//
|
|
45845
45898
|
// {
|
|
45846
45899
|
// "code": "00000",
|
|
45847
45900
|
// "msg": "success",
|
|
45848
|
-
// "requestTime":
|
|
45901
|
+
// "requestTime": 1697251314271,
|
|
45849
45902
|
// "data": {
|
|
45850
45903
|
// "clientOid": null,
|
|
45851
|
-
// "symbol": "BTCUSDT",
|
|
45852
45904
|
// "coin": "BTC",
|
|
45853
|
-
// "borrowAmount": "0.
|
|
45905
|
+
// "borrowAmount": "0.0001"
|
|
45854
45906
|
// }
|
|
45855
45907
|
// }
|
|
45856
45908
|
//
|
|
45857
|
-
|
|
45909
|
+
const data = this.safeValue(response, 'data', {});
|
|
45910
|
+
return this.parseMarginLoan(data, currency);
|
|
45911
|
+
}
|
|
45912
|
+
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
45913
|
+
/**
|
|
45914
|
+
* @method
|
|
45915
|
+
* @name bitget#borrowIsolatedMargin
|
|
45916
|
+
* @description create a loan to borrow margin
|
|
45917
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-borrow
|
|
45918
|
+
* @param {string} symbol unified market symbol
|
|
45919
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
45920
|
+
* @param {string} amount the amount to borrow
|
|
45921
|
+
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
45922
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
45923
|
+
*/
|
|
45924
|
+
await this.loadMarkets();
|
|
45925
|
+
const currency = this.currency(code);
|
|
45926
|
+
const market = this.market(symbol);
|
|
45927
|
+
const marketId = market['id'];
|
|
45928
|
+
const parts = marketId.split('_');
|
|
45929
|
+
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
45930
|
+
const request = {
|
|
45931
|
+
'coin': currency['info']['coinName'],
|
|
45932
|
+
'borrowAmount': this.currencyToPrecision(code, amount),
|
|
45933
|
+
'symbol': marginMarketId,
|
|
45934
|
+
};
|
|
45935
|
+
const response = await this.privateMarginPostMarginV1IsolatedAccountBorrow(this.extend(request, params));
|
|
45936
|
+
//
|
|
45937
|
+
// isolated
|
|
45858
45938
|
//
|
|
45859
45939
|
// {
|
|
45860
45940
|
// "code": "00000",
|
|
45861
45941
|
// "msg": "success",
|
|
45862
|
-
// "requestTime":
|
|
45942
|
+
// "requestTime": 1697250952516,
|
|
45863
45943
|
// "data": {
|
|
45864
45944
|
// "clientOid": null,
|
|
45945
|
+
// "symbol": "BTCUSDT",
|
|
45865
45946
|
// "coin": "BTC",
|
|
45866
|
-
// "borrowAmount": "0.
|
|
45947
|
+
// "borrowAmount": "0.001"
|
|
45867
45948
|
// }
|
|
45868
45949
|
// }
|
|
45869
45950
|
//
|
|
45870
45951
|
const data = this.safeValue(response, 'data', {});
|
|
45871
45952
|
return this.parseMarginLoan(data, currency);
|
|
45872
45953
|
}
|
|
45873
|
-
async
|
|
45954
|
+
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
45874
45955
|
/**
|
|
45875
45956
|
* @method
|
|
45876
|
-
* @name bitget#
|
|
45957
|
+
* @name bitget#repayIsolatedMargin
|
|
45877
45958
|
* @description repay borrowed margin and interest
|
|
45878
45959
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-repay
|
|
45879
45960
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-repay
|
|
45961
|
+
* @param {string} symbol unified market symbol
|
|
45880
45962
|
* @param {string} code unified currency code of the currency to repay
|
|
45881
45963
|
* @param {string} amount the amount to repay
|
|
45882
|
-
* @param {string} [symbol] unified market symbol
|
|
45883
45964
|
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
45884
|
-
* @param {string} [params.marginMode] 'isolated' or 'cross', symbol is required for 'isolated'
|
|
45885
45965
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
45886
45966
|
*/
|
|
45887
45967
|
await this.loadMarkets();
|
|
45888
45968
|
const currency = this.currency(code);
|
|
45969
|
+
const market = this.market(symbol);
|
|
45970
|
+
const marketId = market['id'];
|
|
45971
|
+
const parts = marketId.split('_');
|
|
45972
|
+
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
45889
45973
|
const request = {
|
|
45890
45974
|
'coin': currency['info']['coinName'],
|
|
45891
45975
|
'repayAmount': this.currencyToPrecision(code, amount),
|
|
45976
|
+
'symbol': marginMarketId,
|
|
45892
45977
|
};
|
|
45893
|
-
|
|
45894
|
-
let marginMode = undefined;
|
|
45895
|
-
[marginMode, params] = this.handleMarginModeAndParams('repayMargin', params);
|
|
45896
|
-
if ((symbol !== undefined) || (marginMode === 'isolated')) {
|
|
45897
|
-
if (symbol === undefined) {
|
|
45898
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
|
|
45899
|
-
}
|
|
45900
|
-
const market = this.market(symbol);
|
|
45901
|
-
const marketId = market['id'];
|
|
45902
|
-
const parts = marketId.split('_');
|
|
45903
|
-
const marginMarketId = this.safeStringUpper(parts, 0);
|
|
45904
|
-
request['symbol'] = marginMarketId;
|
|
45905
|
-
response = await this.privateMarginPostMarginV1IsolatedAccountRepay(this.extend(request, params));
|
|
45906
|
-
}
|
|
45907
|
-
else {
|
|
45908
|
-
response = await this.privateMarginPostMarginV1CrossAccountRepay(this.extend(request, params));
|
|
45909
|
-
}
|
|
45978
|
+
const response = await this.privateMarginPostMarginV1IsolatedAccountRepay(this.extend(request, params));
|
|
45910
45979
|
//
|
|
45911
45980
|
// isolated
|
|
45912
45981
|
//
|
|
@@ -45923,6 +45992,29 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45923
45992
|
// }
|
|
45924
45993
|
// }
|
|
45925
45994
|
//
|
|
45995
|
+
const data = this.safeValue(response, 'data', {});
|
|
45996
|
+
return this.parseMarginLoan(data, currency);
|
|
45997
|
+
}
|
|
45998
|
+
async repayCrossMargin(code, amount, params = {}) {
|
|
45999
|
+
/**
|
|
46000
|
+
* @method
|
|
46001
|
+
* @name bitget#repayCrossMargin
|
|
46002
|
+
* @description repay borrowed margin and interest
|
|
46003
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-repay
|
|
46004
|
+
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-repay
|
|
46005
|
+
* @param {string} code unified currency code of the currency to repay
|
|
46006
|
+
* @param {string} amount the amount to repay
|
|
46007
|
+
* @param {object} [params] extra parameters specific to the bitget api endpoint
|
|
46008
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
46009
|
+
*/
|
|
46010
|
+
await this.loadMarkets();
|
|
46011
|
+
const currency = this.currency(code);
|
|
46012
|
+
const request = {
|
|
46013
|
+
'coin': currency['info']['coinName'],
|
|
46014
|
+
'repayAmount': this.currencyToPrecision(code, amount),
|
|
46015
|
+
};
|
|
46016
|
+
const response = await this.privateMarginPostMarginV1CrossAccountRepay(this.extend(request, params));
|
|
46017
|
+
//
|
|
45926
46018
|
// cross
|
|
45927
46019
|
//
|
|
45928
46020
|
// {
|
|
@@ -47716,7 +47808,8 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
47716
47808
|
'swap': true,
|
|
47717
47809
|
'future': false,
|
|
47718
47810
|
'option': false,
|
|
47719
|
-
'
|
|
47811
|
+
'borrowCrossMargin': false,
|
|
47812
|
+
'borrowIsolatedMargin': true,
|
|
47720
47813
|
'cancelAllOrders': true,
|
|
47721
47814
|
'cancelOrder': true,
|
|
47722
47815
|
'cancelOrders': false,
|
|
@@ -47778,7 +47871,8 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
47778
47871
|
'fetchWithdrawal': true,
|
|
47779
47872
|
'fetchWithdrawals': true,
|
|
47780
47873
|
'reduceMargin': false,
|
|
47781
|
-
'
|
|
47874
|
+
'repayCrossMargin': false,
|
|
47875
|
+
'repayIsolatedMargin': true,
|
|
47782
47876
|
'setLeverage': true,
|
|
47783
47877
|
'setMarginMode': false,
|
|
47784
47878
|
'transfer': true,
|
|
@@ -50882,22 +50976,18 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
50882
50976
|
'fee': fee,
|
|
50883
50977
|
};
|
|
50884
50978
|
}
|
|
50885
|
-
async
|
|
50979
|
+
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
50886
50980
|
/**
|
|
50887
50981
|
* @method
|
|
50888
|
-
* @name bitmart#
|
|
50982
|
+
* @name bitmart#repayIsolatedMargin
|
|
50889
50983
|
* @description repay borrowed margin and interest
|
|
50890
50984
|
* @see https://developer-pro.bitmart.com/en/spot/#margin-repay-isolated
|
|
50985
|
+
* @param {string} symbol unified market symbol
|
|
50891
50986
|
* @param {string} code unified currency code of the currency to repay
|
|
50892
50987
|
* @param {string} amount the amount to repay
|
|
50893
|
-
* @param {string} symbol unified market symbol
|
|
50894
50988
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
50895
|
-
* @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
|
|
50896
50989
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
50897
50990
|
*/
|
|
50898
|
-
if (symbol === undefined) {
|
|
50899
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
|
|
50900
|
-
}
|
|
50901
50991
|
await this.loadMarkets();
|
|
50902
50992
|
const market = this.market(symbol);
|
|
50903
50993
|
const currency = this.currency(code);
|
|
@@ -50906,7 +50996,6 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
50906
50996
|
'currency': currency['id'],
|
|
50907
50997
|
'amount': this.currencyToPrecision(code, amount),
|
|
50908
50998
|
};
|
|
50909
|
-
params = this.omit(params, 'marginMode');
|
|
50910
50999
|
const response = await this.privatePostSpotV1MarginIsolatedRepay(this.extend(request, params));
|
|
50911
51000
|
//
|
|
50912
51001
|
// {
|
|
@@ -50925,22 +51014,18 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
50925
51014
|
'symbol': symbol,
|
|
50926
51015
|
});
|
|
50927
51016
|
}
|
|
50928
|
-
async
|
|
51017
|
+
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
50929
51018
|
/**
|
|
50930
51019
|
* @method
|
|
50931
|
-
* @name bitmart#
|
|
51020
|
+
* @name bitmart#borrowIsolatedMargin
|
|
50932
51021
|
* @description create a loan to borrow margin
|
|
50933
51022
|
* @see https://developer-pro.bitmart.com/en/spot/#margin-borrow-isolated
|
|
51023
|
+
* @param {string} symbol unified market symbol
|
|
50934
51024
|
* @param {string} code unified currency code of the currency to borrow
|
|
50935
51025
|
* @param {string} amount the amount to borrow
|
|
50936
|
-
* @param {string} symbol unified market symbol
|
|
50937
51026
|
* @param {object} [params] extra parameters specific to the bitmart api endpoint
|
|
50938
|
-
* @param {string} [params.marginMode] 'isolated' is the default and 'cross' is unavailable
|
|
50939
51027
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
50940
51028
|
*/
|
|
50941
|
-
if (symbol === undefined) {
|
|
50942
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
|
|
50943
|
-
}
|
|
50944
51029
|
await this.loadMarkets();
|
|
50945
51030
|
const market = this.market(symbol);
|
|
50946
51031
|
const currency = this.currency(code);
|
|
@@ -50949,7 +51034,6 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
50949
51034
|
'currency': currency['id'],
|
|
50950
51035
|
'amount': this.currencyToPrecision(code, amount),
|
|
50951
51036
|
};
|
|
50952
|
-
params = this.omit(params, 'marginMode');
|
|
50953
51037
|
const response = await this.privatePostSpotV1MarginIsolatedBorrow(this.extend(request, params));
|
|
50954
51038
|
//
|
|
50955
51039
|
// {
|
|
@@ -58594,7 +58678,7 @@ class bitrue extends _abstract_bitrue_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
58594
58678
|
'kline': 'https://www.bitrue.com/kline-api',
|
|
58595
58679
|
},
|
|
58596
58680
|
'www': 'https://www.bitrue.com',
|
|
58597
|
-
'referral': 'https://www.bitrue.com/
|
|
58681
|
+
'referral': 'https://www.bitrue.com/affiliate/landing?cn=600000&inviteCode=EZWETQE',
|
|
58598
58682
|
'doc': [
|
|
58599
58683
|
'https://github.com/Bitrue-exchange/bitrue-official-api-docs',
|
|
58600
58684
|
],
|
|
@@ -74161,6 +74245,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
74161
74245
|
'swap': true,
|
|
74162
74246
|
'future': true,
|
|
74163
74247
|
'option': true,
|
|
74248
|
+
'borrowCrossMargin': true,
|
|
74164
74249
|
'cancelAllOrders': true,
|
|
74165
74250
|
'cancelOrder': true,
|
|
74166
74251
|
'createOrder': true,
|
|
@@ -74223,6 +74308,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
74223
74308
|
'fetchUnderlyingAssets': false,
|
|
74224
74309
|
'fetchVolatilityHistory': true,
|
|
74225
74310
|
'fetchWithdrawals': true,
|
|
74311
|
+
'repayCrossMargin': true,
|
|
74226
74312
|
'setLeverage': true,
|
|
74227
74313
|
'setMarginMode': true,
|
|
74228
74314
|
'setPositionMode': true,
|
|
@@ -77560,7 +77646,9 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
77560
77646
|
const result = await this.fetchOrders(symbol, undefined, undefined, this.extend(request, params));
|
|
77561
77647
|
const length = result.length;
|
|
77562
77648
|
if (length === 0) {
|
|
77563
|
-
|
|
77649
|
+
const isTrigger = this.safeValueN(params, ['trigger', 'stop'], false);
|
|
77650
|
+
const extra = isTrigger ? '' : 'If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = true';
|
|
77651
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.OrderNotFound('Order ' + id.toString() + ' was not found.' + extra);
|
|
77564
77652
|
}
|
|
77565
77653
|
if (length > 1) {
|
|
77566
77654
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidOrder(this.id + ' returned more than one order');
|
|
@@ -77586,7 +77674,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
77586
77674
|
* @param {boolean} [params.isLeverage] *unified spot only* false then spot trading true then margin trading
|
|
77587
77675
|
* @param {string} [params.tpslMode] *contract only* 'full' or 'partial'
|
|
77588
77676
|
* @param {string} [params.mmp] *option only* market maker protection
|
|
77589
|
-
* @param {string} [params.triggerDirection] *contract only* the direction for trigger orders, '
|
|
77677
|
+
* @param {string} [params.triggerDirection] *contract only* the direction for trigger orders, 'above' or 'below'
|
|
77590
77678
|
* @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
|
|
77591
77679
|
* @param {float} [params.stopLossPrice] The price at which a stop loss order is triggered at
|
|
77592
77680
|
* @param {float} [params.takeProfitPrice] The price at which a take profit order is triggered at
|
|
@@ -77718,21 +77806,30 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
77718
77806
|
const isStopLoss = stopLoss !== undefined;
|
|
77719
77807
|
const isTakeProfit = takeProfit !== undefined;
|
|
77720
77808
|
const isBuy = side === 'buy';
|
|
77721
|
-
const setTriggerDirection = (stopLossTriggerPrice || triggerPrice) ? !isBuy : isBuy;
|
|
77722
|
-
const defaultTriggerDirection = setTriggerDirection ? 2 : 1;
|
|
77723
|
-
const triggerDirection = this.safeString(params, 'triggerDirection');
|
|
77724
|
-
params = this.omit(params, 'triggerDirection');
|
|
77725
|
-
let selectedDirection = defaultTriggerDirection;
|
|
77726
|
-
if (triggerDirection !== undefined) {
|
|
77727
|
-
const isAsending = ((triggerDirection === 'up') || (triggerDirection === '1'));
|
|
77728
|
-
selectedDirection = isAsending ? 1 : 2;
|
|
77729
|
-
}
|
|
77730
77809
|
if (triggerPrice !== undefined) {
|
|
77731
|
-
|
|
77810
|
+
const triggerDirection = this.safeString(params, 'triggerDirection');
|
|
77811
|
+
params = this.omit(params, ['triggerPrice', 'stopPrice', 'triggerDirection']);
|
|
77812
|
+
if (market['spot']) {
|
|
77813
|
+
if (triggerDirection !== undefined) {
|
|
77814
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' createOrder() : trigger order does not support triggerDirection for spot markets yet');
|
|
77815
|
+
}
|
|
77816
|
+
}
|
|
77817
|
+
else {
|
|
77818
|
+
if (triggerDirection === undefined) {
|
|
77819
|
+
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ArgumentsRequired(this.id + ' stop/trigger orders require a triggerDirection parameter, either "above" or "below" to determine the direction of the trigger.');
|
|
77820
|
+
}
|
|
77821
|
+
const isAsending = ((triggerDirection === 'above') || (triggerDirection === '1'));
|
|
77822
|
+
request['triggerDirection'] = isAsending ? 1 : 2;
|
|
77823
|
+
}
|
|
77732
77824
|
request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
77733
77825
|
}
|
|
77734
77826
|
else if (isStopLossTriggerOrder || isTakeProfitTriggerOrder) {
|
|
77735
|
-
|
|
77827
|
+
if (isBuy) {
|
|
77828
|
+
request['triggerDirection'] = isStopLossTriggerOrder ? 1 : 2;
|
|
77829
|
+
}
|
|
77830
|
+
else {
|
|
77831
|
+
request['triggerDirection'] = isStopLossTriggerOrder ? 2 : 1;
|
|
77832
|
+
}
|
|
77736
77833
|
triggerPrice = isStopLossTriggerOrder ? stopLossTriggerPrice : takeProfitTriggerPrice;
|
|
77737
77834
|
request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
77738
77835
|
request['reduceOnly'] = true;
|
|
@@ -78532,8 +78629,8 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
78532
78629
|
return await this.fetchUsdcOrders(symbol, since, limit, params);
|
|
78533
78630
|
}
|
|
78534
78631
|
request['category'] = type;
|
|
78535
|
-
const isStop = this.
|
|
78536
|
-
params = this.omit(params, ['stop']);
|
|
78632
|
+
const isStop = this.safeValueN(params, ['trigger', 'stop'], false);
|
|
78633
|
+
params = this.omit(params, ['trigger', 'stop']);
|
|
78537
78634
|
if (isStop) {
|
|
78538
78635
|
if (type === 'spot') {
|
|
78539
78636
|
request['orderFilter'] = 'tpslOrder';
|
|
@@ -80739,29 +80836,24 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
80739
80836
|
const data = this.addPaginationCursorToResult(response);
|
|
80740
80837
|
return this.parseTransfers(data, currency, since, limit);
|
|
80741
80838
|
}
|
|
80742
|
-
async
|
|
80839
|
+
async borrowCrossMargin(code, amount, params = {}) {
|
|
80743
80840
|
/**
|
|
80744
80841
|
* @method
|
|
80745
|
-
* @name bybit#
|
|
80842
|
+
* @name bybit#borrowCrossMargin
|
|
80746
80843
|
* @description create a loan to borrow margin
|
|
80747
80844
|
* @see https://bybit-exchange.github.io/docs/v5/spot-margin-normal/borrow
|
|
80748
80845
|
* @param {string} code unified currency code of the currency to borrow
|
|
80749
80846
|
* @param {float} amount the amount to borrow
|
|
80750
|
-
* @param {string} symbol not used by bybit.borrowMargin ()
|
|
80751
80847
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
80752
80848
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
80753
80849
|
*/
|
|
80754
80850
|
await this.loadMarkets();
|
|
80755
80851
|
const currency = this.currency(code);
|
|
80756
|
-
const [marginMode, query] = this.handleMarginModeAndParams('borrowMargin', params);
|
|
80757
|
-
if (marginMode === 'isolated') {
|
|
80758
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' borrowMargin () cannot use isolated margin');
|
|
80759
|
-
}
|
|
80760
80852
|
const request = {
|
|
80761
80853
|
'coin': currency['id'],
|
|
80762
80854
|
'qty': this.currencyToPrecision(code, amount),
|
|
80763
80855
|
};
|
|
80764
|
-
const response = await this.privatePostV5SpotCrossMarginTradeLoan(this.extend(request,
|
|
80856
|
+
const response = await this.privatePostV5SpotCrossMarginTradeLoan(this.extend(request, params));
|
|
80765
80857
|
//
|
|
80766
80858
|
// {
|
|
80767
80859
|
// "retCode": 0,
|
|
@@ -80776,33 +80868,28 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
80776
80868
|
const result = this.safeValue(response, 'result', {});
|
|
80777
80869
|
const transaction = this.parseMarginLoan(result, currency);
|
|
80778
80870
|
return this.extend(transaction, {
|
|
80779
|
-
'symbol':
|
|
80871
|
+
'symbol': undefined,
|
|
80780
80872
|
'amount': amount,
|
|
80781
80873
|
});
|
|
80782
80874
|
}
|
|
80783
|
-
async
|
|
80875
|
+
async repayCrossMargin(code, amount, params = {}) {
|
|
80784
80876
|
/**
|
|
80785
80877
|
* @method
|
|
80786
|
-
* @name bybit#
|
|
80878
|
+
* @name bybit#repayCrossMargin
|
|
80787
80879
|
* @description repay borrowed margin and interest
|
|
80788
80880
|
* @see https://bybit-exchange.github.io/docs/v5/spot-margin-normal/repay
|
|
80789
80881
|
* @param {string} code unified currency code of the currency to repay
|
|
80790
80882
|
* @param {float} amount the amount to repay
|
|
80791
|
-
* @param {string} symbol not used by bybit.repayMargin ()
|
|
80792
80883
|
* @param {object} [params] extra parameters specific to the bybit api endpoint
|
|
80793
80884
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
80794
80885
|
*/
|
|
80795
80886
|
await this.loadMarkets();
|
|
80796
80887
|
const currency = this.currency(code);
|
|
80797
|
-
const [marginMode, query] = this.handleMarginModeAndParams('repayMargin', params);
|
|
80798
|
-
if (marginMode === 'isolated') {
|
|
80799
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.NotSupported(this.id + ' repayMargin () cannot use isolated margin');
|
|
80800
|
-
}
|
|
80801
80888
|
const request = {
|
|
80802
80889
|
'coin': currency['id'],
|
|
80803
80890
|
'qty': this.numberToString(amount),
|
|
80804
80891
|
};
|
|
80805
|
-
const response = await this.privatePostV5SpotCrossMarginTradeRepay(this.extend(request,
|
|
80892
|
+
const response = await this.privatePostV5SpotCrossMarginTradeRepay(this.extend(request, params));
|
|
80806
80893
|
//
|
|
80807
80894
|
// {
|
|
80808
80895
|
// "retCode": 0,
|
|
@@ -80817,7 +80904,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
80817
80904
|
const result = this.safeValue(response, 'result', {});
|
|
80818
80905
|
const transaction = this.parseMarginLoan(result, currency);
|
|
80819
80906
|
return this.extend(transaction, {
|
|
80820
|
-
'symbol':
|
|
80907
|
+
'symbol': undefined,
|
|
80821
80908
|
'amount': amount,
|
|
80822
80909
|
});
|
|
80823
80910
|
}
|
|
@@ -86705,6 +86792,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
86705
86792
|
* @method
|
|
86706
86793
|
* @name coinbasepro#fetchCurrencies
|
|
86707
86794
|
* @description fetches all available currencies on an exchange
|
|
86795
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getcurrencies
|
|
86708
86796
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
86709
86797
|
* @returns {object} an associative dictionary of currencies
|
|
86710
86798
|
*/
|
|
@@ -86775,6 +86863,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
86775
86863
|
* @method
|
|
86776
86864
|
* @name coinbasepro#fetchMarkets
|
|
86777
86865
|
* @description retrieves data on all markets for coinbasepro
|
|
86866
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts
|
|
86778
86867
|
* @param {object} [params] extra parameters specific to the exchange api endpoint
|
|
86779
86868
|
* @returns {object[]} an array of objects representing market data
|
|
86780
86869
|
*/
|
|
@@ -86895,6 +86984,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
86895
86984
|
* @method
|
|
86896
86985
|
* @name coinbasepro#fetchAccounts
|
|
86897
86986
|
* @description fetch all the accounts associated with a profile
|
|
86987
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounts
|
|
86898
86988
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
86899
86989
|
* @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
|
|
86900
86990
|
*/
|
|
@@ -86960,6 +87050,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
86960
87050
|
* @method
|
|
86961
87051
|
* @name coinbasepro#fetchBalance
|
|
86962
87052
|
* @description query for balance and get the amount of funds available for trading or funds locked in orders
|
|
87053
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounts
|
|
86963
87054
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
86964
87055
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
86965
87056
|
*/
|
|
@@ -87092,6 +87183,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
87092
87183
|
* @method
|
|
87093
87184
|
* @name coinbasepro#fetchTickers
|
|
87094
87185
|
* @description fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
|
|
87186
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproduct
|
|
87095
87187
|
* @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
|
87096
87188
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
87097
87189
|
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -87327,6 +87419,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
87327
87419
|
* @method
|
|
87328
87420
|
* @name coinbasepro#fetchTradingFees
|
|
87329
87421
|
* @description fetch the trading fees for multiple markets
|
|
87422
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getfees
|
|
87330
87423
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
87331
87424
|
* @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
|
|
87332
87425
|
*/
|
|
@@ -87825,6 +87918,8 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
87825
87918
|
* @method
|
|
87826
87919
|
* @name coinbasepro#deposit
|
|
87827
87920
|
* @description Creates a new deposit address, as required by coinbasepro
|
|
87921
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postdepositpaymentmethod
|
|
87922
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postdepositcoinbaseaccount
|
|
87828
87923
|
* @param {string} code Unified CCXT currency code (e.g. `"USDT"`)
|
|
87829
87924
|
* @param {float} amount The amount of currency to send in the deposit (e.g. `20`)
|
|
87830
87925
|
* @param {string} address Not used by coinbasepro
|
|
@@ -87866,6 +87961,8 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
87866
87961
|
* @method
|
|
87867
87962
|
* @name coinbasepro#withdraw
|
|
87868
87963
|
* @description make a withdrawal
|
|
87964
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawpaymentmethod
|
|
87965
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postwithdrawcoinbaseaccount
|
|
87869
87966
|
* @param {string} code unified currency code
|
|
87870
87967
|
* @param {float} amount the amount to withdraw
|
|
87871
87968
|
* @param {string} address the address to withdraw to
|
|
@@ -88149,6 +88246,8 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
88149
88246
|
* @method
|
|
88150
88247
|
* @name coinbasepro#fetchDeposits
|
|
88151
88248
|
* @description fetch all deposits made to an account
|
|
88249
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
|
|
88250
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
|
|
88152
88251
|
* @param {string} code unified currency code
|
|
88153
88252
|
* @param {int} [since] the earliest time in ms to fetch deposits for
|
|
88154
88253
|
* @param {int} [limit] the maximum number of deposits structures to retrieve
|
|
@@ -88162,6 +88261,8 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
88162
88261
|
* @method
|
|
88163
88262
|
* @name coinbasepro#fetchWithdrawals
|
|
88164
88263
|
* @description fetch all withdrawals made from an account
|
|
88264
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_gettransfers
|
|
88265
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getaccounttransfers
|
|
88165
88266
|
* @param {string} code unified currency code
|
|
88166
88267
|
* @param {int} [since] the earliest time in ms to fetch withdrawals for
|
|
88167
88268
|
* @param {int} [limit] the maximum number of withdrawals structures to retrieve
|
|
@@ -88272,6 +88373,7 @@ class coinbasepro extends _abstract_coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/
|
|
|
88272
88373
|
* @method
|
|
88273
88374
|
* @name coinbasepro#createDepositAddress
|
|
88274
88375
|
* @description create a currency deposit address
|
|
88376
|
+
* @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
|
|
88275
88377
|
* @param {string} code unified currency code of the currency for the deposit address
|
|
88276
88378
|
* @param {object} [params] extra parameters specific to the coinbasepro api endpoint
|
|
88277
88379
|
* @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
|
|
@@ -89267,7 +89369,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
89267
89369
|
'future': false,
|
|
89268
89370
|
'option': false,
|
|
89269
89371
|
'addMargin': true,
|
|
89270
|
-
'
|
|
89372
|
+
'borrowCrossMargin': false,
|
|
89373
|
+
'borrowIsolatedMargin': true,
|
|
89271
89374
|
'cancelAllOrders': true,
|
|
89272
89375
|
'cancelOrder': true,
|
|
89273
89376
|
'createDepositAddress': true,
|
|
@@ -89320,7 +89423,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
89320
89423
|
'fetchWithdrawal': false,
|
|
89321
89424
|
'fetchWithdrawals': true,
|
|
89322
89425
|
'reduceMargin': true,
|
|
89323
|
-
'
|
|
89426
|
+
'repayCrossMargin': false,
|
|
89427
|
+
'repayIsolatedMargin': true,
|
|
89324
89428
|
'setLeverage': true,
|
|
89325
89429
|
'setMarginMode': true,
|
|
89326
89430
|
'setPositionMode': false,
|
|
@@ -92485,16 +92589,19 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
92485
92589
|
const maintenanceMargin = this.safeString(position, 'mainten_margin_amount');
|
|
92486
92590
|
const maintenanceMarginPercentage = this.safeString(position, 'mainten_margin');
|
|
92487
92591
|
const collateral = this.safeString(position, 'margin_amount');
|
|
92488
|
-
const leverage = this.
|
|
92592
|
+
const leverage = this.safeString(position, 'leverage');
|
|
92593
|
+
const notional = this.safeString(position, 'open_val');
|
|
92594
|
+
const initialMargin = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv(notional, leverage);
|
|
92595
|
+
const initialMarginPercentage = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringDiv('1', leverage);
|
|
92489
92596
|
return this.safePosition({
|
|
92490
92597
|
'info': position,
|
|
92491
92598
|
'id': positionId,
|
|
92492
92599
|
'symbol': symbol,
|
|
92493
|
-
'notional':
|
|
92600
|
+
'notional': this.parseNumber(notional),
|
|
92494
92601
|
'marginMode': marginMode,
|
|
92495
92602
|
'liquidationPrice': liquidationPrice,
|
|
92496
|
-
'entryPrice': entryPrice,
|
|
92497
|
-
'unrealizedPnl': unrealizedPnl,
|
|
92603
|
+
'entryPrice': this.parseNumber(entryPrice),
|
|
92604
|
+
'unrealizedPnl': this.parseNumber(unrealizedPnl),
|
|
92498
92605
|
'percentage': undefined,
|
|
92499
92606
|
'contracts': contracts,
|
|
92500
92607
|
'contractSize': this.safeNumber(market, 'contractSize'),
|
|
@@ -92505,15 +92612,15 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
92505
92612
|
'timestamp': timestamp,
|
|
92506
92613
|
'datetime': this.iso8601(timestamp),
|
|
92507
92614
|
'lastUpdateTimestamp': undefined,
|
|
92508
|
-
'maintenanceMargin': maintenanceMargin,
|
|
92509
|
-
'maintenanceMarginPercentage': maintenanceMarginPercentage,
|
|
92510
|
-
'collateral': collateral,
|
|
92511
|
-
'initialMargin':
|
|
92512
|
-
'initialMarginPercentage':
|
|
92513
|
-
'leverage': leverage,
|
|
92615
|
+
'maintenanceMargin': this.parseNumber(maintenanceMargin),
|
|
92616
|
+
'maintenanceMarginPercentage': this.parseNumber(maintenanceMarginPercentage),
|
|
92617
|
+
'collateral': this.parseNumber(collateral),
|
|
92618
|
+
'initialMargin': this.parseNumber(initialMargin),
|
|
92619
|
+
'initialMarginPercentage': this.parseNumber(initialMarginPercentage),
|
|
92620
|
+
'leverage': this.parseNumber(leverage),
|
|
92514
92621
|
'marginRatio': undefined,
|
|
92515
|
-
'stopLossPrice': this.
|
|
92516
|
-
'takeProfitPrice': this.
|
|
92622
|
+
'stopLossPrice': this.omitZero(this.safeString(position, 'stop_loss_price')),
|
|
92623
|
+
'takeProfitPrice': this.omitZero(this.safeString(position, 'take_profit_price')),
|
|
92517
92624
|
});
|
|
92518
92625
|
}
|
|
92519
92626
|
async setMarginMode(marginMode, symbol = undefined, params = {}) {
|
|
@@ -93832,21 +93939,18 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
93832
93939
|
'info': info,
|
|
93833
93940
|
};
|
|
93834
93941
|
}
|
|
93835
|
-
async
|
|
93942
|
+
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
93836
93943
|
/**
|
|
93837
93944
|
* @method
|
|
93838
|
-
* @name coinex#
|
|
93945
|
+
* @name coinex#borrowIsolatedMargin
|
|
93839
93946
|
* @description create a loan to borrow margin
|
|
93840
93947
|
* @see https://github.com/coinexcom/coinex_exchange_api/wiki/086margin_loan
|
|
93948
|
+
* @param {string} symbol unified market symbol, required for coinex
|
|
93841
93949
|
* @param {string} code unified currency code of the currency to borrow
|
|
93842
93950
|
* @param {float} amount the amount to borrow
|
|
93843
|
-
* @param {string} symbol unified market symbol, required for coinex
|
|
93844
93951
|
* @param {object} [params] extra parameters specific to the coinex api endpoint
|
|
93845
93952
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
93846
93953
|
*/
|
|
93847
|
-
if (symbol === undefined) {
|
|
93848
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
|
|
93849
|
-
}
|
|
93850
93954
|
await this.loadMarkets();
|
|
93851
93955
|
const market = this.market(symbol);
|
|
93852
93956
|
const currency = this.currency(code);
|
|
@@ -93872,22 +93976,19 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
93872
93976
|
'symbol': symbol,
|
|
93873
93977
|
});
|
|
93874
93978
|
}
|
|
93875
|
-
async
|
|
93979
|
+
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
93876
93980
|
/**
|
|
93877
93981
|
* @method
|
|
93878
|
-
* @name coinex#
|
|
93982
|
+
* @name coinex#repayIsolatedMargin
|
|
93879
93983
|
* @description repay borrowed margin and interest
|
|
93880
93984
|
* @see https://github.com/coinexcom/coinex_exchange_api/wiki/087margin_flat
|
|
93985
|
+
* @param {string} symbol unified market symbol, required for coinex
|
|
93881
93986
|
* @param {string} code unified currency code of the currency to repay
|
|
93882
93987
|
* @param {float} amount the amount to repay
|
|
93883
|
-
* @param {string} symbol unified market symbol, required for coinex
|
|
93884
93988
|
* @param {object} [params] extra parameters specific to the coinex api endpoint
|
|
93885
93989
|
* @param {string} [params.loan_id] extra parameter that is not required
|
|
93886
93990
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
93887
93991
|
*/
|
|
93888
|
-
if (symbol === undefined) {
|
|
93889
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
|
|
93890
|
-
}
|
|
93891
93992
|
await this.loadMarkets();
|
|
93892
93993
|
const market = this.market(symbol);
|
|
93893
93994
|
const currency = this.currency(code);
|
|
@@ -93896,10 +93997,6 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
93896
93997
|
'coin_type': currency['id'],
|
|
93897
93998
|
'amount': this.currencyToPrecision(code, amount),
|
|
93898
93999
|
};
|
|
93899
|
-
const loanId = this.safeInteger(params, 'loan_id');
|
|
93900
|
-
if (loanId !== undefined) {
|
|
93901
|
-
request['loan_id'] = loanId;
|
|
93902
|
-
}
|
|
93903
94000
|
const response = await this.privatePostMarginFlat(this.extend(request, params));
|
|
93904
94001
|
//
|
|
93905
94002
|
// {
|
|
@@ -133572,7 +133669,8 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
133572
133669
|
'future': true,
|
|
133573
133670
|
'option': undefined,
|
|
133574
133671
|
'addMargin': undefined,
|
|
133575
|
-
'
|
|
133672
|
+
'borrowCrossMargin': true,
|
|
133673
|
+
'borrowIsolatedMargin': true,
|
|
133576
133674
|
'cancelAllOrders': true,
|
|
133577
133675
|
'cancelOrder': true,
|
|
133578
133676
|
'cancelOrders': true,
|
|
@@ -133652,7 +133750,8 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
133652
133750
|
'fetchWithdrawals': true,
|
|
133653
133751
|
'fetchWithdrawalWhitelist': undefined,
|
|
133654
133752
|
'reduceMargin': undefined,
|
|
133655
|
-
'
|
|
133753
|
+
'repayCrossMargin': true,
|
|
133754
|
+
'repayIsolatedMargin': true,
|
|
133656
133755
|
'setLeverage': true,
|
|
133657
133756
|
'setMarginMode': false,
|
|
133658
133757
|
'setPositionMode': false,
|
|
@@ -134702,10 +134801,6 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
134702
134801
|
'deposit-earning': 'deposit-earning',
|
|
134703
134802
|
'otc-options': 'otc-options',
|
|
134704
134803
|
},
|
|
134705
|
-
'marginAccounts': {
|
|
134706
|
-
'cross': 'super-margin',
|
|
134707
|
-
'isolated': 'margin',
|
|
134708
|
-
},
|
|
134709
134804
|
'typesByAccount': {
|
|
134710
134805
|
'pro': 'spot',
|
|
134711
134806
|
'futures': 'future',
|
|
@@ -141668,41 +141763,60 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
141668
141763
|
'info': interest,
|
|
141669
141764
|
}, market);
|
|
141670
141765
|
}
|
|
141671
|
-
async
|
|
141766
|
+
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
141672
141767
|
/**
|
|
141673
141768
|
* @method
|
|
141674
|
-
* @name huobi#
|
|
141769
|
+
* @name huobi#borrowIsolatedMargin
|
|
141675
141770
|
* @description create a loan to borrow margin
|
|
141676
141771
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
|
|
141677
141772
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
|
|
141773
|
+
* @param {string} symbol unified market symbol, required for isolated margin
|
|
141678
141774
|
* @param {string} code unified currency code of the currency to borrow
|
|
141679
141775
|
* @param {float} amount the amount to borrow
|
|
141680
|
-
* @param {string} symbol unified market symbol, required for isolated margin
|
|
141681
141776
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
141682
141777
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
141683
141778
|
*/
|
|
141684
141779
|
await this.loadMarkets();
|
|
141685
141780
|
const currency = this.currency(code);
|
|
141781
|
+
const market = this.market(symbol);
|
|
141686
141782
|
const request = {
|
|
141687
141783
|
'currency': currency['id'],
|
|
141688
141784
|
'amount': this.currencyToPrecision(code, amount),
|
|
141785
|
+
'symbol': market['id'],
|
|
141689
141786
|
};
|
|
141690
|
-
|
|
141691
|
-
|
|
141692
|
-
|
|
141693
|
-
|
|
141694
|
-
|
|
141695
|
-
|
|
141696
|
-
|
|
141697
|
-
|
|
141698
|
-
|
|
141699
|
-
|
|
141700
|
-
|
|
141701
|
-
|
|
141702
|
-
|
|
141703
|
-
|
|
141704
|
-
|
|
141705
|
-
|
|
141787
|
+
const response = await this.privatePostMarginOrders(this.extend(request, params));
|
|
141788
|
+
//
|
|
141789
|
+
// Isolated
|
|
141790
|
+
//
|
|
141791
|
+
// {
|
|
141792
|
+
// "data": 1000
|
|
141793
|
+
// }
|
|
141794
|
+
//
|
|
141795
|
+
const transaction = this.parseMarginLoan(response, currency);
|
|
141796
|
+
return this.extend(transaction, {
|
|
141797
|
+
'amount': amount,
|
|
141798
|
+
'symbol': symbol,
|
|
141799
|
+
});
|
|
141800
|
+
}
|
|
141801
|
+
async borrowCrossMargin(code, amount, params = {}) {
|
|
141802
|
+
/**
|
|
141803
|
+
* @method
|
|
141804
|
+
* @name huobi#borrowCrossMargin
|
|
141805
|
+
* @description create a loan to borrow margin
|
|
141806
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-isolated
|
|
141807
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#request-a-margin-loan-cross
|
|
141808
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
141809
|
+
* @param {float} amount the amount to borrow
|
|
141810
|
+
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
141811
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
141812
|
+
*/
|
|
141813
|
+
await this.loadMarkets();
|
|
141814
|
+
const currency = this.currency(code);
|
|
141815
|
+
const request = {
|
|
141816
|
+
'currency': currency['id'],
|
|
141817
|
+
'amount': this.currencyToPrecision(code, amount),
|
|
141818
|
+
};
|
|
141819
|
+
const response = await this.privatePostCrossMarginOrders(this.extend(request, params));
|
|
141706
141820
|
//
|
|
141707
141821
|
// Cross
|
|
141708
141822
|
//
|
|
@@ -141711,38 +141825,65 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
141711
141825
|
// "data": null
|
|
141712
141826
|
// }
|
|
141713
141827
|
//
|
|
141714
|
-
|
|
141828
|
+
const transaction = this.parseMarginLoan(response, currency);
|
|
141829
|
+
return this.extend(transaction, {
|
|
141830
|
+
'amount': amount,
|
|
141831
|
+
});
|
|
141832
|
+
}
|
|
141833
|
+
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
141834
|
+
/**
|
|
141835
|
+
* @method
|
|
141836
|
+
* @name huobi#repayIsolatedMargin
|
|
141837
|
+
* @description repay borrowed margin and interest
|
|
141838
|
+
* @see https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
|
|
141839
|
+
* @param {string} code unified currency code of the currency to repay
|
|
141840
|
+
* @param {float} amount the amount to repay
|
|
141841
|
+
* @param {string} symbol unified market symbol
|
|
141842
|
+
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
141843
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
141844
|
+
*/
|
|
141845
|
+
await this.loadMarkets();
|
|
141846
|
+
const currency = this.currency(code);
|
|
141847
|
+
const accountId = await this.fetchAccountIdByType('spot', 'isolated', symbol, params);
|
|
141848
|
+
const request = {
|
|
141849
|
+
'currency': currency['id'],
|
|
141850
|
+
'amount': this.currencyToPrecision(code, amount),
|
|
141851
|
+
'accountId': accountId,
|
|
141852
|
+
};
|
|
141853
|
+
const response = await this.v2PrivatePostAccountRepayment(this.extend(request, params));
|
|
141715
141854
|
//
|
|
141716
141855
|
// {
|
|
141717
|
-
// "
|
|
141856
|
+
// "code":200,
|
|
141857
|
+
// "data": [
|
|
141858
|
+
// {
|
|
141859
|
+
// "repayId":1174424,
|
|
141860
|
+
// "repayTime":1600747722018
|
|
141861
|
+
// }
|
|
141862
|
+
// ]
|
|
141718
141863
|
// }
|
|
141719
141864
|
//
|
|
141720
|
-
const
|
|
141865
|
+
const data = this.safeValue(response, 'Data', []);
|
|
141866
|
+
const loan = this.safeValue(data, 0);
|
|
141867
|
+
const transaction = this.parseMarginLoan(loan, currency);
|
|
141721
141868
|
return this.extend(transaction, {
|
|
141722
141869
|
'amount': amount,
|
|
141723
141870
|
'symbol': symbol,
|
|
141724
141871
|
});
|
|
141725
141872
|
}
|
|
141726
|
-
async
|
|
141873
|
+
async repayCrossMargin(code, amount, params = {}) {
|
|
141727
141874
|
/**
|
|
141728
141875
|
* @method
|
|
141729
|
-
* @name huobi#
|
|
141876
|
+
* @name huobi#repayCrossMargin
|
|
141730
141877
|
* @description repay borrowed margin and interest
|
|
141731
141878
|
* @see https://huobiapi.github.io/docs/spot/v1/en/#repay-margin-loan-cross-isolated
|
|
141732
141879
|
* @param {string} code unified currency code of the currency to repay
|
|
141733
141880
|
* @param {float} amount the amount to repay
|
|
141734
|
-
* @param {string} symbol unified market symbol
|
|
141735
141881
|
* @param {object} [params] extra parameters specific to the huobi api endpoint
|
|
141736
141882
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
141737
141883
|
*/
|
|
141738
141884
|
await this.loadMarkets();
|
|
141739
141885
|
const currency = this.currency(code);
|
|
141740
|
-
|
|
141741
|
-
[marginMode, params] = this.handleMarginModeAndParams('repayMargin', params);
|
|
141742
|
-
marginMode = (marginMode === undefined) ? 'cross' : marginMode;
|
|
141743
|
-
const marginAccounts = this.safeValue(this.options, 'marginAccounts', {});
|
|
141744
|
-
const accountType = this.getSupportedMapping(marginMode, marginAccounts);
|
|
141745
|
-
const accountId = await this.fetchAccountIdByType(accountType, marginMode, symbol, params);
|
|
141886
|
+
const accountId = await this.fetchAccountIdByType('spot', 'cross', undefined, params);
|
|
141746
141887
|
const request = {
|
|
141747
141888
|
'currency': currency['id'],
|
|
141748
141889
|
'amount': this.currencyToPrecision(code, amount),
|
|
@@ -141765,7 +141906,6 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
141765
141906
|
const transaction = this.parseMarginLoan(loan, currency);
|
|
141766
141907
|
return this.extend(transaction, {
|
|
141767
141908
|
'amount': amount,
|
|
141768
|
-
'symbol': symbol,
|
|
141769
141909
|
});
|
|
141770
141910
|
}
|
|
141771
141911
|
parseMarginLoan(info, currency = undefined) {
|
|
@@ -141792,7 +141932,7 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
141792
141932
|
//
|
|
141793
141933
|
const timestamp = this.safeInteger(info, 'repayTime');
|
|
141794
141934
|
return {
|
|
141795
|
-
'id': this.
|
|
141935
|
+
'id': this.safeString2(info, 'repayId', 'data'),
|
|
141796
141936
|
'currency': this.safeCurrencyCode(undefined, currency),
|
|
141797
141937
|
'amount': undefined,
|
|
141798
141938
|
'symbol': undefined,
|
|
@@ -144139,31 +144279,6 @@ class huobijp extends _abstract_huobijp_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
|
|
|
144139
144279
|
}
|
|
144140
144280
|
|
|
144141
144281
|
|
|
144142
|
-
/***/ }),
|
|
144143
|
-
|
|
144144
|
-
/***/ 5547:
|
|
144145
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
144146
|
-
|
|
144147
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
144148
|
-
/* harmony export */ Z: () => (/* binding */ huobipro)
|
|
144149
|
-
/* harmony export */ });
|
|
144150
|
-
/* harmony import */ var _huobi_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8146);
|
|
144151
|
-
// ---------------------------------------------------------------------------
|
|
144152
|
-
|
|
144153
|
-
// ---------------------------------------------------------------------------
|
|
144154
|
-
class huobipro extends _huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
144155
|
-
describe() {
|
|
144156
|
-
// this is an alias for backward-compatibility
|
|
144157
|
-
// to be removed soon
|
|
144158
|
-
return this.deepExtend(super.describe(), {
|
|
144159
|
-
'id': 'huobipro',
|
|
144160
|
-
'alias': true,
|
|
144161
|
-
'name': 'Huobi Pro',
|
|
144162
|
-
});
|
|
144163
|
-
}
|
|
144164
|
-
}
|
|
144165
|
-
|
|
144166
|
-
|
|
144167
144282
|
/***/ }),
|
|
144168
144283
|
|
|
144169
144284
|
/***/ 8232:
|
|
@@ -152914,7 +153029,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
152914
153029
|
'swap': false,
|
|
152915
153030
|
'future': false,
|
|
152916
153031
|
'option': false,
|
|
152917
|
-
'
|
|
153032
|
+
'borrowCrossMargin': true,
|
|
153033
|
+
'borrowIsolatedMargin': true,
|
|
152918
153034
|
'cancelAllOrders': true,
|
|
152919
153035
|
'cancelOrder': true,
|
|
152920
153036
|
'createDepositAddress': true,
|
|
@@ -152975,7 +153091,8 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
152975
153091
|
'fetchTransactionFee': true,
|
|
152976
153092
|
'fetchTransfers': false,
|
|
152977
153093
|
'fetchWithdrawals': true,
|
|
152978
|
-
'
|
|
153094
|
+
'repayCrossMargin': true,
|
|
153095
|
+
'repayIsolatedMargin': true,
|
|
152979
153096
|
'setLeverage': false,
|
|
152980
153097
|
'setMarginMode': false,
|
|
152981
153098
|
'setPositionMode': false,
|
|
@@ -155101,17 +155218,20 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
155101
155218
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' cancelAllOrders does not support isolated margin for stop orders');
|
|
155102
155219
|
}
|
|
155103
155220
|
}
|
|
155104
|
-
let
|
|
155221
|
+
let response = undefined;
|
|
155105
155222
|
if (stop) {
|
|
155106
|
-
|
|
155223
|
+
response = await this.privateDeleteStopOrderCancel(this.extend(request, query));
|
|
155107
155224
|
}
|
|
155108
155225
|
else if (hf) {
|
|
155109
155226
|
if (symbol === undefined) {
|
|
155110
155227
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol parameter for hf orders');
|
|
155111
155228
|
}
|
|
155112
|
-
|
|
155229
|
+
response = await this.privateDeleteHfOrders(this.extend(request, query));
|
|
155113
155230
|
}
|
|
155114
|
-
|
|
155231
|
+
else {
|
|
155232
|
+
response = await this.privateDeleteOrders(this.extend(request, query));
|
|
155233
|
+
}
|
|
155234
|
+
return response;
|
|
155115
155235
|
}
|
|
155116
155236
|
async fetchOrdersByStatus(status, symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
155117
155237
|
/**
|
|
@@ -155168,20 +155288,22 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
155168
155288
|
if (until) {
|
|
155169
155289
|
request['endAt'] = until;
|
|
155170
155290
|
}
|
|
155171
|
-
|
|
155291
|
+
request['tradeType'] = this.safeString(this.options['marginModes'], marginMode, 'TRADE');
|
|
155292
|
+
let response = undefined;
|
|
155172
155293
|
if (stop) {
|
|
155173
|
-
|
|
155294
|
+
response = await this.privateGetStopOrder(this.extend(request, query));
|
|
155174
155295
|
}
|
|
155175
155296
|
else if (hf) {
|
|
155176
155297
|
if (lowercaseStatus === 'active') {
|
|
155177
|
-
|
|
155298
|
+
response = await this.privateGetHfOrdersActive(this.extend(request, query));
|
|
155178
155299
|
}
|
|
155179
155300
|
else if (lowercaseStatus === 'done') {
|
|
155180
|
-
|
|
155301
|
+
response = await this.privateGetHfOrdersDone(this.extend(request, query));
|
|
155181
155302
|
}
|
|
155182
155303
|
}
|
|
155183
|
-
|
|
155184
|
-
|
|
155304
|
+
else {
|
|
155305
|
+
response = await this.privateGetOrders(this.extend(request, query));
|
|
155306
|
+
}
|
|
155185
155307
|
//
|
|
155186
155308
|
// {
|
|
155187
155309
|
// "code": "200000",
|
|
@@ -155326,21 +155448,21 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
155326
155448
|
}
|
|
155327
155449
|
request['symbol'] = market['id'];
|
|
155328
155450
|
}
|
|
155329
|
-
params = this.omit(params, ['stop', 'hf']);
|
|
155330
|
-
let
|
|
155451
|
+
params = this.omit(params, ['stop', 'hf', 'clientOid', 'clientOrderId']);
|
|
155452
|
+
let response = undefined;
|
|
155331
155453
|
if (clientOrderId !== undefined) {
|
|
155332
155454
|
request['clientOid'] = clientOrderId;
|
|
155333
155455
|
if (stop) {
|
|
155334
|
-
method = 'privateGetStopOrderQueryOrderByClientOid';
|
|
155335
155456
|
if (symbol !== undefined) {
|
|
155336
155457
|
request['symbol'] = market['id'];
|
|
155337
155458
|
}
|
|
155459
|
+
response = await this.privateGetStopOrderQueryOrderByClientOid(this.extend(request, params));
|
|
155338
155460
|
}
|
|
155339
155461
|
else if (hf) {
|
|
155340
|
-
|
|
155462
|
+
response = await this.privateGetHfOrdersClientOrderClientOid(this.extend(request, params));
|
|
155341
155463
|
}
|
|
155342
155464
|
else {
|
|
155343
|
-
|
|
155465
|
+
response = await this.privateGetOrderClientOrderClientOid(this.extend(request, params));
|
|
155344
155466
|
}
|
|
155345
155467
|
}
|
|
155346
155468
|
else {
|
|
@@ -155350,18 +155472,19 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
155350
155472
|
if (id === undefined) {
|
|
155351
155473
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' fetchOrder() requires an order id');
|
|
155352
155474
|
}
|
|
155475
|
+
request['orderId'] = id;
|
|
155353
155476
|
if (stop) {
|
|
155354
|
-
|
|
155477
|
+
response = await this.privateGetStopOrderOrderId(this.extend(request, params));
|
|
155355
155478
|
}
|
|
155356
155479
|
else if (hf) {
|
|
155357
|
-
|
|
155480
|
+
response = await this.privateGetHfOrdersOrderId(this.extend(request, params));
|
|
155481
|
+
}
|
|
155482
|
+
else {
|
|
155483
|
+
response = await this.privateGetOrdersOrderId(this.extend(request, params));
|
|
155358
155484
|
}
|
|
155359
|
-
request['orderId'] = id;
|
|
155360
155485
|
}
|
|
155361
|
-
params = this.omit(params, ['clientOid', 'clientOrderId']);
|
|
155362
|
-
const response = await this[method](this.extend(request, params));
|
|
155363
155486
|
let responseData = this.safeValue(response, 'data');
|
|
155364
|
-
if (
|
|
155487
|
+
if (Array.isArray(responseData)) {
|
|
155365
155488
|
responseData = this.safeValue(responseData, 0);
|
|
155366
155489
|
}
|
|
155367
155490
|
return this.parseOrder(responseData, market);
|
|
@@ -155603,10 +155726,12 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
155603
155726
|
if (limit !== undefined) {
|
|
155604
155727
|
request['pageSize'] = limit;
|
|
155605
155728
|
}
|
|
155606
|
-
|
|
155729
|
+
const method = this.options['fetchMyTradesMethod'];
|
|
155607
155730
|
let parseResponseData = false;
|
|
155731
|
+
let response = undefined;
|
|
155732
|
+
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
155608
155733
|
if (hf) {
|
|
155609
|
-
|
|
155734
|
+
response = await this.privateGetHfFills(this.extend(request, params));
|
|
155610
155735
|
}
|
|
155611
155736
|
else if (method === 'private_get_fills') {
|
|
155612
155737
|
// does not return trades earlier than 2019-02-18T00:00:00Z
|
|
@@ -155614,26 +155739,18 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
155614
155739
|
// only returns trades up to one week after the since param
|
|
155615
155740
|
request['startAt'] = since;
|
|
155616
155741
|
}
|
|
155742
|
+
response = await this.privateGetFills(this.extend(request, params));
|
|
155617
155743
|
}
|
|
155618
155744
|
else if (method === 'private_get_limit_fills') {
|
|
155619
155745
|
// does not return trades earlier than 2019-02-18T00:00:00Z
|
|
155620
155746
|
// takes no params
|
|
155621
155747
|
// only returns first 1000 trades (not only "in the last 24 hours" as stated in the docs)
|
|
155622
155748
|
parseResponseData = true;
|
|
155623
|
-
|
|
155624
|
-
else if (method === 'private_get_hist_orders') {
|
|
155625
|
-
// despite that this endpoint is called `HistOrders`
|
|
155626
|
-
// it returns historical trades instead of orders
|
|
155627
|
-
// returns trades earlier than 2019-02-18T00:00:00Z only
|
|
155628
|
-
if (since !== undefined) {
|
|
155629
|
-
request['startAt'] = this.parseToInt(since / 1000);
|
|
155630
|
-
}
|
|
155749
|
+
response = await this.privateGetLimitFills(this.extend(request, params));
|
|
155631
155750
|
}
|
|
155632
155751
|
else {
|
|
155633
155752
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ExchangeError(this.id + ' fetchMyTradesMethod() invalid method');
|
|
155634
155753
|
}
|
|
155635
|
-
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
155636
|
-
const response = await this[method](this.extend(request, params));
|
|
155637
155754
|
//
|
|
155638
155755
|
// {
|
|
155639
155756
|
// "currentPage": 1,
|
|
@@ -156076,8 +156193,6 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156076
156193
|
/**
|
|
156077
156194
|
* @method
|
|
156078
156195
|
* @name kucoin#fetchDeposits
|
|
156079
|
-
* @see https://docs.kucoin.com/#get-deposit-list
|
|
156080
|
-
* @see https://docs.kucoin.com/#get-v1-historical-deposits-list
|
|
156081
156196
|
* @description fetch all deposits made to an account
|
|
156082
156197
|
* @see https://docs.kucoin.com/#get-deposit-list
|
|
156083
156198
|
* @see https://docs.kucoin.com/#get-v1-historical-deposits-list
|
|
@@ -156104,19 +156219,19 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156104
156219
|
if (limit !== undefined) {
|
|
156105
156220
|
request['pageSize'] = limit;
|
|
156106
156221
|
}
|
|
156107
|
-
|
|
156108
|
-
|
|
156222
|
+
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
156223
|
+
let response = undefined;
|
|
156224
|
+
if (since !== undefined && since < 1550448000000) {
|
|
156109
156225
|
// if since is earlier than 2019-02-18T00:00:00Z
|
|
156110
|
-
|
|
156111
|
-
|
|
156112
|
-
|
|
156113
|
-
|
|
156114
|
-
|
|
156226
|
+
request['startAt'] = this.parseToInt(since / 1000);
|
|
156227
|
+
response = await this.privateGetHistDeposits(this.extend(request, params));
|
|
156228
|
+
}
|
|
156229
|
+
else {
|
|
156230
|
+
if (since !== undefined) {
|
|
156115
156231
|
request['startAt'] = since;
|
|
156116
156232
|
}
|
|
156233
|
+
response = await this.privateGetDeposits(this.extend(request, params));
|
|
156117
156234
|
}
|
|
156118
|
-
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
156119
|
-
const response = await this[method](this.extend(request, params));
|
|
156120
156235
|
//
|
|
156121
156236
|
// {
|
|
156122
156237
|
// "code": "200000",
|
|
@@ -156188,19 +156303,19 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156188
156303
|
if (limit !== undefined) {
|
|
156189
156304
|
request['pageSize'] = limit;
|
|
156190
156305
|
}
|
|
156191
|
-
|
|
156192
|
-
|
|
156306
|
+
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
156307
|
+
let response = undefined;
|
|
156308
|
+
if (since !== undefined && since < 1550448000000) {
|
|
156193
156309
|
// if since is earlier than 2019-02-18T00:00:00Z
|
|
156194
|
-
|
|
156195
|
-
|
|
156196
|
-
|
|
156197
|
-
|
|
156198
|
-
|
|
156310
|
+
request['startAt'] = this.parseToInt(since / 1000);
|
|
156311
|
+
response = await this.privateGetHistWithdrawals(this.extend(request, params));
|
|
156312
|
+
}
|
|
156313
|
+
else {
|
|
156314
|
+
if (since !== undefined) {
|
|
156199
156315
|
request['startAt'] = since;
|
|
156200
156316
|
}
|
|
156317
|
+
response = await this.privateGetWithdrawals(this.extend(request, params));
|
|
156201
156318
|
}
|
|
156202
|
-
[request, params] = this.handleUntilOption('endAt', request, params);
|
|
156203
|
-
const response = await this[method](this.extend(request, params));
|
|
156204
156319
|
//
|
|
156205
156320
|
// {
|
|
156206
156321
|
// "code": "200000",
|
|
@@ -156277,26 +156392,26 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156277
156392
|
const type = this.safeString(accountsByType, requestedType, requestedType);
|
|
156278
156393
|
params = this.omit(params, 'type');
|
|
156279
156394
|
const [marginMode, query] = this.handleMarginModeAndParams('fetchBalance', params);
|
|
156280
|
-
let
|
|
156395
|
+
let response = undefined;
|
|
156281
156396
|
const request = {};
|
|
156282
156397
|
const isolated = (marginMode === 'isolated') || (type === 'isolated');
|
|
156283
156398
|
const cross = (marginMode === 'cross') || (type === 'cross');
|
|
156284
156399
|
if (isolated) {
|
|
156285
|
-
method = 'privateGetIsolatedAccounts';
|
|
156286
156400
|
if (currency !== undefined) {
|
|
156287
156401
|
request['balanceCurrency'] = currency['id'];
|
|
156288
156402
|
}
|
|
156403
|
+
response = await this.privateGetIsolatedAccounts(this.extend(request, query));
|
|
156289
156404
|
}
|
|
156290
156405
|
else if (cross) {
|
|
156291
|
-
|
|
156406
|
+
response = await this.privateGetMarginAccount(this.extend(request, query));
|
|
156292
156407
|
}
|
|
156293
156408
|
else {
|
|
156294
156409
|
if (currency !== undefined) {
|
|
156295
156410
|
request['currency'] = currency['id'];
|
|
156296
156411
|
}
|
|
156297
156412
|
request['type'] = type;
|
|
156413
|
+
response = await this.privateGetAccounts(this.extend(request, query));
|
|
156298
156414
|
}
|
|
156299
|
-
const response = await this[method](this.extend(request, query));
|
|
156300
156415
|
//
|
|
156301
156416
|
// Spot and Cross
|
|
156302
156417
|
//
|
|
@@ -156836,43 +156951,37 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156836
156951
|
marginMode = 'cross'; // cross as default marginMode
|
|
156837
156952
|
}
|
|
156838
156953
|
const request = {};
|
|
156839
|
-
let
|
|
156954
|
+
let response = undefined;
|
|
156955
|
+
if (code !== undefined) {
|
|
156956
|
+
const currency = this.currency(code);
|
|
156957
|
+
request['quoteCurrency'] = currency['id'];
|
|
156958
|
+
}
|
|
156840
156959
|
if (marginMode === 'isolated') {
|
|
156841
|
-
|
|
156842
|
-
const currency = this.currency(code);
|
|
156843
|
-
request['balanceCurrency'] = currency['id'];
|
|
156844
|
-
}
|
|
156845
|
-
method = 'privateGetIsolatedAccounts';
|
|
156960
|
+
response = await this.privateGetIsolatedAccounts(this.extend(request, params));
|
|
156846
156961
|
}
|
|
156847
156962
|
else {
|
|
156848
|
-
|
|
156849
|
-
const currency = this.currency(code);
|
|
156850
|
-
request['currency'] = currency['id'];
|
|
156851
|
-
}
|
|
156963
|
+
response = await this.privateGetMarginAccounts(this.extend(request, params));
|
|
156852
156964
|
}
|
|
156853
|
-
const response = await this[method](this.extend(request, params));
|
|
156854
156965
|
//
|
|
156855
156966
|
// Cross
|
|
156856
156967
|
//
|
|
156857
156968
|
// {
|
|
156858
156969
|
// "code": "200000",
|
|
156859
156970
|
// "data": {
|
|
156860
|
-
// "
|
|
156861
|
-
// "
|
|
156862
|
-
// "
|
|
156863
|
-
// "
|
|
156864
|
-
// "
|
|
156971
|
+
// "totalAssetOfQuoteCurrency": "0",
|
|
156972
|
+
// "totalLiabilityOfQuoteCurrency": "0",
|
|
156973
|
+
// "debtRatio": "0",
|
|
156974
|
+
// "status": "EFFECTIVE",
|
|
156975
|
+
// "accounts": [
|
|
156865
156976
|
// {
|
|
156866
|
-
// "
|
|
156867
|
-
// "
|
|
156868
|
-
// "
|
|
156869
|
-
// "
|
|
156870
|
-
// "liability": "
|
|
156871
|
-
// "
|
|
156872
|
-
// "
|
|
156873
|
-
// "
|
|
156874
|
-
// "createdAt": 1658970912000,
|
|
156875
|
-
// "maturityTime": 1659575713000
|
|
156977
|
+
// "currency": "1INCH",
|
|
156978
|
+
// "total": "0",
|
|
156979
|
+
// "available": "0",
|
|
156980
|
+
// "hold": "0",
|
|
156981
|
+
// "liability": "0",
|
|
156982
|
+
// "maxBorrowSize": "0",
|
|
156983
|
+
// "borrowEnabled": true,
|
|
156984
|
+
// "transferInEnabled": true
|
|
156876
156985
|
// }
|
|
156877
156986
|
// ]
|
|
156878
156987
|
// }
|
|
@@ -156887,34 +156996,38 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156887
156996
|
// "liabilityConversionBalance": "0.01480001",
|
|
156888
156997
|
// "assets": [
|
|
156889
156998
|
// {
|
|
156890
|
-
// "symbol": "
|
|
156891
|
-
// "status": "CLEAR",
|
|
156999
|
+
// "symbol": "MANA-USDT",
|
|
156892
157000
|
// "debtRatio": "0",
|
|
157001
|
+
// "status": "BORROW",
|
|
156893
157002
|
// "baseAsset": {
|
|
156894
|
-
// "currency": "
|
|
156895
|
-
// "
|
|
156896
|
-
// "
|
|
156897
|
-
// "
|
|
156898
|
-
// "
|
|
156899
|
-
// "
|
|
156900
|
-
// "
|
|
157003
|
+
// "currency": "MANA",
|
|
157004
|
+
// "borrowEnabled": true,
|
|
157005
|
+
// "repayEnabled": true,
|
|
157006
|
+
// "transferEnabled": true,
|
|
157007
|
+
// "borrowed": "0",
|
|
157008
|
+
// "totalAsset": "0",
|
|
157009
|
+
// "available": "0",
|
|
157010
|
+
// "hold": "0",
|
|
157011
|
+
// "maxBorrowSize": "1000"
|
|
156901
157012
|
// },
|
|
156902
157013
|
// "quoteAsset": {
|
|
156903
157014
|
// "currency": "USDT",
|
|
156904
|
-
// "
|
|
156905
|
-
// "
|
|
156906
|
-
// "
|
|
156907
|
-
// "
|
|
156908
|
-
// "
|
|
156909
|
-
// "
|
|
157015
|
+
// "borrowEnabled": true,
|
|
157016
|
+
// "repayEnabled": true,
|
|
157017
|
+
// "transferEnabled": true,
|
|
157018
|
+
// "borrowed": "0",
|
|
157019
|
+
// "totalAsset": "0",
|
|
157020
|
+
// "available": "0",
|
|
157021
|
+
// "hold": "0",
|
|
157022
|
+
// "maxBorrowSize": "50000"
|
|
156910
157023
|
// }
|
|
156911
|
-
// }
|
|
157024
|
+
// }
|
|
156912
157025
|
// ]
|
|
156913
157026
|
// }
|
|
156914
157027
|
// }
|
|
156915
157028
|
//
|
|
156916
157029
|
const data = this.safeValue(response, 'data', {});
|
|
156917
|
-
const assets = (marginMode === 'isolated') ? this.safeValue(data, 'assets', []) : this.safeValue(data, '
|
|
157030
|
+
const assets = (marginMode === 'isolated') ? this.safeValue(data, 'assets', []) : this.safeValue(data, 'accounts', []);
|
|
156918
157031
|
return this.parseBorrowInterests(assets, undefined);
|
|
156919
157032
|
}
|
|
156920
157033
|
parseBorrowInterest(info, market = undefined) {
|
|
@@ -156922,43 +157035,45 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156922
157035
|
// Cross
|
|
156923
157036
|
//
|
|
156924
157037
|
// {
|
|
156925
|
-
// "
|
|
156926
|
-
// "
|
|
156927
|
-
// "
|
|
156928
|
-
// "
|
|
156929
|
-
// "liability": "
|
|
156930
|
-
// "
|
|
156931
|
-
// "
|
|
156932
|
-
// "
|
|
156933
|
-
//
|
|
156934
|
-
// "maturityTime": 1659575713000
|
|
156935
|
-
// },
|
|
157038
|
+
// "currency": "1INCH",
|
|
157039
|
+
// "total": "0",
|
|
157040
|
+
// "available": "0",
|
|
157041
|
+
// "hold": "0",
|
|
157042
|
+
// "liability": "0",
|
|
157043
|
+
// "maxBorrowSize": "0",
|
|
157044
|
+
// "borrowEnabled": true,
|
|
157045
|
+
// "transferInEnabled": true
|
|
157046
|
+
// }
|
|
156936
157047
|
//
|
|
156937
157048
|
// Isolated
|
|
156938
157049
|
//
|
|
156939
157050
|
// {
|
|
156940
|
-
// "symbol": "
|
|
156941
|
-
// "status": "CLEAR",
|
|
157051
|
+
// "symbol": "MANA-USDT",
|
|
156942
157052
|
// "debtRatio": "0",
|
|
157053
|
+
// "status": "BORROW",
|
|
156943
157054
|
// "baseAsset": {
|
|
156944
|
-
// "currency": "
|
|
156945
|
-
// "
|
|
156946
|
-
// "
|
|
156947
|
-
// "
|
|
156948
|
-
// "
|
|
156949
|
-
// "
|
|
156950
|
-
// "
|
|
157055
|
+
// "currency": "MANA",
|
|
157056
|
+
// "borrowEnabled": true,
|
|
157057
|
+
// "repayEnabled": true,
|
|
157058
|
+
// "transferEnabled": true,
|
|
157059
|
+
// "borrowed": "0",
|
|
157060
|
+
// "totalAsset": "0",
|
|
157061
|
+
// "available": "0",
|
|
157062
|
+
// "hold": "0",
|
|
157063
|
+
// "maxBorrowSize": "1000"
|
|
156951
157064
|
// },
|
|
156952
157065
|
// "quoteAsset": {
|
|
156953
157066
|
// "currency": "USDT",
|
|
156954
|
-
// "
|
|
156955
|
-
// "
|
|
156956
|
-
// "
|
|
156957
|
-
// "
|
|
156958
|
-
// "
|
|
156959
|
-
// "
|
|
157067
|
+
// "borrowEnabled": true,
|
|
157068
|
+
// "repayEnabled": true,
|
|
157069
|
+
// "transferEnabled": true,
|
|
157070
|
+
// "borrowed": "0",
|
|
157071
|
+
// "totalAsset": "0",
|
|
157072
|
+
// "available": "0",
|
|
157073
|
+
// "hold": "0",
|
|
157074
|
+
// "maxBorrowSize": "50000"
|
|
156960
157075
|
// }
|
|
156961
|
-
// }
|
|
157076
|
+
// }
|
|
156962
157077
|
//
|
|
156963
157078
|
const marketId = this.safeString(info, 'symbol');
|
|
156964
157079
|
const marginMode = (marketId === undefined) ? 'cross' : 'isolated';
|
|
@@ -156975,7 +157090,7 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156975
157090
|
currencyId = this.safeString(isolatedBase, 'currency');
|
|
156976
157091
|
}
|
|
156977
157092
|
else {
|
|
156978
|
-
amountBorrowed = this.safeNumber(info, '
|
|
157093
|
+
amountBorrowed = this.safeNumber(info, 'liability');
|
|
156979
157094
|
interest = this.safeNumber(info, 'accruedInterest');
|
|
156980
157095
|
currencyId = this.safeString(info, 'currency');
|
|
156981
157096
|
}
|
|
@@ -156991,41 +157106,64 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
156991
157106
|
'info': info,
|
|
156992
157107
|
};
|
|
156993
157108
|
}
|
|
156994
|
-
async
|
|
157109
|
+
async borrowCrossMargin(code, amount, params = {}) {
|
|
156995
157110
|
/**
|
|
156996
157111
|
* @method
|
|
156997
|
-
* @name kucoin#
|
|
157112
|
+
* @name kucoin#borrowCrossMargin
|
|
156998
157113
|
* @description create a loan to borrow margin
|
|
156999
157114
|
* @see https://docs.kucoin.com/#1-margin-borrowing
|
|
157000
157115
|
* @param {string} code unified currency code of the currency to borrow
|
|
157001
157116
|
* @param {float} amount the amount to borrow
|
|
157117
|
+
* @param {object} [params] extra parameters specific to the kucoin api endpoints
|
|
157118
|
+
* @param {string} [params.timeInForce] either IOC or FOK
|
|
157119
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
157120
|
+
*/
|
|
157121
|
+
await this.loadMarkets();
|
|
157122
|
+
const currency = this.currency(code);
|
|
157123
|
+
const request = {
|
|
157124
|
+
'currency': currency['id'],
|
|
157125
|
+
'size': this.currencyToPrecision(code, amount),
|
|
157126
|
+
'timeInForce': 'FOK',
|
|
157127
|
+
};
|
|
157128
|
+
const response = await this.privatePostMarginBorrow(this.extend(request, params));
|
|
157129
|
+
//
|
|
157130
|
+
// {
|
|
157131
|
+
// "success": true,
|
|
157132
|
+
// "code": "200",
|
|
157133
|
+
// "msg": "success",
|
|
157134
|
+
// "retry": false,
|
|
157135
|
+
// "data": {
|
|
157136
|
+
// "orderNo": "5da6dba0f943c0c81f5d5db5",
|
|
157137
|
+
// "actualSize": 10
|
|
157138
|
+
// }
|
|
157139
|
+
// }
|
|
157140
|
+
//
|
|
157141
|
+
const data = this.safeValue(response, 'data', {});
|
|
157142
|
+
return this.parseMarginLoan(data, currency);
|
|
157143
|
+
}
|
|
157144
|
+
async borrowIsolatedMargin(symbol, code, amount, params = {}) {
|
|
157145
|
+
/**
|
|
157146
|
+
* @method
|
|
157147
|
+
* @name kucoin#borrowIsolatedMargin
|
|
157148
|
+
* @description create a loan to borrow margin
|
|
157149
|
+
* @see https://docs.kucoin.com/#1-margin-borrowing
|
|
157002
157150
|
* @param {string} symbol unified market symbol, required for isolated margin
|
|
157151
|
+
* @param {string} code unified currency code of the currency to borrow
|
|
157152
|
+
* @param {float} amount the amount to borrow
|
|
157003
157153
|
* @param {object} [params] extra parameters specific to the kucoin api endpoints
|
|
157004
157154
|
* @param {string} [params.timeInForce] either IOC or FOK
|
|
157005
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
|
|
157006
157155
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
157007
157156
|
*/
|
|
157008
|
-
const marginMode = this.safeString(params, 'marginMode'); // cross or isolated
|
|
157009
|
-
const isIsolated = marginMode === 'isolated';
|
|
157010
|
-
params = this.omit(params, 'marginMode');
|
|
157011
|
-
this.checkRequiredMarginArgument('borrowMargin', symbol, marginMode);
|
|
157012
157157
|
await this.loadMarkets();
|
|
157158
|
+
const market = this.market(symbol);
|
|
157013
157159
|
const currency = this.currency(code);
|
|
157014
157160
|
const request = {
|
|
157015
157161
|
'currency': currency['id'],
|
|
157016
157162
|
'size': this.currencyToPrecision(code, amount),
|
|
157163
|
+
'symbol': market['id'],
|
|
157164
|
+
'timeInForce': 'FOK',
|
|
157165
|
+
'isIsolated': true,
|
|
157017
157166
|
};
|
|
157018
|
-
const timeInForce = this.safeStringN(params, ['timeInForce', 'type', 'borrowStrategy'], 'IOC');
|
|
157019
|
-
if (isIsolated) {
|
|
157020
|
-
if (symbol === undefined) {
|
|
157021
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' borrowMargin() requires a symbol parameter for isolated margin');
|
|
157022
|
-
}
|
|
157023
|
-
const market = this.market(symbol);
|
|
157024
|
-
request['symbol'] = market['id'];
|
|
157025
|
-
request['isIsolated'] = true;
|
|
157026
|
-
}
|
|
157027
|
-
params = this.omit(params, ['timeInForce', 'type', 'borrowStrategy']);
|
|
157028
|
-
request['timeInForce'] = timeInForce;
|
|
157029
157167
|
const response = await this.privatePostMarginBorrow(this.extend(request, params));
|
|
157030
157168
|
//
|
|
157031
157169
|
// {
|
|
@@ -157042,37 +157180,60 @@ class kucoin extends _abstract_kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
157042
157180
|
const data = this.safeValue(response, 'data', {});
|
|
157043
157181
|
return this.parseMarginLoan(data, currency);
|
|
157044
157182
|
}
|
|
157045
|
-
async
|
|
157183
|
+
async repayCrossMargin(code, amount, params = {}) {
|
|
157046
157184
|
/**
|
|
157047
157185
|
* @method
|
|
157048
|
-
* @name kucoin#
|
|
157186
|
+
* @name kucoin#repayCrossMargin
|
|
157049
157187
|
* @description repay borrowed margin and interest
|
|
157050
157188
|
* @see https://docs.kucoin.com/#2-repayment
|
|
157051
157189
|
* @param {string} code unified currency code of the currency to repay
|
|
157052
157190
|
* @param {float} amount the amount to repay
|
|
157191
|
+
* @param {object} [params] extra parameters specific to the kucoin api endpoints
|
|
157192
|
+
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
157193
|
+
*/
|
|
157194
|
+
await this.loadMarkets();
|
|
157195
|
+
const currency = this.currency(code);
|
|
157196
|
+
const request = {
|
|
157197
|
+
'currency': currency['id'],
|
|
157198
|
+
'size': this.currencyToPrecision(code, amount),
|
|
157199
|
+
};
|
|
157200
|
+
const response = await this.privatePostMarginRepay(this.extend(request, params));
|
|
157201
|
+
//
|
|
157202
|
+
// {
|
|
157203
|
+
// "success": true,
|
|
157204
|
+
// "code": "200",
|
|
157205
|
+
// "msg": "success",
|
|
157206
|
+
// "retry": false,
|
|
157207
|
+
// "data": {
|
|
157208
|
+
// "orderNo": "5da6dba0f943c0c81f5d5db5",
|
|
157209
|
+
// "actualSize": 10
|
|
157210
|
+
// }
|
|
157211
|
+
// }
|
|
157212
|
+
//
|
|
157213
|
+
const data = this.safeValue(response, 'data', {});
|
|
157214
|
+
return this.parseMarginLoan(data, currency);
|
|
157215
|
+
}
|
|
157216
|
+
async repayIsolatedMargin(symbol, code, amount, params = {}) {
|
|
157217
|
+
/**
|
|
157218
|
+
* @method
|
|
157219
|
+
* @name kucoin#repayIsolatedMargin
|
|
157220
|
+
* @description repay borrowed margin and interest
|
|
157221
|
+
* @see https://docs.kucoin.com/#2-repayment
|
|
157053
157222
|
* @param {string} symbol unified market symbol
|
|
157223
|
+
* @param {string} code unified currency code of the currency to repay
|
|
157224
|
+
* @param {float} amount the amount to repay
|
|
157054
157225
|
* @param {object} [params] extra parameters specific to the kucoin api endpoints
|
|
157055
|
-
* @param {string} [params.marginMode] 'cross' or 'isolated' default is 'cross'
|
|
157056
157226
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
157057
157227
|
*/
|
|
157058
|
-
const marginMode = this.safeString(params, 'marginMode'); // cross or isolated
|
|
157059
|
-
const isIsolated = marginMode === 'isolated';
|
|
157060
|
-
params = this.omit(params, 'marginMode');
|
|
157061
|
-
this.checkRequiredMarginArgument('repayMargin', symbol, marginMode);
|
|
157062
157228
|
await this.loadMarkets();
|
|
157229
|
+
const market = this.market(symbol);
|
|
157063
157230
|
const currency = this.currency(code);
|
|
157064
157231
|
const request = {
|
|
157065
157232
|
'currency': currency['id'],
|
|
157066
157233
|
'size': this.currencyToPrecision(code, amount),
|
|
157234
|
+
'symbol': market['id'],
|
|
157235
|
+
'isIsolated': true,
|
|
157067
157236
|
};
|
|
157068
|
-
if (isIsolated) {
|
|
157069
|
-
if (symbol === undefined) {
|
|
157070
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' repayMargin() requires a symbol parameter for isolated margin');
|
|
157071
|
-
}
|
|
157072
|
-
const market = this.market(symbol);
|
|
157073
|
-
request['symbol'] = market['id'];
|
|
157074
|
-
request['isIsolated'] = true;
|
|
157075
|
-
}
|
|
157076
157237
|
const response = await this.privatePostMarginRepay(this.extend(request, params));
|
|
157077
157238
|
//
|
|
157078
157239
|
// {
|
|
@@ -169429,7 +169590,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
169429
169590
|
'future': false,
|
|
169430
169591
|
'option': false,
|
|
169431
169592
|
'addMargin': true,
|
|
169432
|
-
'borrowMargin':
|
|
169593
|
+
'borrowMargin': false,
|
|
169433
169594
|
'cancelAllOrders': true,
|
|
169434
169595
|
'cancelOrder': true,
|
|
169435
169596
|
'cancelOrders': undefined,
|
|
@@ -169501,7 +169662,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
169501
169662
|
'fetchWithdrawal': undefined,
|
|
169502
169663
|
'fetchWithdrawals': true,
|
|
169503
169664
|
'reduceMargin': true,
|
|
169504
|
-
'repayMargin':
|
|
169665
|
+
'repayMargin': false,
|
|
169505
169666
|
'setLeverage': true,
|
|
169506
169667
|
'setMarginMode': undefined,
|
|
169507
169668
|
'setPositionMode': true,
|
|
@@ -169612,10 +169773,6 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
169612
169773
|
'capital/deposit/address': 1,
|
|
169613
169774
|
'capital/sub-account/universalTransfer': 1,
|
|
169614
169775
|
'capital/convert': 1,
|
|
169615
|
-
'margin/tradeMode': 1,
|
|
169616
|
-
'margin/order': 1,
|
|
169617
|
-
'margin/loan': 1,
|
|
169618
|
-
'margin/repay': 1,
|
|
169619
169776
|
'mxDeduct/enable': 1,
|
|
169620
169777
|
'userDataStream': 1,
|
|
169621
169778
|
},
|
|
@@ -169835,18 +169992,18 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
169835
169992
|
'networks': {
|
|
169836
169993
|
'BTC': 'BTC',
|
|
169837
169994
|
'BCH': 'BCH',
|
|
169838
|
-
'TRC20': 'TRC20',
|
|
169839
|
-
'ERC20': 'ERC20',
|
|
169840
|
-
'BEP20': 'BEP20
|
|
169841
|
-
'OPTIMISM': 'OP',
|
|
169842
|
-
'SOL': 'SOL',
|
|
169995
|
+
'TRC20': 'Tron(TRC20)',
|
|
169996
|
+
'ERC20': 'Ethereum(ERC20)',
|
|
169997
|
+
'BEP20': 'BNBSmartChain(BEP20)',
|
|
169998
|
+
'OPTIMISM': 'Optimism(OP)',
|
|
169999
|
+
'SOL': 'Solana(SOL)',
|
|
169843
170000
|
'CRC20': 'CRONOS',
|
|
169844
|
-
'ALGO': 'ALGO',
|
|
170001
|
+
'ALGO': 'Algorand(ALGO)',
|
|
169845
170002
|
'XRP': 'XRP',
|
|
169846
|
-
'MATIC': 'MATIC',
|
|
170003
|
+
'MATIC': 'Polygon(MATIC)',
|
|
169847
170004
|
'AVAXX': 'AVAX_XCHAIN',
|
|
169848
|
-
'AVAXC': '
|
|
169849
|
-
'ARBONE': '
|
|
170005
|
+
'AVAXC': 'AvalancheCChain(AVAXCCHAIN)',
|
|
170006
|
+
'ARBONE': 'ArbitrumOne(ARB)',
|
|
169850
170007
|
'ARBNOVA': 'ARBNOVA',
|
|
169851
170008
|
'FTM': 'FTM',
|
|
169852
170009
|
'WAVES': 'WAVES',
|
|
@@ -170431,10 +170588,15 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
170431
170588
|
networkId = parts.join('');
|
|
170432
170589
|
networkId = networkId.replace('-20', '20');
|
|
170433
170590
|
const networksById = {
|
|
170434
|
-
'
|
|
170435
|
-
'
|
|
170436
|
-
'
|
|
170437
|
-
'
|
|
170591
|
+
'Ethereum(ERC20)': 'ERC20',
|
|
170592
|
+
'Algorand(ALGO)': 'ALGO',
|
|
170593
|
+
'ArbitrumOne(ARB)': 'ARBONE',
|
|
170594
|
+
'AvalancheCChain(AVAXCCHAIN)': 'AVAXC',
|
|
170595
|
+
'BNBSmartChain(BEP20)': 'BEP20',
|
|
170596
|
+
'Polygon(MATIC)': 'MATIC',
|
|
170597
|
+
'Optimism(OP)': 'OPTIMISM',
|
|
170598
|
+
'Solana(SOL)': 'SOL',
|
|
170599
|
+
'Tron(TRC20)': 'TRC20',
|
|
170438
170600
|
};
|
|
170439
170601
|
return this.safeString(networksById, networkId, networkId);
|
|
170440
170602
|
}
|
|
@@ -171529,13 +171691,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
171529
171691
|
async createSpotOrder(market, type, side, amount, price = undefined, marginMode = undefined, params = {}) {
|
|
171530
171692
|
await this.loadMarkets();
|
|
171531
171693
|
const request = this.createSpotOrderRequest(market, type, side, amount, price, marginMode, params);
|
|
171532
|
-
|
|
171533
|
-
if (marginMode !== undefined) {
|
|
171534
|
-
response = await this.spotPrivatePostMarginOrder(this.extend(request, params));
|
|
171535
|
-
}
|
|
171536
|
-
else {
|
|
171537
|
-
response = await this.spotPrivatePostOrder(this.extend(request, params));
|
|
171538
|
-
}
|
|
171694
|
+
const response = await this.spotPrivatePostOrder(this.extend(request, params));
|
|
171539
171695
|
//
|
|
171540
171696
|
// spot
|
|
171541
171697
|
//
|
|
@@ -174422,82 +174578,6 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
174422
174578
|
'hedged': (positionMode === 1),
|
|
174423
174579
|
};
|
|
174424
174580
|
}
|
|
174425
|
-
async borrowMargin(code, amount, symbol = undefined, params = {}) {
|
|
174426
|
-
/**
|
|
174427
|
-
* @method
|
|
174428
|
-
* @name mexc3#borrowMargin
|
|
174429
|
-
* @description create a loan to borrow margin
|
|
174430
|
-
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#loan
|
|
174431
|
-
* @param {string} code unified currency code of the currency to borrow
|
|
174432
|
-
* @param {float} amount the amount to borrow
|
|
174433
|
-
* @param {string} symbol unified market symbol
|
|
174434
|
-
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
174435
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
174436
|
-
*/
|
|
174437
|
-
if (symbol === undefined) {
|
|
174438
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' borrowMargin() requires a symbol argument');
|
|
174439
|
-
}
|
|
174440
|
-
await this.loadMarkets();
|
|
174441
|
-
const market = this.market(symbol);
|
|
174442
|
-
const currency = this.currency(code);
|
|
174443
|
-
const request = {
|
|
174444
|
-
'asset': currency['id'],
|
|
174445
|
-
'amount': this.currencyToPrecision(code, amount),
|
|
174446
|
-
'symbol': market['id'],
|
|
174447
|
-
};
|
|
174448
|
-
const response = await this.spotPrivatePostMarginLoan(this.extend(request, params));
|
|
174449
|
-
//
|
|
174450
|
-
// {
|
|
174451
|
-
// "tranId": "762407666453712896"
|
|
174452
|
-
// }
|
|
174453
|
-
//
|
|
174454
|
-
const transaction = this.parseMarginLoan(response, currency);
|
|
174455
|
-
return this.extend(transaction, {
|
|
174456
|
-
'amount': amount,
|
|
174457
|
-
'symbol': symbol,
|
|
174458
|
-
});
|
|
174459
|
-
}
|
|
174460
|
-
async repayMargin(code, amount, symbol = undefined, params = {}) {
|
|
174461
|
-
/**
|
|
174462
|
-
* @method
|
|
174463
|
-
* @name mexc3#repayMargin
|
|
174464
|
-
* @description repay borrowed margin and interest
|
|
174465
|
-
* @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#repayment
|
|
174466
|
-
* @param {string} code unified currency code of the currency to repay
|
|
174467
|
-
* @param {float} amount the amount to repay
|
|
174468
|
-
* @param {string} symbol unified market symbol
|
|
174469
|
-
* @param {object} [params] extra parameters specific to the mexc3 api endpoint
|
|
174470
|
-
* @param {string} [params.borrowId] transaction id '762407666453712896'
|
|
174471
|
-
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
174472
|
-
*/
|
|
174473
|
-
if (symbol === undefined) {
|
|
174474
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' repayMargin() requires a symbol argument');
|
|
174475
|
-
}
|
|
174476
|
-
await this.loadMarkets();
|
|
174477
|
-
const id = this.safeString2(params, 'id', 'borrowId');
|
|
174478
|
-
if (id === undefined) {
|
|
174479
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' repayMargin() requires a borrowId argument in the params');
|
|
174480
|
-
}
|
|
174481
|
-
const market = this.market(symbol);
|
|
174482
|
-
const currency = this.currency(code);
|
|
174483
|
-
const request = {
|
|
174484
|
-
'asset': currency['id'],
|
|
174485
|
-
'amount': this.currencyToPrecision(code, amount),
|
|
174486
|
-
'borrowId': id,
|
|
174487
|
-
'symbol': market['id'],
|
|
174488
|
-
};
|
|
174489
|
-
const response = await this.spotPrivatePostMarginRepay(this.extend(request, params));
|
|
174490
|
-
//
|
|
174491
|
-
// {
|
|
174492
|
-
// "tranId": "762407666453712896"
|
|
174493
|
-
// }
|
|
174494
|
-
//
|
|
174495
|
-
const transaction = this.parseMarginLoan(response, currency);
|
|
174496
|
-
return this.extend(transaction, {
|
|
174497
|
-
'amount': amount,
|
|
174498
|
-
'symbol': symbol,
|
|
174499
|
-
});
|
|
174500
|
-
}
|
|
174501
174581
|
async fetchTransactionFees(codes = undefined, params = {}) {
|
|
174502
174582
|
/**
|
|
174503
174583
|
* @method
|
|
@@ -174685,22 +174765,6 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
174685
174765
|
}
|
|
174686
174766
|
return this.assignDefaultDepositWithdrawFees(result);
|
|
174687
174767
|
}
|
|
174688
|
-
parseMarginLoan(info, currency = undefined) {
|
|
174689
|
-
//
|
|
174690
|
-
// {
|
|
174691
|
-
// "tranId": "762407666453712896"
|
|
174692
|
-
// }
|
|
174693
|
-
//
|
|
174694
|
-
return {
|
|
174695
|
-
'id': this.safeString(info, 'tranId'),
|
|
174696
|
-
'currency': this.safeCurrencyCode(undefined, currency),
|
|
174697
|
-
'amount': undefined,
|
|
174698
|
-
'symbol': undefined,
|
|
174699
|
-
'timestamp': undefined,
|
|
174700
|
-
'datetime': undefined,
|
|
174701
|
-
'info': info,
|
|
174702
|
-
};
|
|
174703
|
-
}
|
|
174704
174768
|
handleMarginModeAndParams(methodName, params = {}, defaultValue = undefined) {
|
|
174705
174769
|
/**
|
|
174706
174770
|
* @ignore
|
|
@@ -174819,28 +174883,6 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
174819
174883
|
}
|
|
174820
174884
|
|
|
174821
174885
|
|
|
174822
|
-
/***/ }),
|
|
174823
|
-
|
|
174824
|
-
/***/ 2305:
|
|
174825
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
174826
|
-
|
|
174827
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
174828
|
-
/* harmony export */ Z: () => (/* binding */ mexc3)
|
|
174829
|
-
/* harmony export */ });
|
|
174830
|
-
/* harmony import */ var _mexc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6641);
|
|
174831
|
-
// ---------------------------------------------------------------------------
|
|
174832
|
-
|
|
174833
|
-
// ---------------------------------------------------------------------------
|
|
174834
|
-
class mexc3 extends _mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
174835
|
-
describe() {
|
|
174836
|
-
return this.deepExtend(super.describe(), {
|
|
174837
|
-
'id': 'mexc3',
|
|
174838
|
-
'alias': true,
|
|
174839
|
-
});
|
|
174840
|
-
}
|
|
174841
|
-
}
|
|
174842
|
-
|
|
174843
|
-
|
|
174844
174886
|
/***/ }),
|
|
174845
174887
|
|
|
174846
174888
|
/***/ 4531:
|
|
@@ -182889,50 +182931,6 @@ class okcoin extends _abstract_okcoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
182889
182931
|
}
|
|
182890
182932
|
|
|
182891
182933
|
|
|
182892
|
-
/***/ }),
|
|
182893
|
-
|
|
182894
|
-
/***/ 5322:
|
|
182895
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
182896
|
-
|
|
182897
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
182898
|
-
/* harmony export */ Z: () => (/* binding */ okex)
|
|
182899
|
-
/* harmony export */ });
|
|
182900
|
-
/* harmony import */ var _okx_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4042);
|
|
182901
|
-
// ---------------------------------------------------------------------------
|
|
182902
|
-
|
|
182903
|
-
// ---------------------------------------------------------------------------
|
|
182904
|
-
class okex extends _okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
182905
|
-
describe() {
|
|
182906
|
-
return this.deepExtend(super.describe(), {
|
|
182907
|
-
'id': 'okex',
|
|
182908
|
-
'alias': true,
|
|
182909
|
-
});
|
|
182910
|
-
}
|
|
182911
|
-
}
|
|
182912
|
-
|
|
182913
|
-
|
|
182914
|
-
/***/ }),
|
|
182915
|
-
|
|
182916
|
-
/***/ 7826:
|
|
182917
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
182918
|
-
|
|
182919
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
182920
|
-
/* harmony export */ Z: () => (/* binding */ okex5)
|
|
182921
|
-
/* harmony export */ });
|
|
182922
|
-
/* harmony import */ var _okex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5322);
|
|
182923
|
-
// ---------------------------------------------------------------------------
|
|
182924
|
-
|
|
182925
|
-
// ---------------------------------------------------------------------------
|
|
182926
|
-
class okex5 extends _okex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
182927
|
-
describe() {
|
|
182928
|
-
return this.deepExtend(super.describe(), {
|
|
182929
|
-
'id': 'okex5',
|
|
182930
|
-
'alias': true,
|
|
182931
|
-
});
|
|
182932
|
-
}
|
|
182933
|
-
}
|
|
182934
|
-
|
|
182935
|
-
|
|
182936
182934
|
/***/ }),
|
|
182937
182935
|
|
|
182938
182936
|
/***/ 4042:
|
|
@@ -183039,6 +183037,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
183039
183037
|
'fetchPermissions': undefined,
|
|
183040
183038
|
'fetchPosition': true,
|
|
183041
183039
|
'fetchPositions': true,
|
|
183040
|
+
'fetchPositionsForSymbol': true,
|
|
183042
183041
|
'fetchPositionsRisk': false,
|
|
183043
183042
|
'fetchPremiumIndexOHLCV': false,
|
|
183044
183043
|
'fetchSettlementHistory': true,
|
|
@@ -183061,7 +183060,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
183061
183060
|
'fetchWithdrawals': true,
|
|
183062
183061
|
'fetchWithdrawalWhitelist': false,
|
|
183063
183062
|
'reduceMargin': true,
|
|
183064
|
-
'
|
|
183063
|
+
'repayCrossMargin': true,
|
|
183065
183064
|
'setLeverage': true,
|
|
183066
183065
|
'setMargin': false,
|
|
183067
183066
|
'setMarginMode': true,
|
|
@@ -187963,7 +187962,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
187963
187962
|
if (position === undefined) {
|
|
187964
187963
|
return undefined;
|
|
187965
187964
|
}
|
|
187966
|
-
return this.parsePosition(position);
|
|
187965
|
+
return this.parsePosition(position, market);
|
|
187967
187966
|
}
|
|
187968
187967
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
187969
187968
|
/**
|
|
@@ -188050,6 +188049,19 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
188050
188049
|
}
|
|
188051
188050
|
return this.filterByArrayPositions(result, 'symbol', symbols, false);
|
|
188052
188051
|
}
|
|
188052
|
+
async fetchPositionsForSymbol(symbol, params = {}) {
|
|
188053
|
+
/**
|
|
188054
|
+
* @method
|
|
188055
|
+
* @name okx#fetchPositions
|
|
188056
|
+
* @see https://www.okx.com/docs-v5/en/#rest-api-account-get-positions
|
|
188057
|
+
* @description fetch all open positions for specific symbol
|
|
188058
|
+
* @param {string} symbol unified market symbol
|
|
188059
|
+
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
188060
|
+
* @param {string} [params.instType] MARGIN (if needed)
|
|
188061
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
188062
|
+
*/
|
|
188063
|
+
return await this.fetchPositions([symbol], params);
|
|
188064
|
+
}
|
|
188053
188065
|
parsePosition(position, market = undefined) {
|
|
188054
188066
|
//
|
|
188055
188067
|
// {
|
|
@@ -189348,15 +189360,14 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
189348
189360
|
'info': info,
|
|
189349
189361
|
};
|
|
189350
189362
|
}
|
|
189351
|
-
async
|
|
189363
|
+
async borrowCrossMargin(code, amount, params = {}) {
|
|
189352
189364
|
/**
|
|
189353
189365
|
* @method
|
|
189354
|
-
* @name okx#
|
|
189355
|
-
* @description create a loan to borrow margin
|
|
189366
|
+
* @name okx#borrowCrossMargin
|
|
189367
|
+
* @description create a loan to borrow margin (need to be VIP 5 and above)
|
|
189356
189368
|
* @see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
|
189357
189369
|
* @param {string} code unified currency code of the currency to borrow
|
|
189358
189370
|
* @param {float} amount the amount to borrow
|
|
189359
|
-
* @param {string} symbol not used by okx.borrowMargin ()
|
|
189360
189371
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
189361
189372
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
189362
189373
|
*/
|
|
@@ -189387,20 +189398,16 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
189387
189398
|
//
|
|
189388
189399
|
const data = this.safeValue(response, 'data', []);
|
|
189389
189400
|
const loan = this.safeValue(data, 0);
|
|
189390
|
-
|
|
189391
|
-
return this.extend(transaction, {
|
|
189392
|
-
'symbol': symbol,
|
|
189393
|
-
});
|
|
189401
|
+
return this.parseMarginLoan(loan, currency);
|
|
189394
189402
|
}
|
|
189395
|
-
async
|
|
189403
|
+
async repayCrossMargin(code, amount, params = {}) {
|
|
189396
189404
|
/**
|
|
189397
189405
|
* @method
|
|
189398
|
-
* @name okx#
|
|
189406
|
+
* @name okx#repayCrossMargin
|
|
189399
189407
|
* @description repay borrowed margin and interest
|
|
189400
189408
|
* @see https://www.okx.com/docs-v5/en/#rest-api-account-vip-loans-borrow-and-repay
|
|
189401
189409
|
* @param {string} code unified currency code of the currency to repay
|
|
189402
189410
|
* @param {float} amount the amount to repay
|
|
189403
|
-
* @param {string} symbol not used by okx.repayMargin ()
|
|
189404
189411
|
* @param {object} [params] extra parameters specific to the okx api endpoint
|
|
189405
189412
|
* @returns {object} a [margin loan structure]{@link https://docs.ccxt.com/#/?id=margin-loan-structure}
|
|
189406
189413
|
*/
|
|
@@ -189431,10 +189438,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
189431
189438
|
//
|
|
189432
189439
|
const data = this.safeValue(response, 'data', []);
|
|
189433
189440
|
const loan = this.safeValue(data, 0);
|
|
189434
|
-
|
|
189435
|
-
return this.extend(transaction, {
|
|
189436
|
-
'symbol': symbol,
|
|
189437
|
-
});
|
|
189441
|
+
return this.parseMarginLoan(loan, currency);
|
|
189438
189442
|
}
|
|
189439
189443
|
parseMarginLoan(info, currency = undefined) {
|
|
189440
189444
|
//
|
|
@@ -208055,6 +208059,13 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
208055
208059
|
return this.deepExtend(super.describe(), {
|
|
208056
208060
|
'has': {
|
|
208057
208061
|
'ws': true,
|
|
208062
|
+
'createOrderWs': false,
|
|
208063
|
+
'editOrderWs': false,
|
|
208064
|
+
'fetchOpenOrdersWs': false,
|
|
208065
|
+
'fetchOrderWs': false,
|
|
208066
|
+
'cancelOrderWs': false,
|
|
208067
|
+
'cancelOrdersWs': false,
|
|
208068
|
+
'cancelAllOrdersWs': false,
|
|
208058
208069
|
'watchBalance': true,
|
|
208059
208070
|
'watchMyTrades': true,
|
|
208060
208071
|
'watchOHLCV': true,
|
|
@@ -209737,6 +209748,13 @@ class bitmart extends _bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
209737
209748
|
describe() {
|
|
209738
209749
|
return this.deepExtend(super.describe(), {
|
|
209739
209750
|
'has': {
|
|
209751
|
+
'createOrderWs': false,
|
|
209752
|
+
'editOrderWs': false,
|
|
209753
|
+
'fetchOpenOrdersWs': false,
|
|
209754
|
+
'fetchOrderWs': false,
|
|
209755
|
+
'cancelOrderWs': false,
|
|
209756
|
+
'cancelOrdersWs': false,
|
|
209757
|
+
'cancelAllOrdersWs': false,
|
|
209740
209758
|
'ws': true,
|
|
209741
209759
|
'watchTicker': true,
|
|
209742
209760
|
'watchOrderBook': true,
|
|
@@ -215461,6 +215479,15 @@ class bitvavo extends _bitvavo_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
215461
215479
|
return this.deepExtend(super.describe(), {
|
|
215462
215480
|
'has': {
|
|
215463
215481
|
'ws': true,
|
|
215482
|
+
'createOrderWs': false,
|
|
215483
|
+
'editOrderWs': false,
|
|
215484
|
+
'fetchOpenOrdersWs': false,
|
|
215485
|
+
'fetchOrderWs': false,
|
|
215486
|
+
'cancelOrderWs': false,
|
|
215487
|
+
'cancelOrdersWs': false,
|
|
215488
|
+
'cancelAllOrdersWs': false,
|
|
215489
|
+
'fetchTradesWs': false,
|
|
215490
|
+
'fetchBalanceWs': false,
|
|
215464
215491
|
'watchOrderBook': true,
|
|
215465
215492
|
'watchTrades': true,
|
|
215466
215493
|
'watchTicker': true,
|
|
@@ -216993,6 +217020,15 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
216993
217020
|
return this.deepExtend(super.describe(), {
|
|
216994
217021
|
'has': {
|
|
216995
217022
|
'ws': true,
|
|
217023
|
+
'createOrderWs': false,
|
|
217024
|
+
'editOrderWs': false,
|
|
217025
|
+
'fetchOpenOrdersWs': false,
|
|
217026
|
+
'fetchOrderWs': false,
|
|
217027
|
+
'cancelOrderWs': false,
|
|
217028
|
+
'cancelOrdersWs': false,
|
|
217029
|
+
'cancelAllOrdersWs': false,
|
|
217030
|
+
'fetchTradesWs': false,
|
|
217031
|
+
'fetchBalanceWs': false,
|
|
216996
217032
|
'watchBalance': true,
|
|
216997
217033
|
'watchMyTrades': true,
|
|
216998
217034
|
'watchOHLCV': true,
|
|
@@ -229769,6 +229805,15 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
229769
229805
|
return this.deepExtend(super.describe(), {
|
|
229770
229806
|
'has': {
|
|
229771
229807
|
'ws': true,
|
|
229808
|
+
'createOrderWs': false,
|
|
229809
|
+
'editOrderWs': false,
|
|
229810
|
+
'fetchOpenOrdersWs': false,
|
|
229811
|
+
'fetchOrderWs': false,
|
|
229812
|
+
'cancelOrderWs': false,
|
|
229813
|
+
'cancelOrdersWs': false,
|
|
229814
|
+
'cancelAllOrdersWs': false,
|
|
229815
|
+
'fetchTradesWs': false,
|
|
229816
|
+
'fetchBalanceWs': false,
|
|
229772
229817
|
'watchOrderBook': true,
|
|
229773
229818
|
'watchOrders': true,
|
|
229774
229819
|
'watchTickers': false,
|
|
@@ -229785,6 +229830,7 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
229785
229830
|
'spot': {
|
|
229786
229831
|
'public': 'wss://{hostname}/ws',
|
|
229787
229832
|
'private': 'wss://{hostname}/ws/v2',
|
|
229833
|
+
'feed': 'wss://{hostname}/feed',
|
|
229788
229834
|
},
|
|
229789
229835
|
'future': {
|
|
229790
229836
|
'linear': {
|
|
@@ -229812,6 +229858,7 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
229812
229858
|
'spot': {
|
|
229813
229859
|
'public': 'wss://api-aws.huobi.pro/ws',
|
|
229814
229860
|
'private': 'wss://api-aws.huobi.pro/ws/v2',
|
|
229861
|
+
'feed': 'wss://{hostname}/feed',
|
|
229815
229862
|
},
|
|
229816
229863
|
'future': {
|
|
229817
229864
|
'linear': {
|
|
@@ -230078,13 +230125,13 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230078
230125
|
await this.loadMarkets();
|
|
230079
230126
|
const market = this.market(symbol);
|
|
230080
230127
|
symbol = market['symbol'];
|
|
230081
|
-
const
|
|
230082
|
-
|
|
230083
|
-
|
|
230084
|
-
|
|
230085
|
-
|
|
230086
|
-
|
|
230087
|
-
if (!
|
|
230128
|
+
const allowedLimits = [20, 150];
|
|
230129
|
+
// 2) 5-level/20-level incremental MBP is a tick by tick feed,
|
|
230130
|
+
// which means whenever there is an order book change at that level, it pushes an update;
|
|
230131
|
+
// 150-levels/400-level incremental MBP feed is based on the gap
|
|
230132
|
+
// between two snapshots at 100ms interval.
|
|
230133
|
+
limit = (limit === undefined) ? 20 : limit;
|
|
230134
|
+
if (!this.inArray(limit, allowedLimits)) {
|
|
230088
230135
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.ExchangeError(this.id + ' watchOrderBook swap market accepts limits of 20 and 150 only');
|
|
230089
230136
|
}
|
|
230090
230137
|
let messageHash = undefined;
|
|
@@ -230094,7 +230141,7 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230094
230141
|
else {
|
|
230095
230142
|
messageHash = 'market.' + market['id'] + '.depth.size_' + limit.toString() + '.high_freq';
|
|
230096
230143
|
}
|
|
230097
|
-
const url = this.getUrlByMarketType(market['type'], market['linear']);
|
|
230144
|
+
const url = this.getUrlByMarketType(market['type'], market['linear'], false, true);
|
|
230098
230145
|
let method = this.handleOrderBookSubscription;
|
|
230099
230146
|
if (!market['spot']) {
|
|
230100
230147
|
params = this.extend(params);
|
|
@@ -230129,6 +230176,7 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230129
230176
|
const symbol = this.safeString(subscription, 'symbol');
|
|
230130
230177
|
const messageHash = this.safeString(subscription, 'messageHash');
|
|
230131
230178
|
const id = this.safeString(message, 'id');
|
|
230179
|
+
const lastTimestamp = this.safeInteger(subscription, 'lastTimestamp');
|
|
230132
230180
|
try {
|
|
230133
230181
|
const orderbook = this.orderbooks[symbol];
|
|
230134
230182
|
const data = this.safeValue(message, 'data');
|
|
@@ -230136,16 +230184,15 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230136
230184
|
const firstMessage = this.safeValue(messages, 0, {});
|
|
230137
230185
|
const snapshot = this.parseOrderBook(data, symbol);
|
|
230138
230186
|
const tick = this.safeValue(firstMessage, 'tick');
|
|
230139
|
-
const sequence = this.safeInteger(tick, '
|
|
230187
|
+
const sequence = this.safeInteger(tick, 'prevSeqNum');
|
|
230140
230188
|
const nonce = this.safeInteger(data, 'seqNum');
|
|
230141
230189
|
snapshot['nonce'] = nonce;
|
|
230142
|
-
const
|
|
230143
|
-
|
|
230144
|
-
snapshot['datetime'] = this.iso8601(timestamp);
|
|
230190
|
+
const snapshotTimestamp = this.safeInteger(message, 'ts');
|
|
230191
|
+
subscription['lastTimestamp'] = snapshotTimestamp;
|
|
230145
230192
|
const snapshotLimit = this.safeInteger(subscription, 'limit');
|
|
230146
230193
|
const snapshotOrderBook = this.orderBook(snapshot, snapshotLimit);
|
|
230147
230194
|
client.resolve(snapshotOrderBook, id);
|
|
230148
|
-
if ((sequence
|
|
230195
|
+
if ((sequence === undefined) || (nonce < sequence)) {
|
|
230149
230196
|
const maxAttempts = this.handleOption('watchOrderBook', 'maxRetries', 3);
|
|
230150
230197
|
let numAttempts = this.safeInteger(subscription, 'numAttempts', 0);
|
|
230151
230198
|
// retry to synchronize if we have not reached maxAttempts yet
|
|
@@ -230153,9 +230200,10 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230153
230200
|
// safety guard
|
|
230154
230201
|
if (messageHash in client.subscriptions) {
|
|
230155
230202
|
numAttempts = this.sum(numAttempts, 1);
|
|
230203
|
+
const delayTime = this.sum(1000, lastTimestamp - snapshotTimestamp);
|
|
230156
230204
|
subscription['numAttempts'] = numAttempts;
|
|
230157
230205
|
client.subscriptions[messageHash] = subscription;
|
|
230158
|
-
this.
|
|
230206
|
+
this.delay(delayTime, this.watchOrderBookSnapshot, client, message, subscription);
|
|
230159
230207
|
}
|
|
230160
230208
|
}
|
|
230161
230209
|
else {
|
|
@@ -230167,8 +230215,9 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230167
230215
|
orderbook.reset(snapshot);
|
|
230168
230216
|
// unroll the accumulated deltas
|
|
230169
230217
|
for (let i = 0; i < messages.length; i++) {
|
|
230170
|
-
this.handleOrderBookMessage(client, messages[i]
|
|
230218
|
+
this.handleOrderBookMessage(client, messages[i]);
|
|
230171
230219
|
}
|
|
230220
|
+
orderbook.cache = [];
|
|
230172
230221
|
this.orderbooks[symbol] = orderbook;
|
|
230173
230222
|
client.resolve(orderbook, messageHash);
|
|
230174
230223
|
}
|
|
@@ -230179,29 +230228,31 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230179
230228
|
}
|
|
230180
230229
|
async watchOrderBookSnapshot(client, message, subscription) {
|
|
230181
230230
|
const messageHash = this.safeString(subscription, 'messageHash');
|
|
230231
|
+
const symbol = this.safeString(subscription, 'symbol');
|
|
230232
|
+
const limit = this.safeInteger(subscription, 'limit');
|
|
230233
|
+
const timestamp = this.safeInteger(message, 'ts');
|
|
230234
|
+
const params = this.safeValue(subscription, 'params');
|
|
230235
|
+
const attempts = this.safeInteger(subscription, 'numAttempts', 0);
|
|
230236
|
+
const market = this.market(symbol);
|
|
230237
|
+
const url = this.getUrlByMarketType(market['type'], market['linear'], false, true);
|
|
230238
|
+
const requestId = this.requestId();
|
|
230239
|
+
const request = {
|
|
230240
|
+
'req': messageHash,
|
|
230241
|
+
'id': requestId,
|
|
230242
|
+
};
|
|
230243
|
+
// this is a temporary subscription by a specific requestId
|
|
230244
|
+
// it has a very short lifetime until the snapshot is received over ws
|
|
230245
|
+
const snapshotSubscription = {
|
|
230246
|
+
'id': requestId,
|
|
230247
|
+
'messageHash': messageHash,
|
|
230248
|
+
'symbol': symbol,
|
|
230249
|
+
'limit': limit,
|
|
230250
|
+
'params': params,
|
|
230251
|
+
'numAttempts': attempts,
|
|
230252
|
+
'lastTimestamp': timestamp,
|
|
230253
|
+
'method': this.handleOrderBookSnapshot,
|
|
230254
|
+
};
|
|
230182
230255
|
try {
|
|
230183
|
-
const symbol = this.safeString(subscription, 'symbol');
|
|
230184
|
-
const limit = this.safeInteger(subscription, 'limit');
|
|
230185
|
-
const params = this.safeValue(subscription, 'params');
|
|
230186
|
-
const attempts = this.safeInteger(subscription, 'numAttempts', 0);
|
|
230187
|
-
const market = this.market(symbol);
|
|
230188
|
-
const url = this.getUrlByMarketType(market['type'], market['linear']);
|
|
230189
|
-
const requestId = this.requestId();
|
|
230190
|
-
const request = {
|
|
230191
|
-
'req': messageHash,
|
|
230192
|
-
'id': requestId,
|
|
230193
|
-
};
|
|
230194
|
-
// this is a temporary subscription by a specific requestId
|
|
230195
|
-
// it has a very short lifetime until the snapshot is received over ws
|
|
230196
|
-
const snapshotSubscription = {
|
|
230197
|
-
'id': requestId,
|
|
230198
|
-
'messageHash': messageHash,
|
|
230199
|
-
'symbol': symbol,
|
|
230200
|
-
'limit': limit,
|
|
230201
|
-
'params': params,
|
|
230202
|
-
'numAttempts': attempts,
|
|
230203
|
-
'method': this.handleOrderBookSnapshot,
|
|
230204
|
-
};
|
|
230205
230256
|
const orderbook = await this.watch(url, requestId, request, requestId, snapshotSubscription);
|
|
230206
230257
|
return orderbook.limit();
|
|
230207
230258
|
}
|
|
@@ -230220,7 +230271,7 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230220
230271
|
this.handleDelta(bookside, deltas[i]);
|
|
230221
230272
|
}
|
|
230222
230273
|
}
|
|
230223
|
-
handleOrderBookMessage(client, message
|
|
230274
|
+
handleOrderBookMessage(client, message) {
|
|
230224
230275
|
// spot markets
|
|
230225
230276
|
//
|
|
230226
230277
|
// {
|
|
@@ -230290,30 +230341,34 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230290
230341
|
const ch = this.safeValue(message, 'ch');
|
|
230291
230342
|
const parts = ch.split('.');
|
|
230292
230343
|
const marketId = this.safeString(parts, 1);
|
|
230293
|
-
const
|
|
230344
|
+
const market = this.safeMarket(marketId);
|
|
230345
|
+
const symbol = market['symbol'];
|
|
230346
|
+
const orderbook = this.orderbooks[symbol];
|
|
230294
230347
|
const tick = this.safeValue(message, 'tick', {});
|
|
230295
|
-
const seqNum = this.
|
|
230348
|
+
const seqNum = this.safeInteger(tick, 'seqNum');
|
|
230296
230349
|
const prevSeqNum = this.safeInteger(tick, 'prevSeqNum');
|
|
230297
230350
|
const event = this.safeString(tick, 'event');
|
|
230351
|
+
const version = this.safeInteger(tick, 'version');
|
|
230298
230352
|
const timestamp = this.safeInteger(message, 'ts');
|
|
230299
230353
|
if (event === 'snapshot') {
|
|
230300
230354
|
const snapshot = this.parseOrderBook(tick, symbol, timestamp);
|
|
230301
230355
|
orderbook.reset(snapshot);
|
|
230302
|
-
orderbook['nonce'] =
|
|
230356
|
+
orderbook['nonce'] = version;
|
|
230303
230357
|
}
|
|
230304
|
-
if (prevSeqNum !== undefined && prevSeqNum > orderbook['nonce']) {
|
|
230358
|
+
if ((prevSeqNum !== undefined) && prevSeqNum > orderbook['nonce']) {
|
|
230305
230359
|
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidNonce(this.id + ' watchOrderBook() received a mesage out of order');
|
|
230306
230360
|
}
|
|
230307
|
-
|
|
230361
|
+
const spotConditon = market['spot'] && (prevSeqNum === orderbook['nonce']);
|
|
230362
|
+
const nonSpotCondition = market['contract'] && (version - 1 === orderbook['nonce']);
|
|
230363
|
+
if (spotConditon || nonSpotCondition) {
|
|
230308
230364
|
const asks = this.safeValue(tick, 'asks', []);
|
|
230309
230365
|
const bids = this.safeValue(tick, 'bids', []);
|
|
230310
230366
|
this.handleDeltas(orderbook['asks'], asks);
|
|
230311
230367
|
this.handleDeltas(orderbook['bids'], bids);
|
|
230312
|
-
orderbook['nonce'] = seqNum;
|
|
230368
|
+
orderbook['nonce'] = spotConditon ? seqNum : version;
|
|
230313
230369
|
orderbook['timestamp'] = timestamp;
|
|
230314
230370
|
orderbook['datetime'] = this.iso8601(timestamp);
|
|
230315
230371
|
}
|
|
230316
|
-
return orderbook;
|
|
230317
230372
|
}
|
|
230318
230373
|
handleOrderBook(client, message) {
|
|
230319
230374
|
//
|
|
@@ -230361,9 +230416,9 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230361
230416
|
// "ts":1645023376098
|
|
230362
230417
|
// }
|
|
230363
230418
|
//
|
|
230364
|
-
const tick = this.safeValue(message, 'tick', {});
|
|
230365
|
-
const event = this.safeString(tick, 'event');
|
|
230366
230419
|
const messageHash = this.safeString(message, 'ch');
|
|
230420
|
+
const tick = this.safeValue(message, 'tick');
|
|
230421
|
+
const event = this.safeString(tick, 'event');
|
|
230367
230422
|
const ch = this.safeValue(message, 'ch');
|
|
230368
230423
|
const parts = ch.split('.');
|
|
230369
230424
|
const marketId = this.safeString(parts, 1);
|
|
@@ -230374,23 +230429,22 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230374
230429
|
const sizeParts = size.split('_');
|
|
230375
230430
|
const limit = this.safeInteger(sizeParts, 1);
|
|
230376
230431
|
orderbook = this.orderBook({}, limit);
|
|
230432
|
+
this.orderbooks[symbol] = orderbook;
|
|
230377
230433
|
}
|
|
230378
|
-
if (orderbook['nonce'] === undefined) {
|
|
230434
|
+
if ((event === undefined) && (orderbook['nonce'] === undefined)) {
|
|
230379
230435
|
orderbook.cache.push(message);
|
|
230380
230436
|
}
|
|
230381
|
-
|
|
230382
|
-
this.
|
|
230437
|
+
else {
|
|
230438
|
+
this.handleOrderBookMessage(client, message);
|
|
230383
230439
|
client.resolve(orderbook, messageHash);
|
|
230384
230440
|
}
|
|
230385
230441
|
}
|
|
230386
230442
|
handleOrderBookSubscription(client, message, subscription) {
|
|
230387
230443
|
const symbol = this.safeString(subscription, 'symbol');
|
|
230444
|
+
const market = this.market(symbol);
|
|
230388
230445
|
const limit = this.safeInteger(subscription, 'limit');
|
|
230389
|
-
if (symbol in this.orderbooks) {
|
|
230390
|
-
delete this.orderbooks[symbol];
|
|
230391
|
-
}
|
|
230392
230446
|
this.orderbooks[symbol] = this.orderBook({}, limit);
|
|
230393
|
-
if (
|
|
230447
|
+
if (market['spot']) {
|
|
230394
230448
|
this.spawn(this.watchOrderBookSnapshot, client, message, subscription);
|
|
230395
230449
|
}
|
|
230396
230450
|
}
|
|
@@ -230458,8 +230512,8 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230458
230512
|
let orderType = this.safeString(this.options, 'orderType', 'orders'); // orders or matchOrders
|
|
230459
230513
|
orderType = this.safeString(params, 'orderType', orderType);
|
|
230460
230514
|
params = this.omit(params, 'orderType');
|
|
230461
|
-
const marketCode = (market !== undefined) ? market['lowercaseId'] : undefined;
|
|
230462
|
-
const baseId = (market !== undefined) ? market['
|
|
230515
|
+
const marketCode = (market !== undefined) ? market['lowercaseId'].toLowerCase() : undefined;
|
|
230516
|
+
const baseId = (market !== undefined) ? market['baseId'] : undefined;
|
|
230463
230517
|
const prefix = orderType;
|
|
230464
230518
|
messageHash = prefix;
|
|
230465
230519
|
if (subType === 'linear') {
|
|
@@ -230478,7 +230532,7 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230478
230532
|
else if (type === 'future') {
|
|
230479
230533
|
// inverse futures Example: BCH/USD:BCH-220408
|
|
230480
230534
|
if (baseId !== undefined) {
|
|
230481
|
-
channel = prefix + '.' + baseId;
|
|
230535
|
+
channel = prefix + '.' + baseId.toLowerCase();
|
|
230482
230536
|
messageHash = channel;
|
|
230483
230537
|
}
|
|
230484
230538
|
else {
|
|
@@ -230712,7 +230766,8 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
230712
230766
|
// when we make a global subscription (for contracts only) our message hash can't have a symbol/currency attached
|
|
230713
230767
|
// so we're removing it here
|
|
230714
230768
|
let genericMessageHash = messageHash.replace('.' + market['lowercaseId'], '');
|
|
230715
|
-
|
|
230769
|
+
const lowerCaseBaseId = this.safeStringLower(market, 'baseId');
|
|
230770
|
+
genericMessageHash = genericMessageHash.replace('.' + lowerCaseBaseId, '');
|
|
230716
230771
|
client.resolve(this.orders, genericMessageHash);
|
|
230717
230772
|
}
|
|
230718
230773
|
parseWsOrder(order, market = undefined) {
|
|
@@ -231886,7 +231941,8 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
231886
231941
|
// since this is a global sub, our messageHash does not specify any symbol (ex: orders_cross:trade)
|
|
231887
231942
|
// so we must remove it
|
|
231888
231943
|
let genericOrderHash = messageHash.replace('.' + market['lowercaseId'], '');
|
|
231889
|
-
|
|
231944
|
+
const lowerCaseBaseId = this.safeStringLower(market, 'baseId');
|
|
231945
|
+
genericOrderHash = genericOrderHash.replace('.' + lowerCaseBaseId, '');
|
|
231890
231946
|
const genericTradesHash = genericOrderHash + ':' + 'trade';
|
|
231891
231947
|
client.resolve(this.myTrades, genericTradesHash);
|
|
231892
231948
|
}
|
|
@@ -231961,7 +232017,7 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
231961
232017
|
'fee': fee,
|
|
231962
232018
|
}, market);
|
|
231963
232019
|
}
|
|
231964
|
-
getUrlByMarketType(type, isLinear = true, isPrivate = false) {
|
|
232020
|
+
getUrlByMarketType(type, isLinear = true, isPrivate = false, isFeed = false) {
|
|
231965
232021
|
const api = this.safeString(this.options, 'api', 'api');
|
|
231966
232022
|
const hostname = { 'hostname': this.hostname };
|
|
231967
232023
|
let hostnameURL = undefined;
|
|
@@ -231971,7 +232027,12 @@ class htx extends _htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
231971
232027
|
hostnameURL = this.urls['api']['ws'][api]['spot']['private'];
|
|
231972
232028
|
}
|
|
231973
232029
|
else {
|
|
231974
|
-
|
|
232030
|
+
if (isFeed) {
|
|
232031
|
+
hostnameURL = this.urls['api']['ws'][api]['spot']['feed'];
|
|
232032
|
+
}
|
|
232033
|
+
else {
|
|
232034
|
+
hostnameURL = this.urls['api']['ws'][api]['spot']['public'];
|
|
232035
|
+
}
|
|
231975
232036
|
}
|
|
231976
232037
|
url = this.implodeParams(hostnameURL, hostname);
|
|
231977
232038
|
}
|
|
@@ -232747,28 +232808,6 @@ class huobijp extends _huobijp_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
232747
232808
|
}
|
|
232748
232809
|
|
|
232749
232810
|
|
|
232750
|
-
/***/ }),
|
|
232751
|
-
|
|
232752
|
-
/***/ 4625:
|
|
232753
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
232754
|
-
|
|
232755
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
232756
|
-
/* harmony export */ Z: () => (/* binding */ huobipro)
|
|
232757
|
-
/* harmony export */ });
|
|
232758
|
-
/* harmony import */ var _huobi_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8384);
|
|
232759
|
-
// ---------------------------------------------------------------------------
|
|
232760
|
-
|
|
232761
|
-
// ---------------------------------------------------------------------------
|
|
232762
|
-
class huobipro extends _huobi_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
232763
|
-
describe() {
|
|
232764
|
-
return this.deepExtend(super.describe(), {
|
|
232765
|
-
'alias': true,
|
|
232766
|
-
'id': 'huobipro',
|
|
232767
|
-
});
|
|
232768
|
-
}
|
|
232769
|
-
}
|
|
232770
|
-
|
|
232771
|
-
|
|
232772
232811
|
/***/ }),
|
|
232773
232812
|
|
|
232774
232813
|
/***/ 3484:
|
|
@@ -236683,6 +236722,13 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
236683
236722
|
return this.deepExtend(super.describe(), {
|
|
236684
236723
|
'has': {
|
|
236685
236724
|
'ws': true,
|
|
236725
|
+
'createOrderWs': false,
|
|
236726
|
+
'editOrderWs': false,
|
|
236727
|
+
'fetchOpenOrdersWs': false,
|
|
236728
|
+
'fetchOrderWs': false,
|
|
236729
|
+
'cancelOrderWs': false,
|
|
236730
|
+
'cancelOrdersWs': false,
|
|
236731
|
+
'cancelAllOrdersWs': false,
|
|
236686
236732
|
'watchOrderBook': true,
|
|
236687
236733
|
'watchOrders': true,
|
|
236688
236734
|
'watchMyTrades': true,
|
|
@@ -239036,6 +239082,15 @@ class mexc extends _mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
239036
239082
|
return this.deepExtend(super.describe(), {
|
|
239037
239083
|
'has': {
|
|
239038
239084
|
'ws': true,
|
|
239085
|
+
'cancelAllOrdersWs': false,
|
|
239086
|
+
'cancelOrdersWs': false,
|
|
239087
|
+
'cancelOrderWs': false,
|
|
239088
|
+
'createOrderWs': false,
|
|
239089
|
+
'editOrderWs': false,
|
|
239090
|
+
'fetchBalanceWs': false,
|
|
239091
|
+
'fetchOpenOrdersWs': false,
|
|
239092
|
+
'fetchOrderWs': false,
|
|
239093
|
+
'fetchTradesWs': false,
|
|
239039
239094
|
'watchBalance': true,
|
|
239040
239095
|
'watchMyTrades': true,
|
|
239041
239096
|
'watchOHLCV': true,
|
|
@@ -240183,28 +240238,6 @@ class mexc extends _mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
|
240183
240238
|
}
|
|
240184
240239
|
|
|
240185
240240
|
|
|
240186
|
-
/***/ }),
|
|
240187
|
-
|
|
240188
|
-
/***/ 5351:
|
|
240189
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
240190
|
-
|
|
240191
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
240192
|
-
/* harmony export */ Z: () => (/* binding */ mexc3)
|
|
240193
|
-
/* harmony export */ });
|
|
240194
|
-
/* harmony import */ var _mexc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6484);
|
|
240195
|
-
// ---------------------------------------------------------------------------
|
|
240196
|
-
|
|
240197
|
-
// ---------------------------------------------------------------------------
|
|
240198
|
-
class mexc3 extends _mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
240199
|
-
describe() {
|
|
240200
|
-
return this.deepExtend(super.describe(), {
|
|
240201
|
-
'id': 'mexc3',
|
|
240202
|
-
'alias': true,
|
|
240203
|
-
});
|
|
240204
|
-
}
|
|
240205
|
-
}
|
|
240206
|
-
|
|
240207
|
-
|
|
240208
240241
|
/***/ }),
|
|
240209
240242
|
|
|
240210
240243
|
/***/ 8080:
|
|
@@ -241526,28 +241559,6 @@ class okcoin extends _okcoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
241526
241559
|
}
|
|
241527
241560
|
|
|
241528
241561
|
|
|
241529
|
-
/***/ }),
|
|
241530
|
-
|
|
241531
|
-
/***/ 1530:
|
|
241532
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
241533
|
-
|
|
241534
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
241535
|
-
/* harmony export */ Z: () => (/* binding */ okex)
|
|
241536
|
-
/* harmony export */ });
|
|
241537
|
-
/* harmony import */ var _okx_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2214);
|
|
241538
|
-
// ---------------------------------------------------------------------------
|
|
241539
|
-
|
|
241540
|
-
// ---------------------------------------------------------------------------
|
|
241541
|
-
class okex extends _okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
|
|
241542
|
-
describe() {
|
|
241543
|
-
return this.deepExtend(super.describe(), {
|
|
241544
|
-
'alias': true,
|
|
241545
|
-
'id': 'okex',
|
|
241546
|
-
});
|
|
241547
|
-
}
|
|
241548
|
-
}
|
|
241549
|
-
|
|
241550
|
-
|
|
241551
241562
|
/***/ }),
|
|
241552
241563
|
|
|
241553
241564
|
/***/ 2214:
|
|
@@ -285563,39 +285574,39 @@ var __webpack_exports__ = {};
|
|
|
285563
285574
|
(() => {
|
|
285564
285575
|
__webpack_require__.r(__webpack_exports__);
|
|
285565
285576
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
285566
|
-
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */
|
|
285567
|
-
/* harmony export */ AccountSuspended: () => (/* reexport safe */
|
|
285568
|
-
/* harmony export */ AddressPending: () => (/* reexport safe */
|
|
285569
|
-
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */
|
|
285570
|
-
/* harmony export */ AuthenticationError: () => (/* reexport safe */
|
|
285571
|
-
/* harmony export */ BadRequest: () => (/* reexport safe */
|
|
285572
|
-
/* harmony export */ BadResponse: () => (/* reexport safe */
|
|
285573
|
-
/* harmony export */ BadSymbol: () => (/* reexport safe */
|
|
285574
|
-
/* harmony export */ BaseError: () => (/* reexport safe */
|
|
285575
|
-
/* harmony export */ CancelPending: () => (/* reexport safe */
|
|
285576
|
-
/* harmony export */ DDoSProtection: () => (/* reexport safe */
|
|
285577
|
-
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */
|
|
285577
|
+
/* harmony export */ AccountNotEnabled: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.AccountNotEnabled),
|
|
285578
|
+
/* harmony export */ AccountSuspended: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.AccountSuspended),
|
|
285579
|
+
/* harmony export */ AddressPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.AddressPending),
|
|
285580
|
+
/* harmony export */ ArgumentsRequired: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.ArgumentsRequired),
|
|
285581
|
+
/* harmony export */ AuthenticationError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.AuthenticationError),
|
|
285582
|
+
/* harmony export */ BadRequest: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.BadRequest),
|
|
285583
|
+
/* harmony export */ BadResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.BadResponse),
|
|
285584
|
+
/* harmony export */ BadSymbol: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.BadSymbol),
|
|
285585
|
+
/* harmony export */ BaseError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.BaseError),
|
|
285586
|
+
/* harmony export */ CancelPending: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.CancelPending),
|
|
285587
|
+
/* harmony export */ DDoSProtection: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.DDoSProtection),
|
|
285588
|
+
/* harmony export */ DuplicateOrderId: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.DuplicateOrderId),
|
|
285578
285589
|
/* harmony export */ Exchange: () => (/* reexport safe */ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__.e),
|
|
285579
|
-
/* harmony export */ ExchangeError: () => (/* reexport safe */
|
|
285580
|
-
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */
|
|
285581
|
-
/* harmony export */ InsufficientFunds: () => (/* reexport safe */
|
|
285582
|
-
/* harmony export */ InvalidAddress: () => (/* reexport safe */
|
|
285583
|
-
/* harmony export */ InvalidNonce: () => (/* reexport safe */
|
|
285584
|
-
/* harmony export */ InvalidOrder: () => (/* reexport safe */
|
|
285585
|
-
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */
|
|
285586
|
-
/* harmony export */ NetworkError: () => (/* reexport safe */
|
|
285587
|
-
/* harmony export */ NoChange: () => (/* reexport safe */
|
|
285588
|
-
/* harmony export */ NotSupported: () => (/* reexport safe */
|
|
285589
|
-
/* harmony export */ NullResponse: () => (/* reexport safe */
|
|
285590
|
-
/* harmony export */ OnMaintenance: () => (/* reexport safe */
|
|
285591
|
-
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */
|
|
285592
|
-
/* harmony export */ OrderNotCached: () => (/* reexport safe */
|
|
285593
|
-
/* harmony export */ OrderNotFillable: () => (/* reexport safe */
|
|
285594
|
-
/* harmony export */ OrderNotFound: () => (/* reexport safe */
|
|
285595
|
-
/* harmony export */ PermissionDenied: () => (/* reexport safe */
|
|
285596
|
-
/* harmony export */ Precise: () => (/* reexport safe */
|
|
285597
|
-
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */
|
|
285598
|
-
/* harmony export */ RequestTimeout: () => (/* reexport safe */
|
|
285590
|
+
/* harmony export */ ExchangeError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.ExchangeError),
|
|
285591
|
+
/* harmony export */ ExchangeNotAvailable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.ExchangeNotAvailable),
|
|
285592
|
+
/* harmony export */ InsufficientFunds: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.InsufficientFunds),
|
|
285593
|
+
/* harmony export */ InvalidAddress: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.InvalidAddress),
|
|
285594
|
+
/* harmony export */ InvalidNonce: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.InvalidNonce),
|
|
285595
|
+
/* harmony export */ InvalidOrder: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.InvalidOrder),
|
|
285596
|
+
/* harmony export */ MarginModeAlreadySet: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.MarginModeAlreadySet),
|
|
285597
|
+
/* harmony export */ NetworkError: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.NetworkError),
|
|
285598
|
+
/* harmony export */ NoChange: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.NoChange),
|
|
285599
|
+
/* harmony export */ NotSupported: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.NotSupported),
|
|
285600
|
+
/* harmony export */ NullResponse: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.NullResponse),
|
|
285601
|
+
/* harmony export */ OnMaintenance: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.OnMaintenance),
|
|
285602
|
+
/* harmony export */ OrderImmediatelyFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.OrderImmediatelyFillable),
|
|
285603
|
+
/* harmony export */ OrderNotCached: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.OrderNotCached),
|
|
285604
|
+
/* harmony export */ OrderNotFillable: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.OrderNotFillable),
|
|
285605
|
+
/* harmony export */ OrderNotFound: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.OrderNotFound),
|
|
285606
|
+
/* harmony export */ PermissionDenied: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.PermissionDenied),
|
|
285607
|
+
/* harmony export */ Precise: () => (/* reexport safe */ _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_159__.O),
|
|
285608
|
+
/* harmony export */ RateLimitExceeded: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.RateLimitExceeded),
|
|
285609
|
+
/* harmony export */ RequestTimeout: () => (/* reexport safe */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__.RequestTimeout),
|
|
285599
285610
|
/* harmony export */ ace: () => (/* reexport safe */ _src_ace_js__WEBPACK_IMPORTED_MODULE_1__.Z),
|
|
285600
285611
|
/* harmony export */ alpaca: () => (/* reexport safe */ _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__.Z),
|
|
285601
285612
|
/* harmony export */ ascendex: () => (/* reexport safe */ _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__.Z),
|
|
@@ -285650,11 +285661,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
285650
285661
|
/* harmony export */ delta: () => (/* reexport safe */ _src_delta_js__WEBPACK_IMPORTED_MODULE_51__.Z),
|
|
285651
285662
|
/* harmony export */ deribit: () => (/* reexport safe */ _src_deribit_js__WEBPACK_IMPORTED_MODULE_52__.Z),
|
|
285652
285663
|
/* harmony export */ digifinex: () => (/* reexport safe */ _src_digifinex_js__WEBPACK_IMPORTED_MODULE_53__.Z),
|
|
285653
|
-
/* harmony export */ errors: () => (/* reexport module object */
|
|
285664
|
+
/* harmony export */ errors: () => (/* reexport module object */ _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__),
|
|
285654
285665
|
/* harmony export */ exchanges: () => (/* binding */ exchanges),
|
|
285655
285666
|
/* harmony export */ exmo: () => (/* reexport safe */ _src_exmo_js__WEBPACK_IMPORTED_MODULE_54__.Z),
|
|
285656
285667
|
/* harmony export */ fmfwio: () => (/* reexport safe */ _src_fmfwio_js__WEBPACK_IMPORTED_MODULE_55__.Z),
|
|
285657
|
-
/* harmony export */ functions: () => (/* reexport module object */
|
|
285668
|
+
/* harmony export */ functions: () => (/* reexport module object */ _src_base_functions_js__WEBPACK_IMPORTED_MODULE_160__),
|
|
285658
285669
|
/* harmony export */ gate: () => (/* reexport safe */ _src_gate_js__WEBPACK_IMPORTED_MODULE_56__.Z),
|
|
285659
285670
|
/* harmony export */ gateio: () => (/* reexport safe */ _src_gateio_js__WEBPACK_IMPORTED_MODULE_57__.Z),
|
|
285660
285671
|
/* harmony export */ gemini: () => (/* reexport safe */ _src_gemini_js__WEBPACK_IMPORTED_MODULE_58__.Z),
|
|
@@ -285664,53 +285675,49 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
285664
285675
|
/* harmony export */ htx: () => (/* reexport safe */ _src_htx_js__WEBPACK_IMPORTED_MODULE_62__.Z),
|
|
285665
285676
|
/* harmony export */ huobi: () => (/* reexport safe */ _src_huobi_js__WEBPACK_IMPORTED_MODULE_63__.Z),
|
|
285666
285677
|
/* harmony export */ huobijp: () => (/* reexport safe */ _src_huobijp_js__WEBPACK_IMPORTED_MODULE_64__.Z),
|
|
285667
|
-
/* harmony export */
|
|
285668
|
-
/* harmony export */
|
|
285669
|
-
/* harmony export */
|
|
285670
|
-
/* harmony export */
|
|
285671
|
-
/* harmony export */
|
|
285672
|
-
/* harmony export */
|
|
285673
|
-
/* harmony export */
|
|
285674
|
-
/* harmony export */
|
|
285675
|
-
/* harmony export */
|
|
285676
|
-
/* harmony export */
|
|
285677
|
-
/* harmony export */
|
|
285678
|
-
/* harmony export */
|
|
285679
|
-
/* harmony export */
|
|
285680
|
-
/* harmony export */
|
|
285681
|
-
/* harmony export */
|
|
285682
|
-
/* harmony export */
|
|
285683
|
-
/* harmony export */
|
|
285684
|
-
/* harmony export */
|
|
285685
|
-
/* harmony export */
|
|
285686
|
-
/* harmony export */
|
|
285687
|
-
/* harmony export */
|
|
285688
|
-
/* harmony export */
|
|
285689
|
-
/* harmony export */
|
|
285690
|
-
/* harmony export */
|
|
285691
|
-
/* harmony export */ paymium: () => (/* reexport safe */ _src_paymium_js__WEBPACK_IMPORTED_MODULE_89__.Z),
|
|
285692
|
-
/* harmony export */ phemex: () => (/* reexport safe */ _src_phemex_js__WEBPACK_IMPORTED_MODULE_90__.Z),
|
|
285693
|
-
/* harmony export */ poloniex: () => (/* reexport safe */ _src_poloniex_js__WEBPACK_IMPORTED_MODULE_91__.Z),
|
|
285694
|
-
/* harmony export */ poloniexfutures: () => (/* reexport safe */ _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_92__.Z),
|
|
285678
|
+
/* harmony export */ idex: () => (/* reexport safe */ _src_idex_js__WEBPACK_IMPORTED_MODULE_65__.Z),
|
|
285679
|
+
/* harmony export */ independentreserve: () => (/* reexport safe */ _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_66__.Z),
|
|
285680
|
+
/* harmony export */ indodax: () => (/* reexport safe */ _src_indodax_js__WEBPACK_IMPORTED_MODULE_67__.Z),
|
|
285681
|
+
/* harmony export */ kraken: () => (/* reexport safe */ _src_kraken_js__WEBPACK_IMPORTED_MODULE_68__.Z),
|
|
285682
|
+
/* harmony export */ krakenfutures: () => (/* reexport safe */ _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_69__.Z),
|
|
285683
|
+
/* harmony export */ kucoin: () => (/* reexport safe */ _src_kucoin_js__WEBPACK_IMPORTED_MODULE_70__.Z),
|
|
285684
|
+
/* harmony export */ kucoinfutures: () => (/* reexport safe */ _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_71__.Z),
|
|
285685
|
+
/* harmony export */ kuna: () => (/* reexport safe */ _src_kuna_js__WEBPACK_IMPORTED_MODULE_72__.Z),
|
|
285686
|
+
/* harmony export */ latoken: () => (/* reexport safe */ _src_latoken_js__WEBPACK_IMPORTED_MODULE_73__.Z),
|
|
285687
|
+
/* harmony export */ lbank: () => (/* reexport safe */ _src_lbank_js__WEBPACK_IMPORTED_MODULE_74__.Z),
|
|
285688
|
+
/* harmony export */ luno: () => (/* reexport safe */ _src_luno_js__WEBPACK_IMPORTED_MODULE_75__.Z),
|
|
285689
|
+
/* harmony export */ lykke: () => (/* reexport safe */ _src_lykke_js__WEBPACK_IMPORTED_MODULE_76__.Z),
|
|
285690
|
+
/* harmony export */ mercado: () => (/* reexport safe */ _src_mercado_js__WEBPACK_IMPORTED_MODULE_77__.Z),
|
|
285691
|
+
/* harmony export */ mexc: () => (/* reexport safe */ _src_mexc_js__WEBPACK_IMPORTED_MODULE_78__.Z),
|
|
285692
|
+
/* harmony export */ ndax: () => (/* reexport safe */ _src_ndax_js__WEBPACK_IMPORTED_MODULE_79__.Z),
|
|
285693
|
+
/* harmony export */ novadax: () => (/* reexport safe */ _src_novadax_js__WEBPACK_IMPORTED_MODULE_80__.Z),
|
|
285694
|
+
/* harmony export */ oceanex: () => (/* reexport safe */ _src_oceanex_js__WEBPACK_IMPORTED_MODULE_81__.Z),
|
|
285695
|
+
/* harmony export */ okcoin: () => (/* reexport safe */ _src_okcoin_js__WEBPACK_IMPORTED_MODULE_82__.Z),
|
|
285696
|
+
/* harmony export */ okx: () => (/* reexport safe */ _src_okx_js__WEBPACK_IMPORTED_MODULE_83__.Z),
|
|
285697
|
+
/* harmony export */ p2b: () => (/* reexport safe */ _src_p2b_js__WEBPACK_IMPORTED_MODULE_84__.Z),
|
|
285698
|
+
/* harmony export */ paymium: () => (/* reexport safe */ _src_paymium_js__WEBPACK_IMPORTED_MODULE_85__.Z),
|
|
285699
|
+
/* harmony export */ phemex: () => (/* reexport safe */ _src_phemex_js__WEBPACK_IMPORTED_MODULE_86__.Z),
|
|
285700
|
+
/* harmony export */ poloniex: () => (/* reexport safe */ _src_poloniex_js__WEBPACK_IMPORTED_MODULE_87__.Z),
|
|
285701
|
+
/* harmony export */ poloniexfutures: () => (/* reexport safe */ _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__.Z),
|
|
285695
285702
|
/* harmony export */ pro: () => (/* binding */ pro),
|
|
285696
|
-
/* harmony export */ probit: () => (/* reexport safe */
|
|
285697
|
-
/* harmony export */ tidex: () => (/* reexport safe */
|
|
285698
|
-
/* harmony export */ timex: () => (/* reexport safe */
|
|
285699
|
-
/* harmony export */ tokocrypto: () => (/* reexport safe */
|
|
285700
|
-
/* harmony export */ upbit: () => (/* reexport safe */
|
|
285703
|
+
/* harmony export */ probit: () => (/* reexport safe */ _src_probit_js__WEBPACK_IMPORTED_MODULE_89__.Z),
|
|
285704
|
+
/* harmony export */ tidex: () => (/* reexport safe */ _src_tidex_js__WEBPACK_IMPORTED_MODULE_90__.Z),
|
|
285705
|
+
/* harmony export */ timex: () => (/* reexport safe */ _src_timex_js__WEBPACK_IMPORTED_MODULE_91__.Z),
|
|
285706
|
+
/* harmony export */ tokocrypto: () => (/* reexport safe */ _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_92__.Z),
|
|
285707
|
+
/* harmony export */ upbit: () => (/* reexport safe */ _src_upbit_js__WEBPACK_IMPORTED_MODULE_93__.Z),
|
|
285701
285708
|
/* harmony export */ version: () => (/* binding */ version),
|
|
285702
|
-
/* harmony export */ wavesexchange: () => (/* reexport safe */
|
|
285703
|
-
/* harmony export */ wazirx: () => (/* reexport safe */
|
|
285704
|
-
/* harmony export */ whitebit: () => (/* reexport safe */
|
|
285705
|
-
/* harmony export */ woo: () => (/* reexport safe */
|
|
285706
|
-
/* harmony export */ yobit: () => (/* reexport safe */
|
|
285707
|
-
/* harmony export */ zaif: () => (/* reexport safe */
|
|
285708
|
-
/* harmony export */ zonda: () => (/* reexport safe */
|
|
285709
|
+
/* harmony export */ wavesexchange: () => (/* reexport safe */ _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_94__.Z),
|
|
285710
|
+
/* harmony export */ wazirx: () => (/* reexport safe */ _src_wazirx_js__WEBPACK_IMPORTED_MODULE_95__.Z),
|
|
285711
|
+
/* harmony export */ whitebit: () => (/* reexport safe */ _src_whitebit_js__WEBPACK_IMPORTED_MODULE_96__.Z),
|
|
285712
|
+
/* harmony export */ woo: () => (/* reexport safe */ _src_woo_js__WEBPACK_IMPORTED_MODULE_97__.Z),
|
|
285713
|
+
/* harmony export */ yobit: () => (/* reexport safe */ _src_yobit_js__WEBPACK_IMPORTED_MODULE_98__.Z),
|
|
285714
|
+
/* harmony export */ zaif: () => (/* reexport safe */ _src_zaif_js__WEBPACK_IMPORTED_MODULE_99__.Z),
|
|
285715
|
+
/* harmony export */ zonda: () => (/* reexport safe */ _src_zonda_js__WEBPACK_IMPORTED_MODULE_100__.Z)
|
|
285709
285716
|
/* harmony export */ });
|
|
285710
285717
|
/* harmony import */ var _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3043);
|
|
285711
|
-
/* harmony import */ var
|
|
285712
|
-
/* harmony import */ var
|
|
285713
|
-
/* harmony import */ var
|
|
285718
|
+
/* harmony import */ var _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(2194);
|
|
285719
|
+
/* harmony import */ var _src_base_functions_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(7100);
|
|
285720
|
+
/* harmony import */ var _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(6689);
|
|
285714
285721
|
/* harmony import */ var _src_ace_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9869);
|
|
285715
285722
|
/* harmony import */ var _src_alpaca_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5660);
|
|
285716
285723
|
/* harmony import */ var _src_ascendex_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9612);
|
|
@@ -285775,107 +285782,100 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
285775
285782
|
/* harmony import */ var _src_htx_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(5939);
|
|
285776
285783
|
/* harmony import */ var _src_huobi_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(8146);
|
|
285777
285784
|
/* harmony import */ var _src_huobijp_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(7034);
|
|
285778
|
-
/* harmony import */ var
|
|
285779
|
-
/* harmony import */ var
|
|
285780
|
-
/* harmony import */ var
|
|
285781
|
-
/* harmony import */ var
|
|
285782
|
-
/* harmony import */ var
|
|
285783
|
-
/* harmony import */ var
|
|
285784
|
-
/* harmony import */ var
|
|
285785
|
-
/* harmony import */ var
|
|
285786
|
-
/* harmony import */ var
|
|
285787
|
-
/* harmony import */ var
|
|
285788
|
-
/* harmony import */ var
|
|
285789
|
-
/* harmony import */ var
|
|
285790
|
-
/* harmony import */ var
|
|
285791
|
-
/* harmony import */ var
|
|
285792
|
-
/* harmony import */ var
|
|
285793
|
-
/* harmony import */ var
|
|
285794
|
-
/* harmony import */ var
|
|
285795
|
-
/* harmony import */ var
|
|
285796
|
-
/* harmony import */ var
|
|
285797
|
-
/* harmony import */ var
|
|
285798
|
-
/* harmony import */ var
|
|
285799
|
-
/* harmony import */ var
|
|
285800
|
-
/* harmony import */ var
|
|
285801
|
-
/* harmony import */ var
|
|
285802
|
-
/* harmony import */ var
|
|
285803
|
-
/* harmony import */ var
|
|
285804
|
-
/* harmony import */ var
|
|
285805
|
-
/* harmony import */ var
|
|
285806
|
-
/* harmony import */ var
|
|
285807
|
-
/* harmony import */ var
|
|
285808
|
-
/* harmony import */ var
|
|
285809
|
-
/* harmony import */ var
|
|
285810
|
-
/* harmony import */ var
|
|
285811
|
-
/* harmony import */ var
|
|
285812
|
-
/* harmony import */ var
|
|
285813
|
-
/* harmony import */ var
|
|
285814
|
-
/* harmony import */ var
|
|
285815
|
-
/* harmony import */ var
|
|
285816
|
-
/* harmony import */ var
|
|
285817
|
-
/* harmony import */ var
|
|
285818
|
-
/* harmony import */ var
|
|
285819
|
-
/* harmony import */ var
|
|
285820
|
-
/* harmony import */ var
|
|
285821
|
-
/* harmony import */ var
|
|
285822
|
-
/* harmony import */ var
|
|
285823
|
-
/* harmony import */ var
|
|
285824
|
-
/* harmony import */ var
|
|
285825
|
-
/* harmony import */ var
|
|
285826
|
-
/* harmony import */ var
|
|
285827
|
-
/* harmony import */ var
|
|
285828
|
-
/* harmony import */ var
|
|
285829
|
-
/* harmony import */ var
|
|
285830
|
-
/* harmony import */ var
|
|
285831
|
-
/* harmony import */ var
|
|
285832
|
-
/* harmony import */ var
|
|
285833
|
-
/* harmony import */ var
|
|
285834
|
-
/* harmony import */ var
|
|
285835
|
-
/* harmony import */ var
|
|
285836
|
-
/* harmony import */ var
|
|
285837
|
-
/* harmony import */ var
|
|
285838
|
-
/* harmony import */ var
|
|
285839
|
-
/* harmony import */ var
|
|
285840
|
-
/* harmony import */ var
|
|
285841
|
-
/* harmony import */ var
|
|
285842
|
-
/* harmony import */ var
|
|
285843
|
-
/* harmony import */ var
|
|
285844
|
-
/* harmony import */ var
|
|
285845
|
-
/* harmony import */ var
|
|
285846
|
-
/* harmony import */ var
|
|
285847
|
-
/* harmony import */ var
|
|
285848
|
-
/* harmony import */ var
|
|
285849
|
-
/* harmony import */ var
|
|
285850
|
-
/* harmony import */ var
|
|
285851
|
-
/* harmony import */ var
|
|
285852
|
-
/* harmony import */ var
|
|
285853
|
-
/* harmony import */ var
|
|
285854
|
-
/* harmony import */ var
|
|
285855
|
-
/* harmony import */ var
|
|
285856
|
-
/* harmony import */ var
|
|
285857
|
-
/* harmony import */ var
|
|
285858
|
-
/* harmony import */ var
|
|
285859
|
-
/* harmony import */ var
|
|
285860
|
-
/* harmony import */ var
|
|
285861
|
-
/* harmony import */ var
|
|
285862
|
-
/* harmony import */ var
|
|
285863
|
-
/* harmony import */ var
|
|
285864
|
-
/* harmony import */ var
|
|
285865
|
-
/* harmony import */ var
|
|
285866
|
-
/* harmony import */ var
|
|
285867
|
-
/* harmony import */ var
|
|
285868
|
-
/* harmony import */ var
|
|
285869
|
-
/* harmony import */ var
|
|
285870
|
-
/* harmony import */ var
|
|
285871
|
-
/* harmony import */ var
|
|
285872
|
-
/* harmony import */ var _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(7924);
|
|
285873
|
-
/* harmony import */ var _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(3541);
|
|
285874
|
-
/* harmony import */ var _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(9782);
|
|
285875
|
-
/* harmony import */ var _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(7614);
|
|
285876
|
-
/* harmony import */ var _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(4828);
|
|
285877
|
-
/* harmony import */ var _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(5630);
|
|
285878
|
-
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(3910);
|
|
285785
|
+
/* harmony import */ var _src_idex_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(8232);
|
|
285786
|
+
/* harmony import */ var _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(9570);
|
|
285787
|
+
/* harmony import */ var _src_indodax_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(1605);
|
|
285788
|
+
/* harmony import */ var _src_kraken_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(9922);
|
|
285789
|
+
/* harmony import */ var _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(4470);
|
|
285790
|
+
/* harmony import */ var _src_kucoin_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(3583);
|
|
285791
|
+
/* harmony import */ var _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(1924);
|
|
285792
|
+
/* harmony import */ var _src_kuna_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(7732);
|
|
285793
|
+
/* harmony import */ var _src_latoken_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(2545);
|
|
285794
|
+
/* harmony import */ var _src_lbank_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(3944);
|
|
285795
|
+
/* harmony import */ var _src_luno_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(1758);
|
|
285796
|
+
/* harmony import */ var _src_lykke_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(3803);
|
|
285797
|
+
/* harmony import */ var _src_mercado_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(9013);
|
|
285798
|
+
/* harmony import */ var _src_mexc_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(6641);
|
|
285799
|
+
/* harmony import */ var _src_ndax_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(4531);
|
|
285800
|
+
/* harmony import */ var _src_novadax_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(2449);
|
|
285801
|
+
/* harmony import */ var _src_oceanex_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(6749);
|
|
285802
|
+
/* harmony import */ var _src_okcoin_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(3007);
|
|
285803
|
+
/* harmony import */ var _src_okx_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(4042);
|
|
285804
|
+
/* harmony import */ var _src_p2b_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(2466);
|
|
285805
|
+
/* harmony import */ var _src_paymium_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(7082);
|
|
285806
|
+
/* harmony import */ var _src_phemex_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(79);
|
|
285807
|
+
/* harmony import */ var _src_poloniex_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(8891);
|
|
285808
|
+
/* harmony import */ var _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(6877);
|
|
285809
|
+
/* harmony import */ var _src_probit_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(3657);
|
|
285810
|
+
/* harmony import */ var _src_tidex_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(4224);
|
|
285811
|
+
/* harmony import */ var _src_timex_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(1067);
|
|
285812
|
+
/* harmony import */ var _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(5261);
|
|
285813
|
+
/* harmony import */ var _src_upbit_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(7584);
|
|
285814
|
+
/* harmony import */ var _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(3853);
|
|
285815
|
+
/* harmony import */ var _src_wazirx_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(6536);
|
|
285816
|
+
/* harmony import */ var _src_whitebit_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(5467);
|
|
285817
|
+
/* harmony import */ var _src_woo_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(517);
|
|
285818
|
+
/* harmony import */ var _src_yobit_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(3850);
|
|
285819
|
+
/* harmony import */ var _src_zaif_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(5934);
|
|
285820
|
+
/* harmony import */ var _src_zonda_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(5140);
|
|
285821
|
+
/* harmony import */ var _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(2467);
|
|
285822
|
+
/* harmony import */ var _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(2383);
|
|
285823
|
+
/* harmony import */ var _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(8848);
|
|
285824
|
+
/* harmony import */ var _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(8764);
|
|
285825
|
+
/* harmony import */ var _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(5078);
|
|
285826
|
+
/* harmony import */ var _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(1326);
|
|
285827
|
+
/* harmony import */ var _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(1230);
|
|
285828
|
+
/* harmony import */ var _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(6955);
|
|
285829
|
+
/* harmony import */ var _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(453);
|
|
285830
|
+
/* harmony import */ var _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(9772);
|
|
285831
|
+
/* harmony import */ var _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(588);
|
|
285832
|
+
/* harmony import */ var _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(1885);
|
|
285833
|
+
/* harmony import */ var _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(7504);
|
|
285834
|
+
/* harmony import */ var _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(2302);
|
|
285835
|
+
/* harmony import */ var _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(2191);
|
|
285836
|
+
/* harmony import */ var _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(1297);
|
|
285837
|
+
/* harmony import */ var _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(3005);
|
|
285838
|
+
/* harmony import */ var _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(2317);
|
|
285839
|
+
/* harmony import */ var _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(2883);
|
|
285840
|
+
/* harmony import */ var _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(6977);
|
|
285841
|
+
/* harmony import */ var _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(2519);
|
|
285842
|
+
/* harmony import */ var _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(5030);
|
|
285843
|
+
/* harmony import */ var _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(5272);
|
|
285844
|
+
/* harmony import */ var _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(3414);
|
|
285845
|
+
/* harmony import */ var _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(3848);
|
|
285846
|
+
/* harmony import */ var _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(8368);
|
|
285847
|
+
/* harmony import */ var _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(204);
|
|
285848
|
+
/* harmony import */ var _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(6820);
|
|
285849
|
+
/* harmony import */ var _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(2952);
|
|
285850
|
+
/* harmony import */ var _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(1788);
|
|
285851
|
+
/* harmony import */ var _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(9004);
|
|
285852
|
+
/* harmony import */ var _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(8335);
|
|
285853
|
+
/* harmony import */ var _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(1465);
|
|
285854
|
+
/* harmony import */ var _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(9488);
|
|
285855
|
+
/* harmony import */ var _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(5189);
|
|
285856
|
+
/* harmony import */ var _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(8559);
|
|
285857
|
+
/* harmony import */ var _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(7474);
|
|
285858
|
+
/* harmony import */ var _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(8384);
|
|
285859
|
+
/* harmony import */ var _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(9021);
|
|
285860
|
+
/* harmony import */ var _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(3484);
|
|
285861
|
+
/* harmony import */ var _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(1311);
|
|
285862
|
+
/* harmony import */ var _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(736);
|
|
285863
|
+
/* harmony import */ var _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(449);
|
|
285864
|
+
/* harmony import */ var _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(2387);
|
|
285865
|
+
/* harmony import */ var _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(7181);
|
|
285866
|
+
/* harmony import */ var _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(627);
|
|
285867
|
+
/* harmony import */ var _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(6484);
|
|
285868
|
+
/* harmony import */ var _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(8080);
|
|
285869
|
+
/* harmony import */ var _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(7105);
|
|
285870
|
+
/* harmony import */ var _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(2214);
|
|
285871
|
+
/* harmony import */ var _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(4360);
|
|
285872
|
+
/* harmony import */ var _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(7924);
|
|
285873
|
+
/* harmony import */ var _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(3541);
|
|
285874
|
+
/* harmony import */ var _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(9782);
|
|
285875
|
+
/* harmony import */ var _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(7614);
|
|
285876
|
+
/* harmony import */ var _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(4828);
|
|
285877
|
+
/* harmony import */ var _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(5630);
|
|
285878
|
+
/* harmony import */ var _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(3910);
|
|
285879
285879
|
/*
|
|
285880
285880
|
|
|
285881
285881
|
MIT License
|
|
@@ -285910,7 +285910,7 @@ SOFTWARE.
|
|
|
285910
285910
|
|
|
285911
285911
|
//-----------------------------------------------------------------------------
|
|
285912
285912
|
// this is updated by vss.js when building
|
|
285913
|
-
const version = '4.1.
|
|
285913
|
+
const version = '4.1.60';
|
|
285914
285914
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
285915
285915
|
//-----------------------------------------------------------------------------
|
|
285916
285916
|
|
|
@@ -286008,10 +286008,6 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion
|
|
|
286008
286008
|
|
|
286009
286009
|
|
|
286010
286010
|
|
|
286011
|
-
|
|
286012
|
-
|
|
286013
|
-
|
|
286014
|
-
|
|
286015
286011
|
|
|
286016
286012
|
|
|
286017
286013
|
|
|
@@ -286072,9 +286068,6 @@ _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion
|
|
|
286072
286068
|
|
|
286073
286069
|
|
|
286074
286070
|
|
|
286075
|
-
|
|
286076
|
-
|
|
286077
|
-
|
|
286078
286071
|
|
|
286079
286072
|
|
|
286080
286073
|
|
|
@@ -286144,109 +286137,102 @@ const exchanges = {
|
|
|
286144
286137
|
'htx': _src_htx_js__WEBPACK_IMPORTED_MODULE_62__/* ["default"] */ .Z,
|
|
286145
286138
|
'huobi': _src_huobi_js__WEBPACK_IMPORTED_MODULE_63__/* ["default"] */ .Z,
|
|
286146
286139
|
'huobijp': _src_huobijp_js__WEBPACK_IMPORTED_MODULE_64__/* ["default"] */ .Z,
|
|
286147
|
-
'
|
|
286148
|
-
'
|
|
286149
|
-
'
|
|
286150
|
-
'
|
|
286151
|
-
'
|
|
286152
|
-
'
|
|
286153
|
-
'
|
|
286154
|
-
'
|
|
286155
|
-
'
|
|
286156
|
-
'
|
|
286157
|
-
'
|
|
286158
|
-
'
|
|
286159
|
-
'
|
|
286160
|
-
'
|
|
286161
|
-
'
|
|
286162
|
-
'
|
|
286163
|
-
'
|
|
286164
|
-
'
|
|
286165
|
-
'
|
|
286166
|
-
'
|
|
286167
|
-
'
|
|
286168
|
-
'
|
|
286169
|
-
'
|
|
286170
|
-
'
|
|
286171
|
-
'
|
|
286172
|
-
'
|
|
286173
|
-
'
|
|
286174
|
-
'
|
|
286175
|
-
'
|
|
286176
|
-
'
|
|
286177
|
-
'
|
|
286178
|
-
'
|
|
286179
|
-
'
|
|
286180
|
-
'
|
|
286181
|
-
'
|
|
286182
|
-
'
|
|
286183
|
-
'woo': _src_woo_js__WEBPACK_IMPORTED_MODULE_101__/* ["default"] */ .Z,
|
|
286184
|
-
'yobit': _src_yobit_js__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z,
|
|
286185
|
-
'zaif': _src_zaif_js__WEBPACK_IMPORTED_MODULE_103__/* ["default"] */ .Z,
|
|
286186
|
-
'zonda': _src_zonda_js__WEBPACK_IMPORTED_MODULE_104__/* ["default"] */ .Z,
|
|
286140
|
+
'idex': _src_idex_js__WEBPACK_IMPORTED_MODULE_65__/* ["default"] */ .Z,
|
|
286141
|
+
'independentreserve': _src_independentreserve_js__WEBPACK_IMPORTED_MODULE_66__/* ["default"] */ .Z,
|
|
286142
|
+
'indodax': _src_indodax_js__WEBPACK_IMPORTED_MODULE_67__/* ["default"] */ .Z,
|
|
286143
|
+
'kraken': _src_kraken_js__WEBPACK_IMPORTED_MODULE_68__/* ["default"] */ .Z,
|
|
286144
|
+
'krakenfutures': _src_krakenfutures_js__WEBPACK_IMPORTED_MODULE_69__/* ["default"] */ .Z,
|
|
286145
|
+
'kucoin': _src_kucoin_js__WEBPACK_IMPORTED_MODULE_70__/* ["default"] */ .Z,
|
|
286146
|
+
'kucoinfutures': _src_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_71__/* ["default"] */ .Z,
|
|
286147
|
+
'kuna': _src_kuna_js__WEBPACK_IMPORTED_MODULE_72__/* ["default"] */ .Z,
|
|
286148
|
+
'latoken': _src_latoken_js__WEBPACK_IMPORTED_MODULE_73__/* ["default"] */ .Z,
|
|
286149
|
+
'lbank': _src_lbank_js__WEBPACK_IMPORTED_MODULE_74__/* ["default"] */ .Z,
|
|
286150
|
+
'luno': _src_luno_js__WEBPACK_IMPORTED_MODULE_75__/* ["default"] */ .Z,
|
|
286151
|
+
'lykke': _src_lykke_js__WEBPACK_IMPORTED_MODULE_76__/* ["default"] */ .Z,
|
|
286152
|
+
'mercado': _src_mercado_js__WEBPACK_IMPORTED_MODULE_77__/* ["default"] */ .Z,
|
|
286153
|
+
'mexc': _src_mexc_js__WEBPACK_IMPORTED_MODULE_78__/* ["default"] */ .Z,
|
|
286154
|
+
'ndax': _src_ndax_js__WEBPACK_IMPORTED_MODULE_79__/* ["default"] */ .Z,
|
|
286155
|
+
'novadax': _src_novadax_js__WEBPACK_IMPORTED_MODULE_80__/* ["default"] */ .Z,
|
|
286156
|
+
'oceanex': _src_oceanex_js__WEBPACK_IMPORTED_MODULE_81__/* ["default"] */ .Z,
|
|
286157
|
+
'okcoin': _src_okcoin_js__WEBPACK_IMPORTED_MODULE_82__/* ["default"] */ .Z,
|
|
286158
|
+
'okx': _src_okx_js__WEBPACK_IMPORTED_MODULE_83__/* ["default"] */ .Z,
|
|
286159
|
+
'p2b': _src_p2b_js__WEBPACK_IMPORTED_MODULE_84__/* ["default"] */ .Z,
|
|
286160
|
+
'paymium': _src_paymium_js__WEBPACK_IMPORTED_MODULE_85__/* ["default"] */ .Z,
|
|
286161
|
+
'phemex': _src_phemex_js__WEBPACK_IMPORTED_MODULE_86__/* ["default"] */ .Z,
|
|
286162
|
+
'poloniex': _src_poloniex_js__WEBPACK_IMPORTED_MODULE_87__/* ["default"] */ .Z,
|
|
286163
|
+
'poloniexfutures': _src_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_88__/* ["default"] */ .Z,
|
|
286164
|
+
'probit': _src_probit_js__WEBPACK_IMPORTED_MODULE_89__/* ["default"] */ .Z,
|
|
286165
|
+
'tidex': _src_tidex_js__WEBPACK_IMPORTED_MODULE_90__/* ["default"] */ .Z,
|
|
286166
|
+
'timex': _src_timex_js__WEBPACK_IMPORTED_MODULE_91__/* ["default"] */ .Z,
|
|
286167
|
+
'tokocrypto': _src_tokocrypto_js__WEBPACK_IMPORTED_MODULE_92__/* ["default"] */ .Z,
|
|
286168
|
+
'upbit': _src_upbit_js__WEBPACK_IMPORTED_MODULE_93__/* ["default"] */ .Z,
|
|
286169
|
+
'wavesexchange': _src_wavesexchange_js__WEBPACK_IMPORTED_MODULE_94__/* ["default"] */ .Z,
|
|
286170
|
+
'wazirx': _src_wazirx_js__WEBPACK_IMPORTED_MODULE_95__/* ["default"] */ .Z,
|
|
286171
|
+
'whitebit': _src_whitebit_js__WEBPACK_IMPORTED_MODULE_96__/* ["default"] */ .Z,
|
|
286172
|
+
'woo': _src_woo_js__WEBPACK_IMPORTED_MODULE_97__/* ["default"] */ .Z,
|
|
286173
|
+
'yobit': _src_yobit_js__WEBPACK_IMPORTED_MODULE_98__/* ["default"] */ .Z,
|
|
286174
|
+
'zaif': _src_zaif_js__WEBPACK_IMPORTED_MODULE_99__/* ["default"] */ .Z,
|
|
286175
|
+
'zonda': _src_zonda_js__WEBPACK_IMPORTED_MODULE_100__/* ["default"] */ .Z,
|
|
286187
286176
|
};
|
|
286188
286177
|
const pro = {
|
|
286189
|
-
'alpaca':
|
|
286190
|
-
'ascendex':
|
|
286191
|
-
'bequant':
|
|
286192
|
-
'binance':
|
|
286193
|
-
'binancecoinm':
|
|
286194
|
-
'binanceus':
|
|
286195
|
-
'binanceusdm':
|
|
286196
|
-
'bingx':
|
|
286197
|
-
'bitcoincom':
|
|
286198
|
-
'bitfinex':
|
|
286199
|
-
'bitfinex2':
|
|
286200
|
-
'bitget':
|
|
286201
|
-
'bitmart':
|
|
286202
|
-
'bitmex':
|
|
286203
|
-
'bitopro':
|
|
286204
|
-
'bitpanda':
|
|
286205
|
-
'bitrue':
|
|
286206
|
-
'bitstamp':
|
|
286207
|
-
'bittrex':
|
|
286208
|
-
'bitvavo':
|
|
286209
|
-
'blockchaincom':
|
|
286210
|
-
'bybit':
|
|
286211
|
-
'cex':
|
|
286212
|
-
'coinbase':
|
|
286213
|
-
'coinbaseprime':
|
|
286214
|
-
'coinbasepro':
|
|
286215
|
-
'coinex':
|
|
286216
|
-
'cryptocom':
|
|
286217
|
-
'currencycom':
|
|
286218
|
-
'deribit':
|
|
286219
|
-
'exmo':
|
|
286220
|
-
'gate':
|
|
286221
|
-
'gateio':
|
|
286222
|
-
'gemini':
|
|
286223
|
-
'hitbtc':
|
|
286224
|
-
'hollaex':
|
|
286225
|
-
'htx':
|
|
286226
|
-
'huobi':
|
|
286227
|
-
'huobijp':
|
|
286228
|
-
'
|
|
286229
|
-
'
|
|
286230
|
-
'
|
|
286231
|
-
'
|
|
286232
|
-
'
|
|
286233
|
-
'
|
|
286234
|
-
'
|
|
286235
|
-
'
|
|
286236
|
-
'
|
|
286237
|
-
'
|
|
286238
|
-
'
|
|
286239
|
-
'
|
|
286240
|
-
'
|
|
286241
|
-
'
|
|
286242
|
-
'
|
|
286243
|
-
'
|
|
286244
|
-
'
|
|
286245
|
-
'
|
|
286246
|
-
'
|
|
286247
|
-
'wazirx': _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_163__/* ["default"] */ .Z,
|
|
286248
|
-
'whitebit': _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_164__/* ["default"] */ .Z,
|
|
286249
|
-
'woo': _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_165__/* ["default"] */ .Z,
|
|
286178
|
+
'alpaca': _src_pro_alpaca_js__WEBPACK_IMPORTED_MODULE_101__/* ["default"] */ .Z,
|
|
286179
|
+
'ascendex': _src_pro_ascendex_js__WEBPACK_IMPORTED_MODULE_102__/* ["default"] */ .Z,
|
|
286180
|
+
'bequant': _src_pro_bequant_js__WEBPACK_IMPORTED_MODULE_103__/* ["default"] */ .Z,
|
|
286181
|
+
'binance': _src_pro_binance_js__WEBPACK_IMPORTED_MODULE_104__/* ["default"] */ .Z,
|
|
286182
|
+
'binancecoinm': _src_pro_binancecoinm_js__WEBPACK_IMPORTED_MODULE_105__/* ["default"] */ .Z,
|
|
286183
|
+
'binanceus': _src_pro_binanceus_js__WEBPACK_IMPORTED_MODULE_106__/* ["default"] */ .Z,
|
|
286184
|
+
'binanceusdm': _src_pro_binanceusdm_js__WEBPACK_IMPORTED_MODULE_107__/* ["default"] */ .Z,
|
|
286185
|
+
'bingx': _src_pro_bingx_js__WEBPACK_IMPORTED_MODULE_108__/* ["default"] */ .Z,
|
|
286186
|
+
'bitcoincom': _src_pro_bitcoincom_js__WEBPACK_IMPORTED_MODULE_109__/* ["default"] */ .Z,
|
|
286187
|
+
'bitfinex': _src_pro_bitfinex_js__WEBPACK_IMPORTED_MODULE_110__/* ["default"] */ .Z,
|
|
286188
|
+
'bitfinex2': _src_pro_bitfinex2_js__WEBPACK_IMPORTED_MODULE_111__/* ["default"] */ .Z,
|
|
286189
|
+
'bitget': _src_pro_bitget_js__WEBPACK_IMPORTED_MODULE_112__/* ["default"] */ .Z,
|
|
286190
|
+
'bitmart': _src_pro_bitmart_js__WEBPACK_IMPORTED_MODULE_113__/* ["default"] */ .Z,
|
|
286191
|
+
'bitmex': _src_pro_bitmex_js__WEBPACK_IMPORTED_MODULE_114__/* ["default"] */ .Z,
|
|
286192
|
+
'bitopro': _src_pro_bitopro_js__WEBPACK_IMPORTED_MODULE_115__/* ["default"] */ .Z,
|
|
286193
|
+
'bitpanda': _src_pro_bitpanda_js__WEBPACK_IMPORTED_MODULE_116__/* ["default"] */ .Z,
|
|
286194
|
+
'bitrue': _src_pro_bitrue_js__WEBPACK_IMPORTED_MODULE_117__/* ["default"] */ .Z,
|
|
286195
|
+
'bitstamp': _src_pro_bitstamp_js__WEBPACK_IMPORTED_MODULE_118__/* ["default"] */ .Z,
|
|
286196
|
+
'bittrex': _src_pro_bittrex_js__WEBPACK_IMPORTED_MODULE_119__/* ["default"] */ .Z,
|
|
286197
|
+
'bitvavo': _src_pro_bitvavo_js__WEBPACK_IMPORTED_MODULE_120__/* ["default"] */ .Z,
|
|
286198
|
+
'blockchaincom': _src_pro_blockchaincom_js__WEBPACK_IMPORTED_MODULE_121__/* ["default"] */ .Z,
|
|
286199
|
+
'bybit': _src_pro_bybit_js__WEBPACK_IMPORTED_MODULE_122__/* ["default"] */ .Z,
|
|
286200
|
+
'cex': _src_pro_cex_js__WEBPACK_IMPORTED_MODULE_123__/* ["default"] */ .Z,
|
|
286201
|
+
'coinbase': _src_pro_coinbase_js__WEBPACK_IMPORTED_MODULE_124__/* ["default"] */ .Z,
|
|
286202
|
+
'coinbaseprime': _src_pro_coinbaseprime_js__WEBPACK_IMPORTED_MODULE_125__/* ["default"] */ .Z,
|
|
286203
|
+
'coinbasepro': _src_pro_coinbasepro_js__WEBPACK_IMPORTED_MODULE_126__/* ["default"] */ .Z,
|
|
286204
|
+
'coinex': _src_pro_coinex_js__WEBPACK_IMPORTED_MODULE_127__/* ["default"] */ .Z,
|
|
286205
|
+
'cryptocom': _src_pro_cryptocom_js__WEBPACK_IMPORTED_MODULE_128__/* ["default"] */ .Z,
|
|
286206
|
+
'currencycom': _src_pro_currencycom_js__WEBPACK_IMPORTED_MODULE_129__/* ["default"] */ .Z,
|
|
286207
|
+
'deribit': _src_pro_deribit_js__WEBPACK_IMPORTED_MODULE_130__/* ["default"] */ .Z,
|
|
286208
|
+
'exmo': _src_pro_exmo_js__WEBPACK_IMPORTED_MODULE_131__/* ["default"] */ .Z,
|
|
286209
|
+
'gate': _src_pro_gate_js__WEBPACK_IMPORTED_MODULE_132__/* ["default"] */ .Z,
|
|
286210
|
+
'gateio': _src_pro_gateio_js__WEBPACK_IMPORTED_MODULE_133__/* ["default"] */ .Z,
|
|
286211
|
+
'gemini': _src_pro_gemini_js__WEBPACK_IMPORTED_MODULE_134__/* ["default"] */ .Z,
|
|
286212
|
+
'hitbtc': _src_pro_hitbtc_js__WEBPACK_IMPORTED_MODULE_135__/* ["default"] */ .Z,
|
|
286213
|
+
'hollaex': _src_pro_hollaex_js__WEBPACK_IMPORTED_MODULE_136__/* ["default"] */ .Z,
|
|
286214
|
+
'htx': _src_pro_htx_js__WEBPACK_IMPORTED_MODULE_137__/* ["default"] */ .Z,
|
|
286215
|
+
'huobi': _src_pro_huobi_js__WEBPACK_IMPORTED_MODULE_138__/* ["default"] */ .Z,
|
|
286216
|
+
'huobijp': _src_pro_huobijp_js__WEBPACK_IMPORTED_MODULE_139__/* ["default"] */ .Z,
|
|
286217
|
+
'idex': _src_pro_idex_js__WEBPACK_IMPORTED_MODULE_140__/* ["default"] */ .Z,
|
|
286218
|
+
'independentreserve': _src_pro_independentreserve_js__WEBPACK_IMPORTED_MODULE_141__/* ["default"] */ .Z,
|
|
286219
|
+
'kraken': _src_pro_kraken_js__WEBPACK_IMPORTED_MODULE_142__/* ["default"] */ .Z,
|
|
286220
|
+
'krakenfutures': _src_pro_krakenfutures_js__WEBPACK_IMPORTED_MODULE_143__/* ["default"] */ .Z,
|
|
286221
|
+
'kucoin': _src_pro_kucoin_js__WEBPACK_IMPORTED_MODULE_144__/* ["default"] */ .Z,
|
|
286222
|
+
'kucoinfutures': _src_pro_kucoinfutures_js__WEBPACK_IMPORTED_MODULE_145__/* ["default"] */ .Z,
|
|
286223
|
+
'luno': _src_pro_luno_js__WEBPACK_IMPORTED_MODULE_146__/* ["default"] */ .Z,
|
|
286224
|
+
'mexc': _src_pro_mexc_js__WEBPACK_IMPORTED_MODULE_147__/* ["default"] */ .Z,
|
|
286225
|
+
'ndax': _src_pro_ndax_js__WEBPACK_IMPORTED_MODULE_148__/* ["default"] */ .Z,
|
|
286226
|
+
'okcoin': _src_pro_okcoin_js__WEBPACK_IMPORTED_MODULE_149__/* ["default"] */ .Z,
|
|
286227
|
+
'okx': _src_pro_okx_js__WEBPACK_IMPORTED_MODULE_150__/* ["default"] */ .Z,
|
|
286228
|
+
'phemex': _src_pro_phemex_js__WEBPACK_IMPORTED_MODULE_151__/* ["default"] */ .Z,
|
|
286229
|
+
'poloniex': _src_pro_poloniex_js__WEBPACK_IMPORTED_MODULE_152__/* ["default"] */ .Z,
|
|
286230
|
+
'poloniexfutures': _src_pro_poloniexfutures_js__WEBPACK_IMPORTED_MODULE_153__/* ["default"] */ .Z,
|
|
286231
|
+
'probit': _src_pro_probit_js__WEBPACK_IMPORTED_MODULE_154__/* ["default"] */ .Z,
|
|
286232
|
+
'upbit': _src_pro_upbit_js__WEBPACK_IMPORTED_MODULE_155__/* ["default"] */ .Z,
|
|
286233
|
+
'wazirx': _src_pro_wazirx_js__WEBPACK_IMPORTED_MODULE_156__/* ["default"] */ .Z,
|
|
286234
|
+
'whitebit': _src_pro_whitebit_js__WEBPACK_IMPORTED_MODULE_157__/* ["default"] */ .Z,
|
|
286235
|
+
'woo': _src_pro_woo_js__WEBPACK_IMPORTED_MODULE_158__/* ["default"] */ .Z,
|
|
286250
286236
|
};
|
|
286251
286237
|
for (const exchange in pro) {
|
|
286252
286238
|
// const ccxtExchange = exchanges[exchange]
|
|
@@ -286259,7 +286245,7 @@ for (const exchange in pro) {
|
|
|
286259
286245
|
pro.exchanges = Object.keys(pro);
|
|
286260
286246
|
pro['Exchange'] = _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e; // now the same for rest and ts
|
|
286261
286247
|
//-----------------------------------------------------------------------------
|
|
286262
|
-
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise:
|
|
286248
|
+
const ccxt = Object.assign({ version, Exchange: _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e, Precise: _src_base_Precise_js__WEBPACK_IMPORTED_MODULE_159__/* .Precise */ .O, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, _src_base_functions_js__WEBPACK_IMPORTED_MODULE_160__, _src_base_errors_js__WEBPACK_IMPORTED_MODULE_161__);
|
|
286263
286249
|
|
|
286264
286250
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ccxt);
|
|
286265
286251
|
//-----------------------------------------------------------------------------
|