ccxt 4.2.29 → 4.2.31
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 -6
- package/dist/ccxt.browser.js +2196 -601
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +3 -1
- package/dist/cjs/src/ascendex.js +5 -5
- package/dist/cjs/src/base/Exchange.js +33 -25
- package/dist/cjs/src/base/errors.js +3 -3
- package/dist/cjs/src/base/functions/type.js +12 -0
- package/dist/cjs/src/bigone.js +2 -2
- package/dist/cjs/src/binance.js +897 -218
- package/dist/cjs/src/bingx.js +1 -1
- package/dist/cjs/src/bitfinex.js +1 -1
- package/dist/cjs/src/bitfinex2.js +457 -93
- package/dist/cjs/src/bitforex.js +3 -0
- package/dist/cjs/src/bitget.js +8 -4
- package/dist/cjs/src/bitmart.js +3 -3
- package/dist/cjs/src/bitmex.js +4 -4
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitso.js +1 -1
- package/dist/cjs/src/bitteam.js +2 -2
- package/dist/cjs/src/btcalpha.js +1 -1
- package/dist/cjs/src/bybit.js +3 -3
- package/dist/cjs/src/coinbase.js +22 -5
- package/dist/cjs/src/coincheck.js +1 -1
- package/dist/cjs/src/coinex.js +2 -2
- package/dist/cjs/src/coinlist.js +1 -1
- package/dist/cjs/src/coinmate.js +1 -1
- package/dist/cjs/src/coinmetro.js +2 -2
- package/dist/cjs/src/coinsph.js +1 -1
- package/dist/cjs/src/cryptocom.js +3 -3
- package/dist/cjs/src/deribit.js +1 -0
- package/dist/cjs/src/digifinex.js +6 -4
- package/dist/cjs/src/exmo.js +2 -2
- package/dist/cjs/src/gate.js +5 -5
- package/dist/cjs/src/gemini.js +3 -3
- package/dist/cjs/src/hitbtc.js +14 -20
- package/dist/cjs/src/hollaex.js +2 -2
- package/dist/cjs/src/htx.js +6 -6
- package/dist/cjs/src/huobijp.js +1 -1
- package/dist/cjs/src/kraken.js +3 -1
- package/dist/cjs/src/krakenfutures.js +4 -1
- package/dist/cjs/src/kucoin.js +17 -17
- package/dist/cjs/src/kucoinfutures.js +3 -3
- package/dist/cjs/src/lbank.js +28 -27
- package/dist/cjs/src/mexc.js +7 -7
- package/dist/cjs/src/novadax.js +1 -1
- package/dist/cjs/src/okcoin.js +2 -2
- package/dist/cjs/src/okx.js +23 -8
- package/dist/cjs/src/p2b.js +1 -0
- package/dist/cjs/src/phemex.js +3 -3
- package/dist/cjs/src/poloniexfutures.js +6 -3
- package/dist/cjs/src/pro/alpaca.js +1 -1
- package/dist/cjs/src/pro/binance.js +4 -4
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bitmart.js +1 -1
- package/dist/cjs/src/pro/bitmex.js +49 -6
- package/dist/cjs/src/pro/bitvavo.js +1 -1
- package/dist/cjs/src/pro/bybit.js +2 -2
- package/dist/cjs/src/pro/cex.js +2 -2
- package/dist/cjs/src/pro/independentreserve.js +1 -1
- package/dist/cjs/src/pro/okx.js +1 -1
- package/dist/cjs/src/pro/onetrading.js +2 -2
- package/dist/cjs/src/pro/p2b.js +432 -0
- package/dist/cjs/src/pro/probit.js +5 -5
- package/dist/cjs/src/pro/whitebit.js +1 -1
- package/dist/cjs/src/probit.js +1 -1
- package/dist/cjs/src/timex.js +2 -2
- package/dist/cjs/src/tokocrypto.js +3 -3
- package/dist/cjs/src/wavesexchange.js +2 -2
- package/dist/cjs/src/whitebit.js +3 -3
- package/dist/cjs/src/woo.js +3 -3
- package/dist/cjs/src/yobit.js +1 -1
- package/dist/cjs/src/zaif.js +1 -1
- package/dist/cjs/src/zonda.js +3 -3
- package/js/ccxt.d.ts +4 -1
- package/js/ccxt.js +3 -1
- package/js/src/abstract/bybit.d.ts +2 -2
- package/js/src/abstract/coinbase.d.ts +10 -0
- package/js/src/abstract/okx.d.ts +12 -1
- package/js/src/ascendex.js +5 -5
- package/js/src/base/Exchange.d.ts +2 -2
- package/js/src/base/Exchange.js +33 -25
- package/js/src/base/errorHierarchy.d.ts +7 -6
- package/js/src/base/errorHierarchy.js +7 -6
- package/js/src/base/errors.d.ts +3 -3
- package/js/src/base/errors.js +3 -3
- package/js/src/base/functions/type.js +12 -0
- package/js/src/bigone.js +2 -2
- package/js/src/binance.d.ts +1 -0
- package/js/src/binance.js +898 -219
- package/js/src/bingx.js +1 -1
- package/js/src/bitfinex.js +1 -1
- package/js/src/bitfinex2.d.ts +6 -1
- package/js/src/bitfinex2.js +457 -93
- package/js/src/bitforex.js +3 -0
- package/js/src/bitget.js +8 -4
- package/js/src/bitmart.js +3 -3
- package/js/src/bitmex.js +4 -4
- package/js/src/bitrue.js +1 -1
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +1 -1
- package/js/src/bitteam.js +2 -2
- package/js/src/btcalpha.js +1 -1
- package/js/src/bybit.js +3 -3
- package/js/src/coinbase.js +22 -5
- package/js/src/coincheck.js +1 -1
- package/js/src/coinex.js +2 -2
- package/js/src/coinlist.js +1 -1
- package/js/src/coinmate.js +1 -1
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +2 -2
- package/js/src/coinsph.js +1 -1
- package/js/src/cryptocom.js +3 -3
- package/js/src/deribit.js +1 -0
- package/js/src/digifinex.js +6 -4
- package/js/src/exmo.js +2 -2
- package/js/src/gate.js +5 -5
- package/js/src/gemini.d.ts +1 -1
- package/js/src/gemini.js +3 -3
- package/js/src/hitbtc.js +14 -20
- package/js/src/hollaex.js +2 -2
- package/js/src/htx.js +6 -6
- package/js/src/huobijp.js +1 -1
- package/js/src/kraken.js +3 -1
- package/js/src/krakenfutures.js +4 -1
- package/js/src/kucoin.js +17 -17
- package/js/src/kucoinfutures.js +3 -3
- package/js/src/lbank.d.ts +1 -1
- package/js/src/lbank.js +28 -27
- package/js/src/mexc.js +7 -7
- package/js/src/novadax.js +1 -1
- package/js/src/okcoin.js +2 -2
- package/js/src/okx.js +23 -8
- package/js/src/p2b.js +1 -0
- package/js/src/phemex.js +3 -3
- package/js/src/poloniexfutures.js +6 -3
- package/js/src/pro/alpaca.js +1 -1
- package/js/src/pro/binance.js +4 -4
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bitmart.js +1 -1
- package/js/src/pro/bitmex.d.ts +2 -1
- package/js/src/pro/bitmex.js +49 -6
- package/js/src/pro/bitvavo.js +1 -1
- package/js/src/pro/bybit.js +2 -2
- package/js/src/pro/cex.js +2 -2
- package/js/src/pro/independentreserve.js +1 -1
- package/js/src/pro/okx.js +1 -1
- package/js/src/pro/onetrading.js +2 -2
- package/js/src/pro/p2b.d.ts +23 -0
- package/js/src/pro/p2b.js +433 -0
- package/js/src/pro/probit.js +5 -5
- package/js/src/pro/whitebit.js +1 -1
- package/js/src/probit.js +1 -1
- package/js/src/timex.js +2 -2
- package/js/src/tokocrypto.js +3 -3
- package/js/src/wavesexchange.js +2 -2
- package/js/src/whitebit.js +3 -3
- package/js/src/woo.js +3 -3
- package/js/src/yobit.js +1 -1
- package/js/src/zaif.js +1 -1
- package/js/src/zonda.d.ts +1 -1
- package/js/src/zonda.js +3 -3
- package/package.json +1 -1
- package/skip-tests.json +3 -10
package/js/src/bitforex.js
CHANGED
|
@@ -44,6 +44,9 @@ export default class bitforex extends Exchange {
|
|
|
44
44
|
'fetchClosedOrders': true,
|
|
45
45
|
'fetchCrossBorrowRate': false,
|
|
46
46
|
'fetchCrossBorrowRates': false,
|
|
47
|
+
'fetchDepositAddress': false,
|
|
48
|
+
'fetchDepositAddresses': false,
|
|
49
|
+
'fetchDepositAddressesByNetwork': false,
|
|
47
50
|
'fetchFundingHistory': false,
|
|
48
51
|
'fetchFundingRate': false,
|
|
49
52
|
'fetchFundingRateHistory': false,
|
package/js/src/bitget.js
CHANGED
|
@@ -69,6 +69,7 @@ export default class bitget extends Exchange {
|
|
|
69
69
|
'fetchCrossBorrowRate': true,
|
|
70
70
|
'fetchCrossBorrowRates': false,
|
|
71
71
|
'fetchCurrencies': true,
|
|
72
|
+
'fetchDeposit': false,
|
|
72
73
|
'fetchDepositAddress': true,
|
|
73
74
|
'fetchDepositAddresses': false,
|
|
74
75
|
'fetchDeposits': true,
|
|
@@ -98,6 +99,7 @@ export default class bitget extends Exchange {
|
|
|
98
99
|
'fetchOpenOrders': true,
|
|
99
100
|
'fetchOrder': true,
|
|
100
101
|
'fetchOrderBook': true,
|
|
102
|
+
'fetchOrderBooks': false,
|
|
101
103
|
'fetchOrders': false,
|
|
102
104
|
'fetchOrderTrades': false,
|
|
103
105
|
'fetchPosition': true,
|
|
@@ -105,6 +107,7 @@ export default class bitget extends Exchange {
|
|
|
105
107
|
'fetchPositions': true,
|
|
106
108
|
'fetchPositionsRisk': false,
|
|
107
109
|
'fetchPremiumIndexOHLCV': false,
|
|
110
|
+
'fetchStatus': false,
|
|
108
111
|
'fetchTicker': true,
|
|
109
112
|
'fetchTickers': true,
|
|
110
113
|
'fetchTime': true,
|
|
@@ -121,6 +124,7 @@ export default class bitget extends Exchange {
|
|
|
121
124
|
'repayCrossMargin': true,
|
|
122
125
|
'repayIsolatedMargin': true,
|
|
123
126
|
'setLeverage': true,
|
|
127
|
+
'setMargin': false,
|
|
124
128
|
'setMarginMode': true,
|
|
125
129
|
'setPositionMode': true,
|
|
126
130
|
'signIn': false,
|
|
@@ -2238,7 +2242,7 @@ export default class bitget extends Exchange {
|
|
|
2238
2242
|
'fee': undefined,
|
|
2239
2243
|
};
|
|
2240
2244
|
const withdrawOptions = this.safeValue(this.options, 'withdraw', {});
|
|
2241
|
-
const fillResponseFromRequest = this.
|
|
2245
|
+
const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
|
|
2242
2246
|
if (fillResponseFromRequest) {
|
|
2243
2247
|
result['currency'] = code;
|
|
2244
2248
|
result['timestamp'] = this.milliseconds();
|
|
@@ -3123,7 +3127,7 @@ export default class bitget extends Exchange {
|
|
|
3123
3127
|
[marginMode, params] = this.handleMarginModeAndParams('fetchTradingFees', params);
|
|
3124
3128
|
[marketType, params] = this.handleMarketTypeAndParams('fetchTradingFees', undefined, params);
|
|
3125
3129
|
if (marketType === 'spot') {
|
|
3126
|
-
const margin = this.
|
|
3130
|
+
const margin = this.safeBool(params, 'margin', false);
|
|
3127
3131
|
params = this.omit(params, 'margin');
|
|
3128
3132
|
if ((marginMode !== undefined) || margin) {
|
|
3129
3133
|
response = await this.publicMarginGetV2MarginCurrencies(params);
|
|
@@ -4144,7 +4148,7 @@ export default class bitget extends Exchange {
|
|
|
4144
4148
|
request['price'] = this.priceToPrecision(symbol, price);
|
|
4145
4149
|
}
|
|
4146
4150
|
const triggerType = this.safeString(params, 'triggerType', 'mark_price');
|
|
4147
|
-
const reduceOnly = this.
|
|
4151
|
+
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
4148
4152
|
const clientOrderId = this.safeString2(params, 'clientOid', 'clientOrderId');
|
|
4149
4153
|
const exchangeSpecificTifParam = this.safeString2(params, 'force', 'timeInForce');
|
|
4150
4154
|
let postOnly = undefined;
|
|
@@ -4240,7 +4244,7 @@ export default class bitget extends Exchange {
|
|
|
4240
4244
|
}
|
|
4241
4245
|
const marginModeRequest = (marginMode === 'cross') ? 'crossed' : 'isolated';
|
|
4242
4246
|
request['marginMode'] = marginModeRequest;
|
|
4243
|
-
const oneWayMode = this.
|
|
4247
|
+
const oneWayMode = this.safeBool(params, 'oneWayMode', false);
|
|
4244
4248
|
params = this.omit(params, 'oneWayMode');
|
|
4245
4249
|
let requestSide = side;
|
|
4246
4250
|
if (reduceOnly) {
|
package/js/src/bitmart.js
CHANGED
|
@@ -1939,7 +1939,7 @@ export default class bitmart extends Exchange {
|
|
|
1939
1939
|
let marketType = undefined;
|
|
1940
1940
|
[marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
|
|
1941
1941
|
const marginMode = this.safeString(params, 'marginMode');
|
|
1942
|
-
const isMargin = this.
|
|
1942
|
+
const isMargin = this.safeBool(params, 'margin', false);
|
|
1943
1943
|
params = this.omit(params, ['margin', 'marginMode']);
|
|
1944
1944
|
if (marginMode !== undefined || isMargin) {
|
|
1945
1945
|
marketType = 'margin';
|
|
@@ -2813,7 +2813,7 @@ export default class bitmart extends Exchange {
|
|
|
2813
2813
|
response = await this.privateGetContractPrivateCurrentPlanOrder(this.extend(request, params));
|
|
2814
2814
|
}
|
|
2815
2815
|
else {
|
|
2816
|
-
const trailing = this.
|
|
2816
|
+
const trailing = this.safeBool(params, 'trailing', false);
|
|
2817
2817
|
let orderType = this.safeString(params, 'orderType');
|
|
2818
2818
|
params = this.omit(params, ['orderType', 'trailing']);
|
|
2819
2819
|
if (trailing) {
|
|
@@ -2993,7 +2993,7 @@ export default class bitmart extends Exchange {
|
|
|
2993
2993
|
if (symbol === undefined) {
|
|
2994
2994
|
throw new ArgumentsRequired(this.id + ' fetchOrder() requires a symbol argument');
|
|
2995
2995
|
}
|
|
2996
|
-
const trailing = this.
|
|
2996
|
+
const trailing = this.safeBool(params, 'trailing', false);
|
|
2997
2997
|
let orderType = this.safeString(params, 'orderType');
|
|
2998
2998
|
params = this.omit(params, ['orderType', 'trailing']);
|
|
2999
2999
|
if (trailing) {
|
package/js/src/bitmex.js
CHANGED
|
@@ -342,8 +342,8 @@ export default class bitmex extends Exchange {
|
|
|
342
342
|
const network = this.networkIdToCode(networkId);
|
|
343
343
|
const withdrawalFeeRaw = this.safeString(chain, 'withdrawalFee');
|
|
344
344
|
const withdrawalFee = this.parseNumber(Precise.stringMul(withdrawalFeeRaw, precisionString));
|
|
345
|
-
const isDepositEnabled = this.
|
|
346
|
-
const isWithdrawEnabled = this.
|
|
345
|
+
const isDepositEnabled = this.safeBool(chain, 'depositEnabled', false);
|
|
346
|
+
const isWithdrawEnabled = this.safeBool(chain, 'withdrawalEnabled', false);
|
|
347
347
|
const active = (isDepositEnabled && isWithdrawEnabled);
|
|
348
348
|
if (isDepositEnabled) {
|
|
349
349
|
depositEnabled = true;
|
|
@@ -1719,7 +1719,7 @@ export default class bitmex extends Exchange {
|
|
|
1719
1719
|
isInverse = (defaultSubType === 'inverse');
|
|
1720
1720
|
}
|
|
1721
1721
|
else {
|
|
1722
|
-
isInverse = this.
|
|
1722
|
+
isInverse = this.safeBool(market, 'inverse', false);
|
|
1723
1723
|
}
|
|
1724
1724
|
if (isInverse) {
|
|
1725
1725
|
cost = this.convertFromRawQuantity(symbol, qty);
|
|
@@ -2426,7 +2426,7 @@ export default class bitmex extends Exchange {
|
|
|
2426
2426
|
const item = response[i];
|
|
2427
2427
|
const marketId = this.safeString(item, 'symbol');
|
|
2428
2428
|
const market = this.safeMarket(marketId);
|
|
2429
|
-
const swap = this.
|
|
2429
|
+
const swap = this.safeBool(market, 'swap', false);
|
|
2430
2430
|
if (swap) {
|
|
2431
2431
|
filteredResponse.push(item);
|
|
2432
2432
|
}
|
package/js/src/bitrue.js
CHANGED
|
@@ -3191,7 +3191,7 @@ export default class bitrue extends Exchange {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
// check success value for wapi endpoints
|
|
3193
3193
|
// response in format {'msg': 'The coin does not exist.', 'success': true/false}
|
|
3194
|
-
const success = this.
|
|
3194
|
+
const success = this.safeBool(response, 'success', true);
|
|
3195
3195
|
if (!success) {
|
|
3196
3196
|
const messageInner = this.safeString(response, 'msg');
|
|
3197
3197
|
let parsedMessage = undefined;
|
package/js/src/bitso.d.ts
CHANGED
package/js/src/bitso.js
CHANGED
|
@@ -1729,7 +1729,7 @@ export default class bitso extends Exchange {
|
|
|
1729
1729
|
//
|
|
1730
1730
|
// {"success":false,"error":{"code":104,"message":"Cannot perform request - nonce must be higher than 1520307203724237"}}
|
|
1731
1731
|
//
|
|
1732
|
-
let success = this.
|
|
1732
|
+
let success = this.safeBool(response, 'success', false);
|
|
1733
1733
|
if (typeof success === 'string') {
|
|
1734
1734
|
if ((success === 'true') || (success === '1')) {
|
|
1735
1735
|
success = true;
|
package/js/src/bitteam.js
CHANGED
|
@@ -356,7 +356,7 @@ export default class bitteam extends Exchange {
|
|
|
356
356
|
const created = this.parse8601(timeStart);
|
|
357
357
|
let minCost = undefined;
|
|
358
358
|
const currenciesValuedInUsd = this.safeValue(this.options, 'currenciesValuedInUsd', {});
|
|
359
|
-
const quoteInUsd = this.
|
|
359
|
+
const quoteInUsd = this.safeBool(currenciesValuedInUsd, quote, false);
|
|
360
360
|
if (quoteInUsd) {
|
|
361
361
|
const settings = this.safeValue(market, 'settings', {});
|
|
362
362
|
minCost = this.safeNumber(settings, 'limit_usd');
|
|
@@ -543,7 +543,7 @@ export default class bitteam extends Exchange {
|
|
|
543
543
|
const id = this.safeString(currency, 'symbol');
|
|
544
544
|
const numericId = this.safeInteger(currency, 'id');
|
|
545
545
|
const code = this.safeCurrencyCode(id);
|
|
546
|
-
const active = this.
|
|
546
|
+
const active = this.safeBool(currency, 'active', false);
|
|
547
547
|
const precision = this.safeInteger(currency, 'precision');
|
|
548
548
|
const txLimits = this.safeValue(currency, 'txLimits', {});
|
|
549
549
|
const minWithdraw = this.safeString(txLimits, 'minWithdraw');
|
package/js/src/btcalpha.js
CHANGED
|
@@ -680,7 +680,7 @@ export default class btcalpha extends Exchange {
|
|
|
680
680
|
const marketId = this.safeString(order, 'pair');
|
|
681
681
|
market = this.safeMarket(marketId, market, '_');
|
|
682
682
|
const symbol = market['symbol'];
|
|
683
|
-
const success = this.
|
|
683
|
+
const success = this.safeBool(order, 'success', false);
|
|
684
684
|
let timestamp = undefined;
|
|
685
685
|
if (success) {
|
|
686
686
|
timestamp = this.safeTimestamp(order, 'date');
|
package/js/src/bybit.js
CHANGED
|
@@ -299,8 +299,6 @@ export default class bybit extends Exchange {
|
|
|
299
299
|
// account
|
|
300
300
|
'v5/account/wallet-balance': 1,
|
|
301
301
|
'v5/account/borrow-history': 1,
|
|
302
|
-
'v5/account/set-collateral-switch': 5,
|
|
303
|
-
'v5/account/set-collateral-switch-batch': 5,
|
|
304
302
|
'v5/account/collateral-info': 1,
|
|
305
303
|
'v5/asset/coin-greeks': 1,
|
|
306
304
|
'v5/account/fee-rate': 10,
|
|
@@ -493,6 +491,8 @@ export default class bybit extends Exchange {
|
|
|
493
491
|
'v5/lending/purchase': 5,
|
|
494
492
|
'v5/lending/redeem': 5,
|
|
495
493
|
'v5/lending/redeem-cancel': 5,
|
|
494
|
+
'v5/account/set-collateral-switch': 5,
|
|
495
|
+
'v5/account/set-collateral-switch-batch': 5,
|
|
496
496
|
},
|
|
497
497
|
},
|
|
498
498
|
},
|
|
@@ -3462,7 +3462,7 @@ export default class bybit extends Exchange {
|
|
|
3462
3462
|
const result = await this.fetchOrders(symbol, undefined, undefined, this.extend(request, params));
|
|
3463
3463
|
const length = result.length;
|
|
3464
3464
|
if (length === 0) {
|
|
3465
|
-
const isTrigger = this.
|
|
3465
|
+
const isTrigger = this.safeBoolN(params, ['trigger', 'stop'], false);
|
|
3466
3466
|
const extra = isTrigger ? '' : 'If you are trying to fetch SL/TP conditional order, you might try setting params["trigger"] = true';
|
|
3467
3467
|
throw new OrderNotFound('Order ' + id.toString() + ' was not found.' + extra);
|
|
3468
3468
|
}
|
package/js/src/coinbase.js
CHANGED
|
@@ -207,6 +207,13 @@ export default class coinbase extends Exchange {
|
|
|
207
207
|
'brokerage/best_bid_ask',
|
|
208
208
|
'brokerage/convert/trade/{trade_id}',
|
|
209
209
|
'brokerage/time',
|
|
210
|
+
'brokerage/cfm/balance_summary',
|
|
211
|
+
'brokerage/cfm/positions',
|
|
212
|
+
'brokerage/cfm/positions/{product_id}',
|
|
213
|
+
'brokerage/cfm/sweeps',
|
|
214
|
+
'brokerage/intx/portfolio/{portfolio_uuid}',
|
|
215
|
+
'brokerage/intx/positions/{portfolio_uuid}',
|
|
216
|
+
'brokerage/intx/positions/{portfolio_uuid}/{symbol}',
|
|
210
217
|
],
|
|
211
218
|
'post': [
|
|
212
219
|
'brokerage/orders',
|
|
@@ -217,12 +224,15 @@ export default class coinbase extends Exchange {
|
|
|
217
224
|
'brokerage/portfolios/move_funds',
|
|
218
225
|
'brokerage/convert/quote',
|
|
219
226
|
'brokerage/convert/trade/{trade_id}',
|
|
227
|
+
'brokerage/cfm/sweeps/schedule',
|
|
228
|
+
'brokerage/intx/allocate',
|
|
220
229
|
],
|
|
221
230
|
'put': [
|
|
222
231
|
'brokerage/portfolios/{portfolio_uuid}',
|
|
223
232
|
],
|
|
224
233
|
'delete': [
|
|
225
234
|
'brokerage/portfolios/{portfolio_uuid}',
|
|
235
|
+
'brokerage/cfm/sweeps',
|
|
226
236
|
],
|
|
227
237
|
},
|
|
228
238
|
},
|
|
@@ -1364,7 +1374,11 @@ export default class coinbase extends Exchange {
|
|
|
1364
1374
|
async fetchTickersV3(symbols = undefined, params = {}) {
|
|
1365
1375
|
await this.loadMarkets();
|
|
1366
1376
|
symbols = this.marketSymbols(symbols);
|
|
1367
|
-
const
|
|
1377
|
+
const request = {};
|
|
1378
|
+
if (symbols !== undefined) {
|
|
1379
|
+
request['product_ids'] = this.marketIds(symbols);
|
|
1380
|
+
}
|
|
1381
|
+
const response = await this.v3PrivateGetBrokerageProducts(this.extend(request, params));
|
|
1368
1382
|
//
|
|
1369
1383
|
// {
|
|
1370
1384
|
// "products": [
|
|
@@ -1682,7 +1696,7 @@ export default class coinbase extends Exchange {
|
|
|
1682
1696
|
'limit': 250,
|
|
1683
1697
|
};
|
|
1684
1698
|
let response = undefined;
|
|
1685
|
-
const isV3 = this.
|
|
1699
|
+
const isV3 = this.safeBool(params, 'v3', false);
|
|
1686
1700
|
params = this.omit(params, 'v3');
|
|
1687
1701
|
const method = this.safeString(this.options, 'fetchBalance', 'v3PrivateGetBrokerageAccounts');
|
|
1688
1702
|
if ((isV3) || (method === 'v3PrivateGetBrokerageAccounts')) {
|
|
@@ -3198,8 +3212,11 @@ export default class coinbase extends Exchange {
|
|
|
3198
3212
|
*/
|
|
3199
3213
|
await this.loadMarkets();
|
|
3200
3214
|
symbols = this.marketSymbols(symbols);
|
|
3201
|
-
|
|
3202
|
-
|
|
3215
|
+
const request = {};
|
|
3216
|
+
if (symbols !== undefined) {
|
|
3217
|
+
request['product_ids'] = this.marketIds(symbols);
|
|
3218
|
+
}
|
|
3219
|
+
const response = await this.v3PrivateGetBrokerageBestBidAsk(this.extend(request, params));
|
|
3203
3220
|
//
|
|
3204
3221
|
// {
|
|
3205
3222
|
// "pricebooks": [
|
|
@@ -3328,7 +3345,7 @@ export default class coinbase extends Exchange {
|
|
|
3328
3345
|
const savedPath = fullPath;
|
|
3329
3346
|
if (method === 'GET') {
|
|
3330
3347
|
if (Object.keys(query).length) {
|
|
3331
|
-
fullPath += '?' + this.
|
|
3348
|
+
fullPath += '?' + this.urlencodeWithArrayRepeat(query);
|
|
3332
3349
|
}
|
|
3333
3350
|
}
|
|
3334
3351
|
const url = this.urls['api']['rest'] + fullPath;
|
package/js/src/coincheck.js
CHANGED
|
@@ -832,7 +832,7 @@ export default class coincheck extends Exchange {
|
|
|
832
832
|
// {"success":false,"error":"disabled API Key"}'
|
|
833
833
|
// {"success":false,"error":"invalid authentication"}
|
|
834
834
|
//
|
|
835
|
-
const success = this.
|
|
835
|
+
const success = this.safeBool(response, 'success', true);
|
|
836
836
|
if (!success) {
|
|
837
837
|
const error = this.safeString(response, 'error');
|
|
838
838
|
const feedback = this.id + ' ' + this.json(response);
|
package/js/src/coinex.js
CHANGED
|
@@ -3327,7 +3327,7 @@ export default class coinex extends Exchange {
|
|
|
3327
3327
|
const data = this.safeValue(response, 'data', {});
|
|
3328
3328
|
const depositAddress = this.parseDepositAddress(data, currency);
|
|
3329
3329
|
const options = this.safeValue(this.options, 'fetchDepositAddress', {});
|
|
3330
|
-
const fillResponseFromRequest = this.
|
|
3330
|
+
const fillResponseFromRequest = this.safeBool(options, 'fillResponseFromRequest', true);
|
|
3331
3331
|
if (fillResponseFromRequest) {
|
|
3332
3332
|
depositAddress['network'] = this.safeNetworkCode(network, currency);
|
|
3333
3333
|
}
|
|
@@ -5354,7 +5354,7 @@ export default class coinex extends Exchange {
|
|
|
5354
5354
|
* @returns {Array} the marginMode in lowercase
|
|
5355
5355
|
*/
|
|
5356
5356
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
5357
|
-
const isMargin = this.
|
|
5357
|
+
const isMargin = this.safeBool(params, 'margin', false);
|
|
5358
5358
|
let marginMode = undefined;
|
|
5359
5359
|
[marginMode, params] = super.handleMarginModeAndParams(methodName, params, defaultValue);
|
|
5360
5360
|
if (marginMode === undefined) {
|
package/js/src/coinlist.js
CHANGED
|
@@ -364,7 +364,7 @@ export default class coinlist extends Exchange {
|
|
|
364
364
|
const currency = currencies[i];
|
|
365
365
|
const id = this.safeString(currency, 'asset');
|
|
366
366
|
const code = this.safeCurrencyCode(id);
|
|
367
|
-
const isTransferable = this.
|
|
367
|
+
const isTransferable = this.safeBool(currency, 'is_transferable', false);
|
|
368
368
|
const withdrawEnabled = isTransferable;
|
|
369
369
|
const depositEnabled = isTransferable;
|
|
370
370
|
const active = isTransferable;
|
package/js/src/coinmate.js
CHANGED
|
@@ -544,7 +544,7 @@ export default class coinmate extends Exchange {
|
|
|
544
544
|
//
|
|
545
545
|
const data = this.safeValue(response, 'data');
|
|
546
546
|
const transaction = this.parseTransaction(data, currency);
|
|
547
|
-
const fillResponseFromRequest = this.
|
|
547
|
+
const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
|
|
548
548
|
if (fillResponseFromRequest) {
|
|
549
549
|
transaction['amount'] = amount;
|
|
550
550
|
transaction['currency'] = code;
|
package/js/src/coinmetro.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export default class coinmetro extends Exchange {
|
|
|
45
45
|
after: number;
|
|
46
46
|
status: string;
|
|
47
47
|
fee: any;
|
|
48
|
-
info: any
|
|
48
|
+
info: import("./base/types.js").Dictionary<any>;
|
|
49
49
|
};
|
|
50
50
|
parseLedgerEntryDescription(description: any): any[];
|
|
51
51
|
parseLedgerEntryType(type: any): string;
|
package/js/src/coinmetro.js
CHANGED
|
@@ -380,7 +380,7 @@ export default class coinmetro extends Exchange {
|
|
|
380
380
|
const quote = this.safeCurrencyCode(quoteId);
|
|
381
381
|
const basePrecisionAndLimits = this.parseMarketPrecisionAndLimits(baseId);
|
|
382
382
|
const quotePrecisionAndLimits = this.parseMarketPrecisionAndLimits(quoteId);
|
|
383
|
-
const margin = this.
|
|
383
|
+
const margin = this.safeBool(market, 'margin', false);
|
|
384
384
|
const tradingFees = this.safeValue(this.fees, 'trading', {});
|
|
385
385
|
return this.safeMarketStructure({
|
|
386
386
|
'id': id,
|
|
@@ -1339,7 +1339,7 @@ export default class coinmetro extends Exchange {
|
|
|
1339
1339
|
};
|
|
1340
1340
|
const marginMode = undefined;
|
|
1341
1341
|
[params, params] = this.handleMarginModeAndParams('cancelOrder', params);
|
|
1342
|
-
const isMargin = this.
|
|
1342
|
+
const isMargin = this.safeBool(params, 'margin', false);
|
|
1343
1343
|
params = this.omit(params, 'margin');
|
|
1344
1344
|
let response = undefined;
|
|
1345
1345
|
if (isMargin || (marginMode !== undefined)) {
|
package/js/src/coinsph.js
CHANGED
|
@@ -1562,7 +1562,7 @@ export default class coinsph extends Exchange {
|
|
|
1562
1562
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
|
|
1563
1563
|
*/
|
|
1564
1564
|
const options = this.safeValue(this.options, 'withdraw');
|
|
1565
|
-
const warning = this.
|
|
1565
|
+
const warning = this.safeBool(options, 'warning', true);
|
|
1566
1566
|
if (warning) {
|
|
1567
1567
|
throw new InvalidAddress(this.id + " withdraw() makes a withdrawals only to coins_ph account, add .options['withdraw']['warning'] = false to make a withdrawal to your coins_ph account");
|
|
1568
1568
|
}
|
package/js/src/cryptocom.js
CHANGED
|
@@ -1057,7 +1057,7 @@ export default class cryptocom extends Exchange {
|
|
|
1057
1057
|
request['time_in_force'] = timeInForce;
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
const postOnly = this.
|
|
1060
|
+
const postOnly = this.safeBool(params, 'postOnly', false);
|
|
1061
1061
|
if ((postOnly) || (timeInForce === 'PO')) {
|
|
1062
1062
|
request['exec_inst'] = ['POST_ONLY'];
|
|
1063
1063
|
request['time_in_force'] = 'GOOD_TILL_CANCEL';
|
|
@@ -1278,7 +1278,7 @@ export default class cryptocom extends Exchange {
|
|
|
1278
1278
|
request['time_in_force'] = timeInForce;
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
const postOnly = this.
|
|
1281
|
+
const postOnly = this.safeBool(params, 'postOnly', false);
|
|
1282
1282
|
if ((postOnly) || (timeInForce === 'PO')) {
|
|
1283
1283
|
request['exec_inst'] = ['POST_ONLY'];
|
|
1284
1284
|
request['time_in_force'] = 'GOOD_TILL_CANCEL';
|
|
@@ -2249,7 +2249,7 @@ export default class cryptocom extends Exchange {
|
|
|
2249
2249
|
* @returns {Array} the marginMode in lowercase
|
|
2250
2250
|
*/
|
|
2251
2251
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
2252
|
-
const isMargin = this.
|
|
2252
|
+
const isMargin = this.safeBool(params, 'margin', false);
|
|
2253
2253
|
params = this.omit(params, 'margin');
|
|
2254
2254
|
let marginMode = undefined;
|
|
2255
2255
|
[marginMode, params] = this.handleMarginModeAndParams(methodName, params);
|
package/js/src/deribit.js
CHANGED
|
@@ -1346,6 +1346,7 @@ export default class deribit extends Exchange {
|
|
|
1346
1346
|
request['end_timestamp'] = now;
|
|
1347
1347
|
}
|
|
1348
1348
|
else {
|
|
1349
|
+
since = Math.max(since - 1, 0);
|
|
1349
1350
|
request['start_timestamp'] = since;
|
|
1350
1351
|
if (limit === undefined) {
|
|
1351
1352
|
request['end_timestamp'] = now;
|
package/js/src/digifinex.js
CHANGED
|
@@ -1162,9 +1162,11 @@ export default class digifinex extends Exchange {
|
|
|
1162
1162
|
// "timestamp": 1663221614998
|
|
1163
1163
|
// }
|
|
1164
1164
|
//
|
|
1165
|
+
const indexPrice = this.safeNumber(ticker, 'index_price');
|
|
1166
|
+
const marketType = (indexPrice !== undefined) ? 'contract' : 'spot';
|
|
1165
1167
|
const marketId = this.safeStringUpper2(ticker, 'symbol', 'instrument_id');
|
|
1166
|
-
const symbol = this.safeSymbol(marketId, market);
|
|
1167
|
-
market = this.safeMarket(marketId);
|
|
1168
|
+
const symbol = this.safeSymbol(marketId, market, undefined, marketType);
|
|
1169
|
+
market = this.safeMarket(marketId, market, undefined, marketType);
|
|
1168
1170
|
let timestamp = this.safeTimestamp(ticker, 'date');
|
|
1169
1171
|
if (market['swap']) {
|
|
1170
1172
|
timestamp = this.safeInteger(ticker, 'timestamp');
|
|
@@ -1751,7 +1753,7 @@ export default class digifinex extends Exchange {
|
|
|
1751
1753
|
let postOnly = this.isPostOnly(isMarketOrder, false, params);
|
|
1752
1754
|
let postOnlyParsed = undefined;
|
|
1753
1755
|
if (swap) {
|
|
1754
|
-
const reduceOnly = this.
|
|
1756
|
+
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
1755
1757
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
1756
1758
|
let orderType = undefined;
|
|
1757
1759
|
if (side === 'buy') {
|
|
@@ -3951,7 +3953,7 @@ export default class digifinex extends Exchange {
|
|
|
3951
3953
|
* @returns {Array} the marginMode in lowercase
|
|
3952
3954
|
*/
|
|
3953
3955
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
3954
|
-
const isMargin = this.
|
|
3956
|
+
const isMargin = this.safeBool(params, 'margin', false);
|
|
3955
3957
|
let marginMode = undefined;
|
|
3956
3958
|
[marginMode, params] = super.handleMarginModeAndParams(methodName, params, defaultValue);
|
|
3957
3959
|
if (marginMode !== undefined) {
|
package/js/src/exmo.js
CHANGED
|
@@ -252,7 +252,7 @@ export default class exmo extends Exchange {
|
|
|
252
252
|
//
|
|
253
253
|
const margin = this.parseMarginModification(response, market);
|
|
254
254
|
const options = this.safeValue(this.options, 'margin', {});
|
|
255
|
-
const fillResponseFromRequest = this.
|
|
255
|
+
const fillResponseFromRequest = this.safeBool(options, 'fillResponseFromRequest', true);
|
|
256
256
|
if (fillResponseFromRequest) {
|
|
257
257
|
margin['type'] = type;
|
|
258
258
|
margin['amount'] = amount;
|
|
@@ -2616,7 +2616,7 @@ export default class exmo extends Exchange {
|
|
|
2616
2616
|
// {"result":false,"error":"Error 50052: Insufficient funds"}
|
|
2617
2617
|
// {"s":"error","errmsg":"strconv.ParseInt: parsing \"\": invalid syntax"}
|
|
2618
2618
|
//
|
|
2619
|
-
let success = this.
|
|
2619
|
+
let success = this.safeBool(response, 'result', false);
|
|
2620
2620
|
if (typeof success === 'string') {
|
|
2621
2621
|
if ((success === 'true') || (success === '1')) {
|
|
2622
2622
|
success = true;
|
package/js/src/gate.js
CHANGED
|
@@ -1592,9 +1592,9 @@ export default class gate extends Exchange {
|
|
|
1592
1592
|
const networkId = this.safeString(entry, 'chain');
|
|
1593
1593
|
const networkCode = this.networkIdToCode(networkId, code);
|
|
1594
1594
|
const delisted = this.safeValue(entry, 'delisted');
|
|
1595
|
-
const withdrawDisabled = this.
|
|
1596
|
-
const depositDisabled = this.
|
|
1597
|
-
const tradeDisabled = this.
|
|
1595
|
+
const withdrawDisabled = this.safeBool(entry, 'withdraw_disabled', false);
|
|
1596
|
+
const depositDisabled = this.safeBool(entry, 'deposit_disabled', false);
|
|
1597
|
+
const tradeDisabled = this.safeBool(entry, 'trade_disabled', false);
|
|
1598
1598
|
const withdrawEnabled = !withdrawDisabled;
|
|
1599
1599
|
const depositEnabled = !depositDisabled;
|
|
1600
1600
|
const tradeEnabled = !tradeDisabled;
|
|
@@ -4051,7 +4051,7 @@ export default class gate extends Exchange {
|
|
|
4051
4051
|
}
|
|
4052
4052
|
}
|
|
4053
4053
|
let clientOrderId = this.safeString2(params, 'text', 'clientOrderId');
|
|
4054
|
-
const textIsRequired = this.
|
|
4054
|
+
const textIsRequired = this.safeBool(params, 'textIsRequired', false);
|
|
4055
4055
|
if (clientOrderId !== undefined) {
|
|
4056
4056
|
// user-defined, must follow the rules if not empty
|
|
4057
4057
|
// prefixed with t-
|
|
@@ -4423,7 +4423,7 @@ export default class gate extends Exchange {
|
|
|
4423
4423
|
// "message": "Not enough balance"
|
|
4424
4424
|
// }
|
|
4425
4425
|
//
|
|
4426
|
-
const succeeded = this.
|
|
4426
|
+
const succeeded = this.safeBool(order, 'succeeded', true);
|
|
4427
4427
|
if (!succeeded) {
|
|
4428
4428
|
// cancelOrders response
|
|
4429
4429
|
return this.safeOrder({
|
package/js/src/gemini.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export default class gemini extends Exchange {
|
|
|
10
10
|
fetchCurrenciesFromWeb(params?: {}): Promise<{}>;
|
|
11
11
|
fetchMarkets(params?: {}): Promise<any>;
|
|
12
12
|
fetchMarketsFromWeb(params?: {}): Promise<any[]>;
|
|
13
|
-
parseMarketActive(status: any):
|
|
13
|
+
parseMarketActive(status: any): boolean;
|
|
14
14
|
fetchUSDTMarkets(params?: {}): Promise<any[]>;
|
|
15
15
|
fetchMarketsFromAPI(params?: {}): Promise<unknown[]>;
|
|
16
16
|
parseMarket(response: any): Market;
|
package/js/src/gemini.js
CHANGED
|
@@ -515,7 +515,7 @@ export default class gemini extends Exchange {
|
|
|
515
515
|
'post_only': true,
|
|
516
516
|
'limit_only': true,
|
|
517
517
|
};
|
|
518
|
-
return this.
|
|
518
|
+
return this.safeBool(statuses, status, true);
|
|
519
519
|
}
|
|
520
520
|
async fetchUSDTMarkets(params = {}) {
|
|
521
521
|
// these markets can't be scrapped and fetchMarketsFrom api does an extra call
|
|
@@ -554,7 +554,7 @@ export default class gemini extends Exchange {
|
|
|
554
554
|
result[marketId] = this.parseMarket(market);
|
|
555
555
|
}
|
|
556
556
|
const options = this.safeValue(this.options, 'fetchMarketsFromAPI', {});
|
|
557
|
-
const fetchDetailsForAllSymbols = this.
|
|
557
|
+
const fetchDetailsForAllSymbols = this.safeBool(options, 'fetchDetailsForAllSymbols', false);
|
|
558
558
|
const fetchDetailsForMarketIds = this.safeValue(options, 'fetchDetailsForMarketIds', []);
|
|
559
559
|
let promises = [];
|
|
560
560
|
let marketIds = [];
|
|
@@ -1371,7 +1371,7 @@ export default class gemini extends Exchange {
|
|
|
1371
1371
|
request['options'] = ['maker-or-cancel'];
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
|
-
const postOnly = this.
|
|
1374
|
+
const postOnly = this.safeBool(params, 'postOnly', false);
|
|
1375
1375
|
params = this.omit(params, 'postOnly');
|
|
1376
1376
|
if (postOnly) {
|
|
1377
1377
|
request['options'] = ['maker-or-cancel'];
|
package/js/src/hitbtc.js
CHANGED
|
@@ -693,7 +693,7 @@ export default class hitbtc extends Exchange {
|
|
|
693
693
|
const expiry = this.safeInteger(market, 'expiry');
|
|
694
694
|
const contract = (marketType === 'futures');
|
|
695
695
|
const spot = (marketType === 'spot');
|
|
696
|
-
const marginTrading = this.
|
|
696
|
+
const marginTrading = this.safeBool(market, 'margin_trading', false);
|
|
697
697
|
const margin = spot && marginTrading;
|
|
698
698
|
const future = (expiry !== undefined);
|
|
699
699
|
const swap = (contract && !future);
|
|
@@ -828,9 +828,9 @@ export default class hitbtc extends Exchange {
|
|
|
828
828
|
const entry = response[currencyId];
|
|
829
829
|
const name = this.safeString(entry, 'full_name');
|
|
830
830
|
const precision = this.safeNumber(entry, 'precision_transfer');
|
|
831
|
-
const payinEnabled = this.
|
|
832
|
-
const payoutEnabled = this.
|
|
833
|
-
const transferEnabled = this.
|
|
831
|
+
const payinEnabled = this.safeBool(entry, 'payin_enabled', false);
|
|
832
|
+
const payoutEnabled = this.safeBool(entry, 'payout_enabled', false);
|
|
833
|
+
const transferEnabled = this.safeBool(entry, 'transfer_enabled', false);
|
|
834
834
|
const active = payinEnabled && payoutEnabled && transferEnabled;
|
|
835
835
|
const rawNetworks = this.safeValue(entry, 'networks', []);
|
|
836
836
|
const networks = {};
|
|
@@ -843,8 +843,8 @@ export default class hitbtc extends Exchange {
|
|
|
843
843
|
const network = this.safeNetwork(networkId);
|
|
844
844
|
fee = this.safeNumber(rawNetwork, 'payout_fee');
|
|
845
845
|
const networkPrecision = this.safeNumber(rawNetwork, 'precision_payout');
|
|
846
|
-
const payinEnabledNetwork = this.
|
|
847
|
-
const payoutEnabledNetwork = this.
|
|
846
|
+
const payinEnabledNetwork = this.safeBool(entry, 'payin_enabled', false);
|
|
847
|
+
const payoutEnabledNetwork = this.safeBool(entry, 'payout_enabled', false);
|
|
848
848
|
const activeNetwork = payinEnabledNetwork && payoutEnabledNetwork;
|
|
849
849
|
if (payinEnabledNetwork && !depositEnabled) {
|
|
850
850
|
depositEnabled = true;
|
|
@@ -2708,7 +2708,7 @@ export default class hitbtc extends Exchange {
|
|
|
2708
2708
|
params = this.omit(params, 'network');
|
|
2709
2709
|
}
|
|
2710
2710
|
const withdrawOptions = this.safeValue(this.options, 'withdraw', {});
|
|
2711
|
-
const includeFee = this.
|
|
2711
|
+
const includeFee = this.safeBool(withdrawOptions, 'includeFee', false);
|
|
2712
2712
|
if (includeFee) {
|
|
2713
2713
|
request['include_fee'] = true;
|
|
2714
2714
|
}
|
|
@@ -3230,7 +3230,7 @@ export default class hitbtc extends Exchange {
|
|
|
3230
3230
|
await this.loadMarkets();
|
|
3231
3231
|
const market = this.market(symbol);
|
|
3232
3232
|
const leverage = this.safeString(params, 'leverage');
|
|
3233
|
-
if (market['
|
|
3233
|
+
if (market['swap']) {
|
|
3234
3234
|
if (leverage === undefined) {
|
|
3235
3235
|
throw new ArgumentsRequired(this.id + ' modifyMarginHelper() requires a leverage parameter for swap markets');
|
|
3236
3236
|
}
|
|
@@ -3254,21 +3254,15 @@ export default class hitbtc extends Exchange {
|
|
|
3254
3254
|
let marginMode = undefined;
|
|
3255
3255
|
[marketType, params] = this.handleMarketTypeAndParams('modifyMarginHelper', market, params);
|
|
3256
3256
|
[marginMode, params] = this.handleMarginModeAndParams('modifyMarginHelper', params);
|
|
3257
|
-
params = this.omit(params, ['marginMode', 'margin']);
|
|
3258
3257
|
let response = undefined;
|
|
3259
|
-
if (
|
|
3258
|
+
if (marketType === 'swap') {
|
|
3259
|
+
response = await this.privatePutFuturesAccountIsolatedSymbol(this.extend(request, params));
|
|
3260
|
+
}
|
|
3261
|
+
else if ((marketType === 'margin') || (marketType === 'spot') || (marginMode === 'isolated')) {
|
|
3260
3262
|
response = await this.privatePutMarginAccountIsolatedSymbol(this.extend(request, params));
|
|
3261
3263
|
}
|
|
3262
3264
|
else {
|
|
3263
|
-
|
|
3264
|
-
response = await this.privatePutFuturesAccountIsolatedSymbol(this.extend(request, params));
|
|
3265
|
-
}
|
|
3266
|
-
else if (marketType === 'margin') {
|
|
3267
|
-
response = await this.privatePutMarginAccountIsolatedSymbol(this.extend(request, params));
|
|
3268
|
-
}
|
|
3269
|
-
else {
|
|
3270
|
-
throw new NotSupported(this.id + ' modifyMarginHelper() not support this market type');
|
|
3271
|
-
}
|
|
3265
|
+
throw new NotSupported(this.id + ' modifyMarginHelper() not support this market type');
|
|
3272
3266
|
}
|
|
3273
3267
|
//
|
|
3274
3268
|
// {
|
|
@@ -3580,7 +3574,7 @@ export default class hitbtc extends Exchange {
|
|
|
3580
3574
|
* @returns {Array} the marginMode in lowercase
|
|
3581
3575
|
*/
|
|
3582
3576
|
const defaultType = this.safeString(this.options, 'defaultType');
|
|
3583
|
-
const isMargin = this.
|
|
3577
|
+
const isMargin = this.safeBool(params, 'margin', false);
|
|
3584
3578
|
let marginMode = undefined;
|
|
3585
3579
|
[marginMode, params] = super.handleMarginModeAndParams(methodName, params, defaultValue);
|
|
3586
3580
|
if (marginMode === undefined) {
|