ccxt 4.4.62 → 4.4.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +10 -4
- package/dist/cjs/src/binance.js +4 -4
- package/dist/cjs/src/bingx.js +1 -1
- package/dist/cjs/src/bitmart.js +145 -54
- package/dist/cjs/src/bybit.js +5 -5
- package/dist/cjs/src/gate.js +109 -155
- package/dist/cjs/src/phemex.js +18 -12
- package/dist/cjs/src/pro/bitmart.js +67 -55
- package/dist/cjs/src/pro/bitopro.js +1 -1
- package/dist/cjs/src/pro/gate.js +5 -0
- package/dist/cjs/src/pro/vertex.js +5 -0
- package/dist/cjs/src/tradeogre.js +3 -3
- package/dist/cjs/src/whitebit.js +2 -4
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- 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/bitmart.d.ts +4 -0
- package/js/src/base/Exchange.js +10 -4
- package/js/src/binance.js +4 -4
- package/js/src/bingx.js +1 -1
- package/js/src/bitmart.d.ts +36 -34
- package/js/src/bitmart.js +145 -54
- package/js/src/bybit.js +5 -5
- package/js/src/gate.d.ts +16 -0
- package/js/src/gate.js +110 -156
- package/js/src/phemex.js +18 -12
- package/js/src/pro/bitmart.js +67 -55
- package/js/src/pro/bitopro.js +1 -1
- package/js/src/pro/gate.js +5 -0
- package/js/src/pro/vertex.js +5 -0
- package/js/src/tradeogre.js +3 -3
- package/js/src/whitebit.js +2 -4
- package/package.json +1 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -199,7 +199,7 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
199
199
|
|
|
200
200
|
//-----------------------------------------------------------------------------
|
|
201
201
|
// this is updated by vss.js when building
|
|
202
|
-
const version = '4.4.
|
|
202
|
+
const version = '4.4.64';
|
|
203
203
|
Exchange["default"].ccxtVersion = version;
|
|
204
204
|
const exchanges = {
|
|
205
205
|
'ace': ace,
|
|
@@ -2513,6 +2513,9 @@ class Exchange {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
safeCurrencyStructure(currency) {
|
|
2515
2515
|
// derive data from networks: deposit, withdraw, active, fee, limits, precision
|
|
2516
|
+
const currencyDeposit = this.safeBool(currency, 'deposit');
|
|
2517
|
+
const currencyWithdraw = this.safeBool(currency, 'withdraw');
|
|
2518
|
+
const currencyActive = this.safeBool(currency, 'active');
|
|
2516
2519
|
const networks = this.safeDict(currency, 'networks', {});
|
|
2517
2520
|
const keys = Object.keys(networks);
|
|
2518
2521
|
const length = keys.length;
|
|
@@ -2520,15 +2523,15 @@ class Exchange {
|
|
|
2520
2523
|
for (let i = 0; i < length; i++) {
|
|
2521
2524
|
const network = networks[keys[i]];
|
|
2522
2525
|
const deposit = this.safeBool(network, 'deposit');
|
|
2523
|
-
if (
|
|
2526
|
+
if (currencyDeposit === undefined || deposit) {
|
|
2524
2527
|
currency['deposit'] = deposit;
|
|
2525
2528
|
}
|
|
2526
2529
|
const withdraw = this.safeBool(network, 'withdraw');
|
|
2527
|
-
if (
|
|
2530
|
+
if (currencyWithdraw === undefined || withdraw) {
|
|
2528
2531
|
currency['withdraw'] = withdraw;
|
|
2529
2532
|
}
|
|
2530
2533
|
const active = this.safeBool(network, 'active');
|
|
2531
|
-
if (
|
|
2534
|
+
if (currencyActive === undefined || active) {
|
|
2532
2535
|
currency['active'] = active;
|
|
2533
2536
|
}
|
|
2534
2537
|
// find lowest fee (which is more desired)
|
|
@@ -3896,7 +3899,10 @@ class Exchange {
|
|
|
3896
3899
|
// if networkCode was not provided by user, then we try to use the default network (if it was defined in "defaultNetworks"), otherwise, we just return the first network entry
|
|
3897
3900
|
const defaultNetworkCode = this.defaultNetworkCode(currencyCode);
|
|
3898
3901
|
const defaultNetworkId = isIndexedByUnifiedNetworkCode ? defaultNetworkCode : this.networkCodeToId(defaultNetworkCode, currencyCode);
|
|
3899
|
-
|
|
3902
|
+
if (defaultNetworkId in indexedNetworkEntries) {
|
|
3903
|
+
return defaultNetworkId;
|
|
3904
|
+
}
|
|
3905
|
+
throw new errors.NotSupported(this.id + ' - can not determine the default network, please pass param["network"] one from : ' + availableNetworkIds.join(', '));
|
|
3900
3906
|
}
|
|
3901
3907
|
}
|
|
3902
3908
|
return chosenNetworkId;
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -480,6 +480,7 @@ class binance extends binance$1 {
|
|
|
480
480
|
'portfolio/margin-asset-leverage': 5,
|
|
481
481
|
'portfolio/balance': 2,
|
|
482
482
|
'portfolio/negative-balance-exchange-record': 2,
|
|
483
|
+
'portfolio/pmloan-history': 5,
|
|
483
484
|
// staking
|
|
484
485
|
'staking/productList': 0.1,
|
|
485
486
|
'staking/position': 0.1,
|
|
@@ -6394,11 +6395,10 @@ class binance extends binance$1 {
|
|
|
6394
6395
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
|
6395
6396
|
await this.loadMarkets();
|
|
6396
6397
|
const market = this.market(symbol);
|
|
6398
|
+
// don't handle/omit params here, omitting happens inside createOrderRequest
|
|
6397
6399
|
const marketType = this.safeString(params, 'type', market['type']);
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
let isPortfolioMargin = undefined;
|
|
6401
|
-
[isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'createOrder', 'papi', 'portfolioMargin', false);
|
|
6400
|
+
const marginMode = this.safeString(params, 'marginMode');
|
|
6401
|
+
const isPortfolioMargin = this.safeBool2(params, 'papi', 'portfolioMargin', false);
|
|
6402
6402
|
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
6403
6403
|
const stopLossPrice = this.safeString(params, 'stopLossPrice');
|
|
6404
6404
|
const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
|
package/dist/cjs/src/bingx.js
CHANGED
|
@@ -4686,7 +4686,7 @@ class bingx extends bingx$1 {
|
|
|
4686
4686
|
}
|
|
4687
4687
|
else if (type === 'spot') {
|
|
4688
4688
|
if (limit !== undefined) {
|
|
4689
|
-
request['
|
|
4689
|
+
request['pageSize'] = limit;
|
|
4690
4690
|
}
|
|
4691
4691
|
response = await this.spotV1PrivateGetTradeHistoryOrders(this.extend(request, params));
|
|
4692
4692
|
//
|