ccxt 4.2.42 → 4.2.44

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.
@@ -864,6 +864,7 @@ export default class krakenfutures extends Exchange {
864
864
  }
865
865
  createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
866
866
  const market = this.market(symbol);
867
+ symbol = market['symbol'];
867
868
  type = this.safeString(params, 'orderType', type);
868
869
  const timeInForce = this.safeString(params, 'timeInForce');
869
870
  let postOnly = false;
@@ -883,7 +884,7 @@ export default class krakenfutures extends Exchange {
883
884
  const request = {
884
885
  'symbol': market['id'],
885
886
  'side': side,
886
- 'size': amount,
887
+ 'size': this.amountToPrecision(symbol, amount),
887
888
  };
888
889
  const clientOrderId = this.safeString2(params, 'clientOrderId', 'cliOrdId');
889
890
  if (clientOrderId !== undefined) {
@@ -921,7 +922,7 @@ export default class krakenfutures extends Exchange {
921
922
  }
922
923
  request['orderType'] = type;
923
924
  if (price !== undefined) {
924
- request['limitPrice'] = price;
925
+ request['limitPrice'] = this.priceToPrecision(symbol, price);
925
926
  }
926
927
  params = this.omit(params, ['clientOrderId', 'timeInForce', 'triggerPrice', 'stopLossPrice', 'takeProfitPrice']);
927
928
  return this.extend(request, params);
package/js/src/kucoin.js CHANGED
@@ -3860,11 +3860,11 @@ export default class kucoin extends Exchange {
3860
3860
  }
3861
3861
  }
3862
3862
  let fee = undefined;
3863
- const feeCost = this.safeNumber(item, 'fee');
3863
+ const feeCost = this.safeString(item, 'fee');
3864
3864
  let feeCurrency = undefined;
3865
- if (feeCost !== 0) {
3865
+ if (feeCost !== '0') {
3866
3866
  feeCurrency = code;
3867
- fee = { 'cost': feeCost, 'currency': feeCurrency };
3867
+ fee = { 'cost': this.parseNumber(feeCost), 'currency': feeCurrency };
3868
3868
  }
3869
3869
  return {
3870
3870
  'id': id,
@@ -3978,8 +3978,12 @@ export default class kucoin extends Exchange {
3978
3978
  // }
3979
3979
  // }
3980
3980
  //
3981
- const data = this.safeValue(response, 'data');
3982
- const items = this.safeValue(data, 'items', data);
3981
+ const dataList = this.safeList(response, 'data');
3982
+ if (dataList !== undefined) {
3983
+ return this.parseLedger(dataList, currency, since, limit);
3984
+ }
3985
+ const data = this.safeDict(response, 'data');
3986
+ const items = this.safeList(data, 'items', []);
3983
3987
  return this.parseLedger(items, currency, since, limit);
3984
3988
  }
3985
3989
  calculateRateLimiterCost(api, method, path, params, config = {}) {
package/js/src/mexc.d.ts CHANGED
@@ -15,7 +15,6 @@ export default class mexc extends Exchange {
15
15
  }>;
16
16
  fetchTime(params?: {}): Promise<number>;
17
17
  fetchCurrencies(params?: {}): Promise<{}>;
18
- safeNetwork(networkId: any): string;
19
18
  fetchMarkets(params?: {}): Promise<any>;
20
19
  fetchSpotMarkets(params?: {}): Promise<any[]>;
21
20
  fetchSwapMarkets(params?: {}): Promise<any[]>;
@@ -108,17 +107,17 @@ export default class mexc extends Exchange {
108
107
  parseDepositAddress(depositAddress: any, currency?: Currency): {
109
108
  currency: string;
110
109
  address: string;
111
- tag: any;
110
+ tag: string;
112
111
  network: string;
113
112
  info: any;
114
113
  };
115
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<any[]>;
114
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
116
115
  createDepositAddress(code: string, params?: {}): Promise<{
117
- info: any;
118
116
  currency: string;
119
- network: string;
120
117
  address: string;
121
118
  tag: string;
119
+ network: string;
120
+ info: any;
122
121
  }>;
123
122
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
124
123
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;