ccxt 4.3.38 → 4.3.40

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/dist/cjs/ccxt.js CHANGED
@@ -185,7 +185,7 @@ var woofipro$1 = require('./src/pro/woofipro.js');
185
185
 
186
186
  //-----------------------------------------------------------------------------
187
187
  // this is updated by vss.js when building
188
- const version = '4.3.38';
188
+ const version = '4.3.40';
189
189
  Exchange["default"].ccxtVersion = version;
190
190
  const exchanges = {
191
191
  'ace': ace,
@@ -1224,6 +1224,7 @@ class binance extends binance$1 {
1224
1224
  'future': 'UMFUTURE',
1225
1225
  'delivery': 'CMFUTURE',
1226
1226
  'linear': 'UMFUTURE',
1227
+ 'swap': 'UMFUTURE',
1227
1228
  'inverse': 'CMFUTURE',
1228
1229
  'option': 'OPTION',
1229
1230
  },
@@ -2285,17 +2285,20 @@ class coinlist extends coinlist$1 {
2285
2285
  const request = this.omit(params, this.extractParams(path));
2286
2286
  const endpoint = '/' + this.implodeParams(path, params);
2287
2287
  let url = this.urls['api'][api] + endpoint;
2288
- const query = this.urlencode(request);
2288
+ const isBulk = Array.isArray(params);
2289
+ let query = undefined;
2290
+ if (!isBulk) {
2291
+ query = this.urlencode(request);
2292
+ }
2289
2293
  if (api === 'private') {
2290
2294
  this.checkRequiredCredentials();
2291
2295
  const timestamp = this.seconds().toString();
2292
2296
  let auth = timestamp + method + endpoint;
2293
- const isBulk = Array.isArray(params);
2294
2297
  if ((method === 'POST') || (method === 'PATCH') || isBulk) {
2295
2298
  body = this.json(request);
2296
2299
  auth += body;
2297
2300
  }
2298
- else if (query.length !== 0) {
2301
+ else if (query !== undefined && query.length !== 0) {
2299
2302
  auth += '?' + query;
2300
2303
  url += '?' + query;
2301
2304
  }
@@ -2307,7 +2310,7 @@ class coinlist extends coinlist$1 {
2307
2310
  'Content-Type': 'application/json',
2308
2311
  };
2309
2312
  }
2310
- else if (query.length !== 0) {
2313
+ else if (query !== undefined && query.length !== 0) {
2311
2314
  url += '?' + query;
2312
2315
  }
2313
2316
  return { 'url': url, 'method': method, 'body': body, 'headers': headers };
@@ -852,8 +852,8 @@ class hitbtc extends hitbtc$1 {
852
852
  const network = this.safeNetwork(networkId);
853
853
  fee = this.safeNumber(rawNetwork, 'payout_fee');
854
854
  const networkPrecision = this.safeNumber(rawNetwork, 'precision_payout');
855
- const payinEnabledNetwork = this.safeBool(entry, 'payin_enabled', false);
856
- const payoutEnabledNetwork = this.safeBool(entry, 'payout_enabled', false);
855
+ const payinEnabledNetwork = this.safeBool(rawNetwork, 'payin_enabled', false);
856
+ const payoutEnabledNetwork = this.safeBool(rawNetwork, 'payout_enabled', false);
857
857
  const activeNetwork = payinEnabledNetwork && payoutEnabledNetwork;
858
858
  if (payinEnabledNetwork && !depositEnabled) {
859
859
  depositEnabled = true;
@@ -147,7 +147,7 @@ class mexc extends mexc$1 {
147
147
  'fees': [
148
148
  'https://www.mexc.com/fee',
149
149
  ],
150
- 'referral': 'https://m.mexc.com/auth/signup?inviteCode=1FQ1G',
150
+ 'referral': 'https://www.mexc.com/register?inviteCode=mexc-1FQ1GNu1',
151
151
  },
152
152
  'api': {
153
153
  'spot': {
@@ -1647,7 +1647,9 @@ class woofipro extends woofipro$1 {
1647
1647
  // }
1648
1648
  // }
1649
1649
  //
1650
- return response;
1650
+ return [this.safeOrder({
1651
+ 'info': response,
1652
+ })];
1651
1653
  }
1652
1654
  async cancelAllOrders(symbol = undefined, params = {}) {
1653
1655
  /**
@@ -1691,7 +1693,11 @@ class woofipro extends woofipro$1 {
1691
1693
  // }
1692
1694
  // }
1693
1695
  //
1694
- return response;
1696
+ return [
1697
+ {
1698
+ 'info': response,
1699
+ },
1700
+ ];
1695
1701
  }
1696
1702
  async fetchOrder(id, symbol = undefined, params = {}) {
1697
1703
  /**
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import type { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks, Leverage, Leverages, Option, OptionChain, Conversion } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
7
- declare const version = "4.3.37";
7
+ declare const version = "4.3.39";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, ProxyError, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.3.38';
41
+ const version = '4.3.40';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
package/js/src/binance.js CHANGED
@@ -1227,6 +1227,7 @@ export default class binance extends Exchange {
1227
1227
  'future': 'UMFUTURE',
1228
1228
  'delivery': 'CMFUTURE',
1229
1229
  'linear': 'UMFUTURE',
1230
+ 'swap': 'UMFUTURE',
1230
1231
  'inverse': 'CMFUTURE',
1231
1232
  'option': 'OPTION',
1232
1233
  },
@@ -2288,17 +2288,20 @@ export default class coinlist extends Exchange {
2288
2288
  const request = this.omit(params, this.extractParams(path));
2289
2289
  const endpoint = '/' + this.implodeParams(path, params);
2290
2290
  let url = this.urls['api'][api] + endpoint;
2291
- const query = this.urlencode(request);
2291
+ const isBulk = Array.isArray(params);
2292
+ let query = undefined;
2293
+ if (!isBulk) {
2294
+ query = this.urlencode(request);
2295
+ }
2292
2296
  if (api === 'private') {
2293
2297
  this.checkRequiredCredentials();
2294
2298
  const timestamp = this.seconds().toString();
2295
2299
  let auth = timestamp + method + endpoint;
2296
- const isBulk = Array.isArray(params);
2297
2300
  if ((method === 'POST') || (method === 'PATCH') || isBulk) {
2298
2301
  body = this.json(request);
2299
2302
  auth += body;
2300
2303
  }
2301
- else if (query.length !== 0) {
2304
+ else if (query !== undefined && query.length !== 0) {
2302
2305
  auth += '?' + query;
2303
2306
  url += '?' + query;
2304
2307
  }
@@ -2310,7 +2313,7 @@ export default class coinlist extends Exchange {
2310
2313
  'Content-Type': 'application/json',
2311
2314
  };
2312
2315
  }
2313
- else if (query.length !== 0) {
2316
+ else if (query !== undefined && query.length !== 0) {
2314
2317
  url += '?' + query;
2315
2318
  }
2316
2319
  return { 'url': url, 'method': method, 'body': body, 'headers': headers };
package/js/src/hitbtc.js CHANGED
@@ -855,8 +855,8 @@ export default class hitbtc extends Exchange {
855
855
  const network = this.safeNetwork(networkId);
856
856
  fee = this.safeNumber(rawNetwork, 'payout_fee');
857
857
  const networkPrecision = this.safeNumber(rawNetwork, 'precision_payout');
858
- const payinEnabledNetwork = this.safeBool(entry, 'payin_enabled', false);
859
- const payoutEnabledNetwork = this.safeBool(entry, 'payout_enabled', false);
858
+ const payinEnabledNetwork = this.safeBool(rawNetwork, 'payin_enabled', false);
859
+ const payoutEnabledNetwork = this.safeBool(rawNetwork, 'payout_enabled', false);
860
860
  const activeNetwork = payinEnabledNetwork && payoutEnabledNetwork;
861
861
  if (payinEnabledNetwork && !depositEnabled) {
862
862
  depositEnabled = true;
package/js/src/mexc.js CHANGED
@@ -150,7 +150,7 @@ export default class mexc extends Exchange {
150
150
  'fees': [
151
151
  'https://www.mexc.com/fee',
152
152
  ],
153
- 'referral': 'https://m.mexc.com/auth/signup?inviteCode=1FQ1G',
153
+ 'referral': 'https://www.mexc.com/register?inviteCode=mexc-1FQ1GNu1',
154
154
  },
155
155
  'api': {
156
156
  'spot': {
@@ -74,8 +74,10 @@ export default class woofipro extends Exchange {
74
74
  createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
75
75
  editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
76
76
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
77
- cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<any>;
78
- cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
77
+ cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
78
+ cancelAllOrders(symbol?: Str, params?: {}): Promise<{
79
+ info: any;
80
+ }[]>;
79
81
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
80
82
  fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
81
83
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
@@ -1650,7 +1650,9 @@ export default class woofipro extends Exchange {
1650
1650
  // }
1651
1651
  // }
1652
1652
  //
1653
- return response;
1653
+ return [this.safeOrder({
1654
+ 'info': response,
1655
+ })];
1654
1656
  }
1655
1657
  async cancelAllOrders(symbol = undefined, params = {}) {
1656
1658
  /**
@@ -1694,7 +1696,11 @@ export default class woofipro extends Exchange {
1694
1696
  // }
1695
1697
  // }
1696
1698
  //
1697
- return response;
1699
+ return [
1700
+ {
1701
+ 'info': response,
1702
+ },
1703
+ ];
1698
1704
  }
1699
1705
  async fetchOrder(id, symbol = undefined, params = {}) {
1700
1706
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.38",
3
+ "version": "4.3.40",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",