ccxt 4.0.97 → 4.0.98

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/bigone.js CHANGED
@@ -34,6 +34,7 @@ export default class bigone extends Exchange {
34
34
  'cancelAllOrders': true,
35
35
  'cancelOrder': true,
36
36
  'createOrder': true,
37
+ 'createPostOnlyOrder': true,
37
38
  'createStopLimitOrder': true,
38
39
  'createStopMarketOrder': true,
39
40
  'createStopOrder': true,
@@ -135,6 +136,7 @@ export default class bigone extends Exchange {
135
136
  },
136
137
  },
137
138
  'options': {
139
+ 'createMarketBuyOrderRequiresPrice': true,
138
140
  'accountsByType': {
139
141
  'spot': 'SPOT',
140
142
  'fund': 'FUND',
@@ -1091,30 +1093,39 @@ export default class bigone extends Exchange {
1091
1093
  //
1092
1094
  return this.parseBalance(response);
1093
1095
  }
1096
+ parseType(type) {
1097
+ const types = {
1098
+ 'STOP_LIMIT': 'limit',
1099
+ 'STOP_MARKET': 'market',
1100
+ 'LIMIT': 'limit',
1101
+ 'MARKET': 'market',
1102
+ };
1103
+ return this.safeString(types, type, type);
1104
+ }
1094
1105
  parseOrder(order, market = undefined) {
1095
1106
  //
1096
1107
  // {
1097
- // "id": 10,
1098
- // "asset_pair_name": "EOS-BTC",
1099
- // "price": "10.00",
1100
- // "amount": "10.00",
1101
- // "filled_amount": "9.0",
1102
- // "avg_deal_price": "12.0",
1103
- // "side": "ASK",
1104
- // "state": "FILLED",
1105
- // "created_at":"2019-01-29T06:05:56Z",
1106
- // "updated_at":"2019-01-29T06:05:56Z",
1108
+ // "id": '42154072251',
1109
+ // "asset_pair_name": 'SOL-USDT',
1110
+ // "price": '20',
1111
+ // "amount": '0.5',
1112
+ // "filled_amount": '0',
1113
+ // "avg_deal_price": '0',
1114
+ // "side": 'ASK',
1115
+ // "state": 'PENDING',
1116
+ // "created_at": '2023-09-13T03:42:00Z',
1117
+ // "updated_at": '2023-09-13T03:42:00Z',
1118
+ // "type": 'LIMIT',
1119
+ // "stop_price": '0',
1120
+ // "immediate_or_cancel": false,
1121
+ // "post_only": false,
1122
+ // "client_order_id": ''
1107
1123
  // }
1108
1124
  //
1109
1125
  const id = this.safeString(order, 'id');
1110
1126
  const marketId = this.safeString(order, 'asset_pair_name');
1111
1127
  const symbol = this.safeSymbol(marketId, market, '-');
1112
1128
  const timestamp = this.parse8601(this.safeString(order, 'created_at'));
1113
- const price = this.safeString(order, 'price');
1114
- const amount = this.safeString(order, 'amount');
1115
- const average = this.safeString(order, 'avg_deal_price');
1116
- const filled = this.safeString(order, 'filled_amount');
1117
- const status = this.parseOrderStatus(this.safeString(order, 'state'));
1118
1129
  let side = this.safeString(order, 'side');
1119
1130
  if (side === 'BID') {
1120
1131
  side = 'buy';
@@ -1122,28 +1133,48 @@ export default class bigone extends Exchange {
1122
1133
  else {
1123
1134
  side = 'sell';
1124
1135
  }
1125
- const lastTradeTimestamp = this.parse8601(this.safeString(order, 'updated_at'));
1136
+ let triggerPrice = this.safeString(order, 'stop_price');
1137
+ if (Precise.stringEq(triggerPrice, '0')) {
1138
+ triggerPrice = undefined;
1139
+ }
1140
+ const immediateOrCancel = this.safeValue(order, 'immediate_or_cancel');
1141
+ let timeInForce = undefined;
1142
+ if (immediateOrCancel) {
1143
+ timeInForce = 'IOC';
1144
+ }
1145
+ const type = this.parseType(this.safeString(order, 'type'));
1146
+ const price = this.safeString(order, 'price');
1147
+ let amount = undefined;
1148
+ let filled = undefined;
1149
+ let cost = undefined;
1150
+ if (type === 'market' && side === 'buy') {
1151
+ cost = this.safeString(order, 'filled_amount');
1152
+ }
1153
+ else {
1154
+ amount = this.safeString(order, 'amount');
1155
+ filled = this.safeString(order, 'filled_amount');
1156
+ }
1126
1157
  return this.safeOrder({
1127
1158
  'info': order,
1128
1159
  'id': id,
1129
- 'clientOrderId': undefined,
1160
+ 'clientOrderId': this.safeString(order, 'client_order_id'),
1130
1161
  'timestamp': timestamp,
1131
1162
  'datetime': this.iso8601(timestamp),
1132
- 'lastTradeTimestamp': lastTradeTimestamp,
1163
+ 'lastTradeTimestamp': this.parse8601(this.safeString(order, 'updated_at')),
1133
1164
  'symbol': symbol,
1134
- 'type': undefined,
1135
- 'timeInForce': undefined,
1136
- 'postOnly': undefined,
1165
+ 'type': type,
1166
+ 'timeInForce': timeInForce,
1167
+ 'postOnly': this.safeValue(order, 'post_only'),
1137
1168
  'side': side,
1138
1169
  'price': price,
1139
- 'stopPrice': undefined,
1140
- 'triggerPrice': undefined,
1170
+ 'stopPrice': triggerPrice,
1171
+ 'triggerPrice': triggerPrice,
1141
1172
  'amount': amount,
1142
- 'cost': undefined,
1143
- 'average': average,
1173
+ 'cost': cost,
1174
+ 'average': this.safeString(order, 'avg_deal_price'),
1144
1175
  'filled': filled,
1145
1176
  'remaining': undefined,
1146
- 'status': status,
1177
+ 'status': this.parseOrderStatus(this.safeString(order, 'state')),
1147
1178
  'fee': undefined,
1148
1179
  'trades': undefined,
1149
1180
  }, market);
@@ -1153,46 +1184,79 @@ export default class bigone extends Exchange {
1153
1184
  * @method
1154
1185
  * @name bigone#createOrder
1155
1186
  * @description create a trade order
1187
+ * @see https://open.big.one/docs/spot_orders.html#create-order
1156
1188
  * @param {string} symbol unified symbol of the market to create an order in
1157
1189
  * @param {string} type 'market' or 'limit'
1158
1190
  * @param {string} side 'buy' or 'sell'
1159
1191
  * @param {float} amount how much of currency you want to trade in units of base currency
1160
1192
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1161
1193
  * @param {object} [params] extra parameters specific to the bigone api endpoint
1194
+ * @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
1195
+ * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
1196
+ * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
1197
+ *
1198
+ * EXCHANGE SPECIFIC PARAMETERS
1199
+ * @param {string} operator *stop order only* GTE or LTE (default)
1200
+ * @param {string} client_order_id must match ^[a-zA-Z0-9-_]{1,36}$ this regex. client_order_id is unique in 24 hours, If created 24 hours later and the order closed, it will be released and can be reused
1162
1201
  * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1163
1202
  */
1164
1203
  await this.loadMarkets();
1165
1204
  const market = this.market(symbol);
1166
- const requestSide = (side === 'buy') ? 'BID' : 'ASK';
1167
- const uppercaseType = type.toUpperCase();
1205
+ const isBuy = (side === 'buy');
1206
+ const requestSide = isBuy ? 'BID' : 'ASK';
1207
+ let uppercaseType = type.toUpperCase();
1208
+ const isLimit = uppercaseType === 'LIMIT';
1209
+ const exchangeSpecificParam = this.safeValue(params, 'post_only');
1210
+ let postOnly = undefined;
1211
+ [postOnly, params] = this.handlePostOnly((uppercaseType === 'MARKET'), exchangeSpecificParam, params);
1212
+ const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPrice', 'stop_price']);
1168
1213
  const request = {
1169
1214
  'asset_pair_name': market['id'],
1170
1215
  'side': requestSide,
1171
- 'amount': this.amountToPrecision(symbol, amount),
1216
+ 'amount': this.amountToPrecision(symbol, amount), // order amount, string, required
1172
1217
  // 'price': this.priceToPrecision (symbol, price), // order price, string, required
1173
- 'type': uppercaseType,
1174
1218
  // 'operator': 'GTE', // stop orders only, GTE greater than and equal, LTE less than and equal
1175
1219
  // 'immediate_or_cancel': false, // limit orders only, must be false when post_only is true
1176
1220
  // 'post_only': false, // limit orders only, must be false when immediate_or_cancel is true
1177
1221
  };
1178
- if (uppercaseType === 'LIMIT') {
1222
+ if (isLimit || (uppercaseType === 'STOP_LIMIT')) {
1179
1223
  request['price'] = this.priceToPrecision(symbol, price);
1224
+ if (isLimit) {
1225
+ const timeInForce = this.safeString(params, 'timeInForce');
1226
+ if (timeInForce === 'IOC') {
1227
+ request['immediate_or_cancel'] = true;
1228
+ }
1229
+ if (postOnly) {
1230
+ request['post_only'] = true;
1231
+ }
1232
+ }
1180
1233
  }
1181
1234
  else {
1182
- const isStopLimit = (uppercaseType === 'STOP_LIMIT');
1183
- const isStopMarket = (uppercaseType === 'STOP_MARKET');
1184
- if (isStopLimit || isStopMarket) {
1185
- const stopPrice = this.safeNumber2(params, 'stop_price', 'stopPrice');
1186
- if (stopPrice === undefined) {
1187
- throw new ArgumentsRequired(this.id + ' createOrder() requires a stop_price parameter');
1235
+ const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice');
1236
+ if (createMarketBuyOrderRequiresPrice && (side === 'buy')) {
1237
+ if (price === undefined) {
1238
+ throw new InvalidOrder(this.id + ' createOrder() requires price argument for market buy orders on spot markets to calculate the total amount to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option to false and pass in the cost to spend into the amount parameter');
1188
1239
  }
1189
- request['stop_price'] = this.priceToPrecision(symbol, stopPrice);
1190
- params = this.omit(params, ['stop_price', 'stopPrice']);
1240
+ else {
1241
+ const amountString = this.numberToString(amount);
1242
+ const priceString = this.numberToString(price);
1243
+ amount = this.parseNumber(Precise.stringMul(amountString, priceString));
1244
+ }
1245
+ }
1246
+ }
1247
+ request['amount'] = this.amountToPrecision(symbol, amount);
1248
+ if (triggerPrice !== undefined) {
1249
+ request['stop_price'] = this.priceToPrecision(symbol, triggerPrice);
1250
+ request['operator'] = isBuy ? 'GTE' : 'LTE';
1251
+ if (isLimit) {
1252
+ uppercaseType = 'STOP_LIMIT';
1191
1253
  }
1192
- if (isStopLimit) {
1193
- request['price'] = this.priceToPrecision(symbol, price);
1254
+ else if (uppercaseType === 'MARKET') {
1255
+ uppercaseType = 'STOP_MARKET';
1194
1256
  }
1195
1257
  }
1258
+ request['type'] = uppercaseType;
1259
+ params = this.omit(params, ['stop_price', 'stopPrice', 'triggerPrice', 'timeInForce']);
1196
1260
  const response = await this.privatePostOrders(this.extend(request, params));
1197
1261
  //
1198
1262
  // {
package/js/src/bithumb.js CHANGED
@@ -83,15 +83,14 @@ export default class bithumb extends Exchange {
83
83
  'api': {
84
84
  'public': {
85
85
  'get': [
86
- 'ticker/{currency}',
87
- 'ticker/all',
88
- 'ticker/ALL_BTC',
89
- 'ticker/ALL_KRW',
90
- 'orderbook/{currency}',
91
- 'orderbook/all',
92
- 'transaction_history/{currency}',
93
- 'transaction_history/all',
94
- 'candlestick/{currency}/{interval}',
86
+ 'ticker/ALL_{quoteId}',
87
+ 'ticker/{baseId}_{quoteId}',
88
+ 'orderbook/ALL_{quoteId}',
89
+ 'orderbook/{baseId}_{quoteId}',
90
+ 'transaction_history/{baseId}_{quoteId}',
91
+ 'assetsstatus/ALL',
92
+ 'assetsstatus/{baseId}',
93
+ 'candlestick/{baseId}_{quoteId}/{interval}',
95
94
  ],
96
95
  },
97
96
  'private': {
@@ -110,6 +109,7 @@ export default class bithumb extends Exchange {
110
109
  'trade/krw_withdrawal',
111
110
  'trade/market_buy',
112
111
  'trade/market_sell',
112
+ 'trade/stop_limit',
113
113
  ],
114
114
  },
115
115
  },
@@ -198,8 +198,10 @@ export default class bithumb extends Exchange {
198
198
  const quote = quotes[i];
199
199
  const quoteId = quote;
200
200
  const extension = this.safeValue(quoteCurrencies, quote, {});
201
- const method = 'publicGetTickerALL' + quote;
202
- const response = await this[method](params);
201
+ const request = {
202
+ 'quoteId': quoteId,
203
+ };
204
+ const response = await this.publicGetTickerALLQuoteId(this.extend(request, params));
203
205
  const data = this.safeValue(response, 'data');
204
206
  const currencyIds = Object.keys(data);
205
207
  for (let j = 0; j < currencyIds.length; j++) {
@@ -310,12 +312,13 @@ export default class bithumb extends Exchange {
310
312
  await this.loadMarkets();
311
313
  const market = this.market(symbol);
312
314
  const request = {
313
- 'currency': market['base'] + '_' + market['quote'],
315
+ 'baseId': market['baseId'],
316
+ 'quoteId': market['quoteId'],
314
317
  };
315
318
  if (limit !== undefined) {
316
319
  request['count'] = limit; // default 30, max 30
317
320
  }
318
- const response = await this.publicGetOrderbookCurrency(this.extend(request, params));
321
+ const response = await this.publicGetOrderbookBaseIdQuoteId(this.extend(request, params));
319
322
  //
320
323
  // {
321
324
  // "status":"0000",
@@ -403,8 +406,11 @@ export default class bithumb extends Exchange {
403
406
  const quotes = Object.keys(quoteCurrencies);
404
407
  for (let i = 0; i < quotes.length; i++) {
405
408
  const quote = quotes[i];
406
- const method = 'publicGetTickerALL' + quote;
407
- const response = await this[method](params);
409
+ const quoteId = quote;
410
+ const request = {
411
+ 'quoteId': quoteId,
412
+ };
413
+ const response = await this.publicGetTickerALLQuoteId(this.extend(request, params));
408
414
  //
409
415
  // {
410
416
  // "status":"0000",
@@ -454,9 +460,10 @@ export default class bithumb extends Exchange {
454
460
  await this.loadMarkets();
455
461
  const market = this.market(symbol);
456
462
  const request = {
457
- 'currency': market['base'],
463
+ 'baseId': market['baseId'],
464
+ 'quoteId': market['quoteId'],
458
465
  };
459
- const response = await this.publicGetTickerCurrency(this.extend(request, params));
466
+ const response = await this.publicGetTickerBaseIdQuoteId(this.extend(request, params));
460
467
  //
461
468
  // {
462
469
  // "status":"0000",
@@ -514,10 +521,11 @@ export default class bithumb extends Exchange {
514
521
  await this.loadMarkets();
515
522
  const market = this.market(symbol);
516
523
  const request = {
517
- 'currency': market['base'],
524
+ 'baseId': market['baseId'],
525
+ 'quoteId': market['quoteId'],
518
526
  'interval': this.safeString(this.timeframes, timeframe, timeframe),
519
527
  };
520
- const response = await this.publicGetCandlestickCurrencyInterval(this.extend(request, params));
528
+ const response = await this.publicGetCandlestickBaseIdQuoteIdInterval(this.extend(request, params));
521
529
  //
522
530
  // {
523
531
  // 'status': '0000',
@@ -636,12 +644,13 @@ export default class bithumb extends Exchange {
636
644
  await this.loadMarkets();
637
645
  const market = this.market(symbol);
638
646
  const request = {
639
- 'currency': market['base'] + '_' + market['quote'],
647
+ 'baseId': market['baseId'],
648
+ 'quoteId': market['quoteId'],
640
649
  };
641
650
  if (limit !== undefined) {
642
651
  request['count'] = limit; // default 20, max 100
643
652
  }
644
- const response = await this.publicGetTransactionHistoryCurrency(this.extend(request, params));
653
+ const response = await this.publicGetTransactionHistoryBaseIdQuoteId(this.extend(request, params));
645
654
  //
646
655
  // {
647
656
  // "status":"0000",
@@ -224,7 +224,7 @@ export default class bitmart extends Exchange {
224
224
  datetime: string;
225
225
  info: any;
226
226
  };
227
- handleMarginModeAndParams(methodName: any, params?: {}, defaultValue?: any): any[];
227
+ setLeverage(leverage: any, symbol?: string, params?: {}): Promise<any>;
228
228
  nonce(): number;
229
229
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
230
230
  url: string;
package/js/src/bitmart.js CHANGED
@@ -88,7 +88,7 @@ export default class bitmart extends Exchange {
88
88
  'fetchWithdrawals': true,
89
89
  'reduceMargin': false,
90
90
  'repayMargin': true,
91
- 'setLeverage': false,
91
+ 'setLeverage': true,
92
92
  'setMarginMode': false,
93
93
  'transfer': true,
94
94
  'withdraw': true,
@@ -151,6 +151,9 @@ export default class bitmart extends Exchange {
151
151
  'account/sub-account/v1/transfer-history': 7.5,
152
152
  'account/sub-account/main/v1/wallet': 5,
153
153
  'account/sub-account/main/v1/subaccount-list': 7.5,
154
+ 'account/contract/sub-account/main/v1/wallet': 5,
155
+ 'account/contract/sub-account/main/v1/transfer-list': 7.5,
156
+ 'account/contract/sub-account/v1/transfer-history': 7.5,
154
157
  // account
155
158
  'account/v1/wallet': 5,
156
159
  'account/v1/currencies': 30,
@@ -176,9 +179,11 @@ export default class bitmart extends Exchange {
176
179
  'spot/v1/user_fee': 6,
177
180
  // contract
178
181
  'contract/private/assets-detail': 5,
179
- 'contract/private/order': 2,
182
+ 'contract/private/order': 1.2,
180
183
  'contract/private/order-history': 10,
181
184
  'contract/private/position': 10,
185
+ 'contract/private/get-open-orders': 1.2,
186
+ 'contract/private/trades': 10,
182
187
  },
183
188
  'post': {
184
189
  // sub-account endpoints
@@ -187,6 +192,9 @@ export default class bitmart extends Exchange {
187
192
  'account/sub-account/main/v1/main-to-sub': 30,
188
193
  'account/sub-account/sub/v1/sub-to-sub': 30,
189
194
  'account/sub-account/main/v1/sub-to-sub': 30,
195
+ 'account/contract/sub-account/main/v1/sub-to-main': 7.5,
196
+ 'account/contract/sub-account/main/v1/main-to-sub': 7.5,
197
+ 'account/contract/sub-account/sub/v1/sub-to-main': 7.5,
190
198
  // account
191
199
  'account/v1/withdraw/apply': 7.5,
192
200
  // transaction and trading
@@ -210,7 +218,14 @@ export default class bitmart extends Exchange {
210
218
  'spot/v1/margin/isolated/repay': 6,
211
219
  'spot/v1/margin/isolated/transfer': 6,
212
220
  // contract
213
- 'contract/private/trades': 10,
221
+ 'account/v1/transfer-contract-list': 60,
222
+ 'account/v1/transfer-contract': 60,
223
+ 'contract/private/submit-order': 2.5,
224
+ 'contract/private/cancel-order': 1.5,
225
+ 'contract/private/cancel-orders': 30,
226
+ 'contract/private/submit-plan-order': 2.5,
227
+ 'contract/private/cancel-plan-order': 1.5,
228
+ 'contract/private/submit-leverage': 2.5,
214
229
  },
215
230
  },
216
231
  },
@@ -2055,6 +2070,9 @@ export default class bitmart extends Exchange {
2055
2070
  }
2056
2071
  const [marginMode, query] = this.handleMarginModeAndParams('createOrder', params);
2057
2072
  if (marginMode !== undefined) {
2073
+ if (marginMode !== 'isolated') {
2074
+ throw new NotSupported(this.id + ' only isolated margin is supported');
2075
+ }
2058
2076
  method = 'privatePostSpotV1MarginSubmitOrder';
2059
2077
  }
2060
2078
  const response = await this[method](this.extend(request, query));
@@ -3207,22 +3225,33 @@ export default class bitmart extends Exchange {
3207
3225
  'info': interest,
3208
3226
  };
3209
3227
  }
3210
- handleMarginModeAndParams(methodName, params = {}, defaultValue = undefined) {
3228
+ async setLeverage(leverage, symbol = undefined, params = {}) {
3211
3229
  /**
3212
- * @ignore
3213
3230
  * @method
3214
- * @description marginMode specified by params["marginMode"], this.options["marginMode"], this.options["defaultMarginMode"], params["margin"] = true or this.options["defaultType"] = 'margin'
3215
- * @param {object} [params] extra parameters specific to the exchange api endpoint
3216
- * @returns {array} the marginMode in lowercase
3231
+ * @name bitmart#setLeverage
3232
+ * @description set the level of leverage for a market
3233
+ * @see https://developer-pro.bitmart.com/en/futures/#submit-leverage-signed
3234
+ * @param {float} leverage the rate of leverage
3235
+ * @param {string} symbol unified market symbol
3236
+ * @param {object} [params] extra parameters specific to the bitmart api endpoint
3237
+ * @param {string} [params.marginMode] 'isolated' or 'cross'
3238
+ * @returns {object} response from the exchange
3217
3239
  */
3240
+ this.checkRequiredSymbol('setLeverage', symbol);
3218
3241
  let marginMode = undefined;
3219
- [marginMode, params] = super.handleMarginModeAndParams(methodName, params, defaultValue);
3220
- if (marginMode !== undefined) {
3221
- if (marginMode !== 'isolated') {
3222
- throw new NotSupported(this.id + ' only isolated margin is supported');
3223
- }
3242
+ [marginMode, params] = this.handleMarginModeAndParams('setLeverage', params);
3243
+ this.checkRequiredArgument('setLeverage', marginMode, 'marginMode', ['isolated', 'cross']);
3244
+ await this.loadMarkets();
3245
+ const market = this.market(symbol);
3246
+ if (!market['swap']) {
3247
+ throw new BadSymbol(this.id + ' setLeverage() supports swap contracts only');
3224
3248
  }
3225
- return [marginMode, params];
3249
+ const request = {
3250
+ 'symbol': market['id'],
3251
+ 'leverage': leverage.toString(),
3252
+ 'open_type': marginMode,
3253
+ };
3254
+ return await this.privatePostContractPrivateSubmitLeverage(this.extend(request, params));
3226
3255
  }
3227
3256
  nonce() {
3228
3257
  return this.milliseconds();
package/js/src/gate.js CHANGED
@@ -4170,7 +4170,7 @@ export default class gate extends Exchange {
4170
4170
  type = isMarketOrder ? 'market' : 'limit';
4171
4171
  side = Precise.stringGt(amount, '0') ? 'buy' : 'sell';
4172
4172
  }
4173
- const rawStatus = this.safeStringN(order, ['status', 'finish_as', 'open']);
4173
+ const rawStatus = this.safeStringN(order, ['finish_as', 'status', 'open']);
4174
4174
  let timestamp = this.safeInteger(order, 'create_time_ms');
4175
4175
  if (timestamp === undefined) {
4176
4176
  timestamp = this.safeTimestamp2(order, 'create_time', 'ctime');
package/js/src/latoken.js CHANGED
@@ -204,6 +204,7 @@ export default class latoken extends Exchange {
204
204
  'defaultType': 'spot',
205
205
  'types': {
206
206
  'wallet': 'ACCOUNT_TYPE_WALLET',
207
+ 'funding': 'ACCOUNT_TYPE_WALLET',
207
208
  'spot': 'ACCOUNT_TYPE_SPOT',
208
209
  },
209
210
  'accounts': {
@@ -661,8 +661,8 @@ export default class poloniex extends poloniexRest {
661
661
  previousOrder['status'] = state;
662
662
  // update the newUpdates count
663
663
  orders.append(previousOrder);
664
- marketIds.push(marketId);
665
664
  }
665
+ marketIds.push(marketId);
666
666
  }
667
667
  }
668
668
  for (let i = 0; i < marketIds.length; i++) {
@@ -670,7 +670,7 @@ export default class poloniex extends poloniexRest {
670
670
  const market = this.market(marketId);
671
671
  const symbol = market['symbol'];
672
672
  const messageHash = 'orders::' + symbol;
673
- client.resolve(orders[symbol], messageHash);
673
+ client.resolve(orders, messageHash);
674
674
  }
675
675
  client.resolve(orders, 'orders');
676
676
  return message;
package/js/src/probit.js CHANGED
@@ -422,8 +422,8 @@ export default class probit extends Exchange {
422
422
  const networkList = {};
423
423
  for (let j = 0; j < platformsByPriority.length; j++) {
424
424
  const network = platformsByPriority[j];
425
- const id = this.safeString(network, 'id');
426
- const networkCode = this.networkIdToCode(id);
425
+ const networkId = this.safeString(network, 'id');
426
+ const networkCode = this.networkIdToCode(networkId);
427
427
  const currentDepositSuspended = this.safeValue(network, 'deposit_suspended');
428
428
  const currentWithdrawalSuspended = this.safeValue(network, 'withdrawal_suspended');
429
429
  const currentDeposit = !currentDepositSuspended;
@@ -436,7 +436,7 @@ export default class probit extends Exchange {
436
436
  const withdrawFee = this.safeValue(network, 'withdrawal_fee', []);
437
437
  const fee = this.safeValue(withdrawFee, 0, {});
438
438
  networkList[networkCode] = {
439
- 'id': id,
439
+ 'id': networkId,
440
440
  'network': networkCode,
441
441
  'active': currentActive,
442
442
  'deposit': currentDeposit,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.0.97",
3
+ "version": "4.0.98",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 130+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",