ccxt 4.3.37 → 4.3.39

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/js/src/coinex.js CHANGED
@@ -1676,17 +1676,16 @@ export default class coinex extends Exchange {
1676
1676
  [marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
1677
1677
  let marginMode = undefined;
1678
1678
  [marginMode, params] = this.handleMarginModeAndParams('fetchBalance', params);
1679
- marketType = (marginMode !== undefined) ? 'margin' : marketType;
1680
- params = this.omit(params, 'margin');
1681
- if (marketType === 'margin') {
1682
- return await this.fetchMarginBalance(params);
1683
- }
1684
- else if (marketType === 'swap') {
1679
+ const isMargin = (marginMode !== undefined) || (marketType === 'margin');
1680
+ if (marketType === 'swap') {
1685
1681
  return await this.fetchSwapBalance(params);
1686
1682
  }
1687
1683
  else if (marketType === 'financial') {
1688
1684
  return await this.fetchFinancialBalance(params);
1689
1685
  }
1686
+ else if (isMargin) {
1687
+ return await this.fetchMarginBalance(params);
1688
+ }
1690
1689
  else {
1691
1690
  return await this.fetchSpotBalance(params);
1692
1691
  }
@@ -3233,7 +3232,11 @@ export default class coinex extends Exchange {
3233
3232
  // {"code":0,"data":{},"message":"OK"}
3234
3233
  //
3235
3234
  }
3236
- return response;
3235
+ return [
3236
+ this.safeOrder({
3237
+ 'info': response,
3238
+ }),
3239
+ ];
3237
3240
  }
3238
3241
  async fetchOrder(id, symbol = undefined, params = {}) {
3239
3242
  /**
@@ -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/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': {
package/js/src/okx.js CHANGED
@@ -258,6 +258,9 @@ export default class okx extends Exchange {
258
258
  'finance/staking-defi/eth/apy-history': 5 / 3,
259
259
  'finance/savings/lending-rate-summary': 5 / 3,
260
260
  'finance/savings/lending-rate-history': 5 / 3,
261
+ 'finance/fixed-loan/lending-offers': 10 / 3,
262
+ 'finance/fixed-loan/lending-apy-history': 10 / 3,
263
+ 'finance/fixed-loan/pending-lending-volume': 10 / 3,
261
264
  // public broker
262
265
  'finance/sfp/dcd/products': 2 / 3,
263
266
  // copytrading
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.37",
3
+ "version": "4.3.39",
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",