ccxt 4.3.81 → 4.3.82

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
@@ -194,7 +194,7 @@ var xt$1 = require('./src/pro/xt.js');
194
194
 
195
195
  //-----------------------------------------------------------------------------
196
196
  // this is updated by vss.js when building
197
- const version = '4.3.81';
197
+ const version = '4.3.82';
198
198
  Exchange["default"].ccxtVersion = version;
199
199
  const exchanges = {
200
200
  'ace': ace,
@@ -6201,6 +6201,8 @@ class bybit extends bybit$1 {
6201
6201
  * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
6202
6202
  */
6203
6203
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
6204
+ let accountType = undefined;
6205
+ [accountType, params] = this.handleOptionAndParams(params, 'withdraw', 'accountType', 'SPOT');
6204
6206
  await this.loadMarkets();
6205
6207
  this.checkAddress(address);
6206
6208
  const currency = this.currency(code);
@@ -6209,6 +6211,7 @@ class bybit extends bybit$1 {
6209
6211
  'amount': this.numberToString(amount),
6210
6212
  'address': address,
6211
6213
  'timestamp': this.milliseconds(),
6214
+ 'accountType': accountType,
6212
6215
  };
6213
6216
  if (tag !== undefined) {
6214
6217
  request['tag'] = tag;
@@ -1299,7 +1299,8 @@ class wavesexchange extends wavesexchange$1 {
1299
1299
  throw new errors.InvalidOrder(this.id + ' createOrder() requires a price argument for ' + type + ' orders to determine the max price for buy and the min price for sell');
1300
1300
  }
1301
1301
  const timestamp = this.milliseconds();
1302
- const defaultExpiryDelta = this.safeInteger(this.options, 'createOrderDefaultExpiry', 2419200000);
1302
+ let defaultExpiryDelta = undefined;
1303
+ [defaultExpiryDelta, params] = this.handleOptionAndParams(params, 'createOrder', 'defaultExpiry', this.safeInteger(this.options, 'createOrderDefaultExpiry', 2419200000));
1303
1304
  const expiration = this.sum(timestamp, defaultExpiryDelta);
1304
1305
  const matcherFees = await this.getFeesForAsset(symbol, side, amount, price);
1305
1306
  // {
@@ -1447,12 +1448,12 @@ class wavesexchange extends wavesexchange$1 {
1447
1448
  // }
1448
1449
  //
1449
1450
  if (isMarketOrder) {
1450
- const response = await this.matcherPostMatcherOrderbookMarket(body);
1451
+ const response = await this.matcherPostMatcherOrderbookMarket(this.extend(body, params));
1451
1452
  const value = this.safeDict(response, 'message');
1452
1453
  return this.parseOrder(value, market);
1453
1454
  }
1454
1455
  else {
1455
- const response = await this.matcherPostMatcherOrderbook(body);
1456
+ const response = await this.matcherPostMatcherOrderbook(this.extend(body, params));
1456
1457
  const value = this.safeDict(response, 'message');
1457
1458
  return this.parseOrder(value, market);
1458
1459
  }
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 { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
7
- declare const version = "4.3.80";
7
+ declare const version = "4.3.81";
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, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.3.81';
41
+ const version = '4.3.82';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
package/js/src/bybit.js CHANGED
@@ -6204,6 +6204,8 @@ export default class bybit extends Exchange {
6204
6204
  * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
6205
6205
  */
6206
6206
  [tag, params] = this.handleWithdrawTagAndParams(tag, params);
6207
+ let accountType = undefined;
6208
+ [accountType, params] = this.handleOptionAndParams(params, 'withdraw', 'accountType', 'SPOT');
6207
6209
  await this.loadMarkets();
6208
6210
  this.checkAddress(address);
6209
6211
  const currency = this.currency(code);
@@ -6212,6 +6214,7 @@ export default class bybit extends Exchange {
6212
6214
  'amount': this.numberToString(amount),
6213
6215
  'address': address,
6214
6216
  'timestamp': this.milliseconds(),
6217
+ 'accountType': accountType,
6215
6218
  };
6216
6219
  if (tag !== undefined) {
6217
6220
  request['tag'] = tag;
@@ -1302,7 +1302,8 @@ export default class wavesexchange extends Exchange {
1302
1302
  throw new InvalidOrder(this.id + ' createOrder() requires a price argument for ' + type + ' orders to determine the max price for buy and the min price for sell');
1303
1303
  }
1304
1304
  const timestamp = this.milliseconds();
1305
- const defaultExpiryDelta = this.safeInteger(this.options, 'createOrderDefaultExpiry', 2419200000);
1305
+ let defaultExpiryDelta = undefined;
1306
+ [defaultExpiryDelta, params] = this.handleOptionAndParams(params, 'createOrder', 'defaultExpiry', this.safeInteger(this.options, 'createOrderDefaultExpiry', 2419200000));
1306
1307
  const expiration = this.sum(timestamp, defaultExpiryDelta);
1307
1308
  const matcherFees = await this.getFeesForAsset(symbol, side, amount, price);
1308
1309
  // {
@@ -1450,12 +1451,12 @@ export default class wavesexchange extends Exchange {
1450
1451
  // }
1451
1452
  //
1452
1453
  if (isMarketOrder) {
1453
- const response = await this.matcherPostMatcherOrderbookMarket(body);
1454
+ const response = await this.matcherPostMatcherOrderbookMarket(this.extend(body, params));
1454
1455
  const value = this.safeDict(response, 'message');
1455
1456
  return this.parseOrder(value, market);
1456
1457
  }
1457
1458
  else {
1458
- const response = await this.matcherPostMatcherOrderbook(body);
1459
+ const response = await this.matcherPostMatcherOrderbook(this.extend(body, params));
1459
1460
  const value = this.safeDict(response, 'message');
1460
1461
  return this.parseOrder(value, market);
1461
1462
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.81",
3
+ "version": "4.3.82",
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",