ccxt 4.3.51 → 4.3.52

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
@@ -188,7 +188,7 @@ var woofipro$1 = require('./src/pro/woofipro.js');
188
188
 
189
189
  //-----------------------------------------------------------------------------
190
190
  // this is updated by vss.js when building
191
- const version = '4.3.51';
191
+ const version = '4.3.52';
192
192
  Exchange["default"].ccxtVersion = version;
193
193
  const exchanges = {
194
194
  'ace': ace,
@@ -11145,10 +11145,10 @@ class binance extends binance$1 {
11145
11145
  const orderidlistLength = orderidlist.length;
11146
11146
  const origclientorderidlistLength = origclientorderidlist.length;
11147
11147
  if (orderidlistLength > 0) {
11148
- query = query + '&' + 'orderidlist=[' + orderidlist.join(',') + ']';
11148
+ query = query + '&' + 'orderidlist=%5B' + orderidlist.join('%2C') + '%5D';
11149
11149
  }
11150
11150
  if (origclientorderidlistLength > 0) {
11151
- query = query + '&' + 'origclientorderidlist=[' + origclientorderidlist.join(',') + ']';
11151
+ query = query + '&' + 'origclientorderidlist=%5B' + origclientorderidlist.join('%2C') + '%5D';
11152
11152
  }
11153
11153
  }
11154
11154
  else {
@@ -5206,9 +5206,15 @@ class bybit extends bybit$1 {
5206
5206
  * @param {string} [params.baseCoin] Base coin. Supports linear, inverse & option
5207
5207
  * @param {string} [params.settleCoin] Settle coin. Supports linear, inverse & option
5208
5208
  * @param {string} [params.orderFilter] 'Order' or 'StopOrder' or 'tpslOrder'
5209
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
5209
5210
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5210
5211
  */
5211
5212
  await this.loadMarkets();
5213
+ let paginate = false;
5214
+ [paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
5215
+ if (paginate) {
5216
+ return await this.fetchPaginatedCallCursor('fetchOpenOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
5217
+ }
5212
5218
  const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
5213
5219
  const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
5214
5220
  const request = {};
@@ -81,6 +81,7 @@ class krakenfutures extends krakenfutures$1 {
81
81
  'public': 'https://demo-futures.kraken.com/derivatives/api/',
82
82
  'private': 'https://demo-futures.kraken.com/derivatives/api/',
83
83
  'charts': 'https://demo-futures.kraken.com/api/charts/',
84
+ 'history': 'https://demo-futures.kraken.com/api/history/',
84
85
  'www': 'https://demo-futures.kraken.com',
85
86
  },
86
87
  'logo': 'https://user-images.githubusercontent.com/24300605/81436764-b22fd580-9172-11ea-9703-742783e6376d.jpg',
@@ -431,6 +431,7 @@ class okx extends okx$1 {
431
431
  'sprd/cancel-order': 1,
432
432
  'sprd/mass-cancel': 1,
433
433
  'sprd/amend-order': 1,
434
+ 'sprd/cancel-all-after': 10,
434
435
  // trade
435
436
  'trade/order': 1 / 3,
436
437
  'trade/batch-orders': 1 / 15,
@@ -99,7 +99,7 @@ class okx extends okx$1 {
99
99
  // okex does not support built-in ws protocol-level ping-pong
100
100
  // instead it requires a custom text-based ping-pong
101
101
  'ping': this.ping,
102
- 'keepAlive': 20000,
102
+ 'keepAlive': 18000,
103
103
  },
104
104
  });
105
105
  }
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, TransferEntries, LeverageTiers } 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.50";
7
+ declare const version = "4.3.51";
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.51';
41
+ const version = '4.3.52';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -222,6 +222,7 @@ interface Exchange {
222
222
  privatePostSprdCancelOrder(params?: {}): Promise<implicitReturnType>;
223
223
  privatePostSprdMassCancel(params?: {}): Promise<implicitReturnType>;
224
224
  privatePostSprdAmendOrder(params?: {}): Promise<implicitReturnType>;
225
+ privatePostSprdCancelAllAfter(params?: {}): Promise<implicitReturnType>;
225
226
  privatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
226
227
  privatePostTradeBatchOrders(params?: {}): Promise<implicitReturnType>;
227
228
  privatePostTradeCancelOrder(params?: {}): Promise<implicitReturnType>;
package/js/src/binance.js CHANGED
@@ -11148,10 +11148,10 @@ export default class binance extends Exchange {
11148
11148
  const orderidlistLength = orderidlist.length;
11149
11149
  const origclientorderidlistLength = origclientorderidlist.length;
11150
11150
  if (orderidlistLength > 0) {
11151
- query = query + '&' + 'orderidlist=[' + orderidlist.join(',') + ']';
11151
+ query = query + '&' + 'orderidlist=%5B' + orderidlist.join('%2C') + '%5D';
11152
11152
  }
11153
11153
  if (origclientorderidlistLength > 0) {
11154
- query = query + '&' + 'origclientorderidlist=[' + origclientorderidlist.join(',') + ']';
11154
+ query = query + '&' + 'origclientorderidlist=%5B' + origclientorderidlist.join('%2C') + '%5D';
11155
11155
  }
11156
11156
  }
11157
11157
  else {
package/js/src/bybit.js CHANGED
@@ -5209,9 +5209,15 @@ export default class bybit extends Exchange {
5209
5209
  * @param {string} [params.baseCoin] Base coin. Supports linear, inverse & option
5210
5210
  * @param {string} [params.settleCoin] Settle coin. Supports linear, inverse & option
5211
5211
  * @param {string} [params.orderFilter] 'Order' or 'StopOrder' or 'tpslOrder'
5212
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
5212
5213
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
5213
5214
  */
5214
5215
  await this.loadMarkets();
5216
+ let paginate = false;
5217
+ [paginate, params] = this.handleOptionAndParams(params, 'fetchOpenOrders', 'paginate');
5218
+ if (paginate) {
5219
+ return await this.fetchPaginatedCallCursor('fetchOpenOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
5220
+ }
5215
5221
  const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
5216
5222
  const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
5217
5223
  const request = {};
@@ -84,6 +84,7 @@ export default class krakenfutures extends Exchange {
84
84
  'public': 'https://demo-futures.kraken.com/derivatives/api/',
85
85
  'private': 'https://demo-futures.kraken.com/derivatives/api/',
86
86
  'charts': 'https://demo-futures.kraken.com/api/charts/',
87
+ 'history': 'https://demo-futures.kraken.com/api/history/',
87
88
  'www': 'https://demo-futures.kraken.com',
88
89
  },
89
90
  'logo': 'https://user-images.githubusercontent.com/24300605/81436764-b22fd580-9172-11ea-9703-742783e6376d.jpg',
package/js/src/okx.js CHANGED
@@ -434,6 +434,7 @@ export default class okx extends Exchange {
434
434
  'sprd/cancel-order': 1,
435
435
  'sprd/mass-cancel': 1,
436
436
  'sprd/amend-order': 1,
437
+ 'sprd/cancel-all-after': 10,
437
438
  // trade
438
439
  'trade/order': 1 / 3,
439
440
  'trade/batch-orders': 1 / 15,
package/js/src/pro/okx.js CHANGED
@@ -102,7 +102,7 @@ export default class okx extends okxRest {
102
102
  // okex does not support built-in ws protocol-level ping-pong
103
103
  // instead it requires a custom text-based ping-pong
104
104
  'ping': this.ping,
105
- 'keepAlive': 20000,
105
+ 'keepAlive': 18000,
106
106
  },
107
107
  });
108
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.3.51",
3
+ "version": "4.3.52",
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",