ccxt 4.4.19 → 4.4.21

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.
Files changed (63) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +4 -4
  3. package/dist/cjs/ccxt.js +3 -1
  4. package/dist/cjs/src/base/Exchange.js +18 -0
  5. package/dist/cjs/src/base/ws/Future.js +3 -1
  6. package/dist/cjs/src/binance.js +0 -10
  7. package/dist/cjs/src/bingx.js +6 -1
  8. package/dist/cjs/src/bybit.js +67 -4
  9. package/dist/cjs/src/gate.js +1 -0
  10. package/dist/cjs/src/htx.js +28 -0
  11. package/dist/cjs/src/hyperliquid.js +7 -6
  12. package/dist/cjs/src/kucoin.js +16 -36
  13. package/dist/cjs/src/kucoinfutures.js +2 -2
  14. package/dist/cjs/src/lbank.js +3 -3
  15. package/dist/cjs/src/okx.js +8 -10
  16. package/dist/cjs/src/paradex.js +1 -2
  17. package/dist/cjs/src/phemex.js +75 -0
  18. package/dist/cjs/src/pro/coinbaseadvanced.js +17 -0
  19. package/dist/cjs/src/static_dependencies/noble-hashes/_sha2.js +1 -1
  20. package/dist/cjs/src/static_dependencies/noble-hashes/hmac.js +1 -1
  21. package/dist/cjs/src/static_dependencies/noble-hashes/sha3.js +1 -1
  22. package/dist/cjs/src/static_dependencies/watchable/src/unpromise.js +298 -0
  23. package/js/ccxt.d.ts +4 -1
  24. package/js/ccxt.js +3 -1
  25. package/js/src/abstract/bybit.d.ts +1 -0
  26. package/js/src/abstract/kucoin.d.ts +1 -0
  27. package/js/src/abstract/kucoinfutures.d.ts +1 -0
  28. package/js/src/abstract/okx.d.ts +3 -0
  29. package/js/src/base/Exchange.d.ts +3 -1
  30. package/js/src/base/Exchange.js +18 -0
  31. package/js/src/base/ws/Future.js +2 -1
  32. package/js/src/binance.d.ts +0 -1
  33. package/js/src/binance.js +0 -10
  34. package/js/src/bingx.js +6 -1
  35. package/js/src/bybit.d.ts +1 -0
  36. package/js/src/bybit.js +67 -4
  37. package/js/src/gate.js +1 -0
  38. package/js/src/htx.d.ts +2 -2
  39. package/js/src/htx.js +28 -0
  40. package/js/src/hyperliquid.js +7 -6
  41. package/js/src/kucoin.d.ts +0 -1
  42. package/js/src/kucoin.js +16 -36
  43. package/js/src/kucoinfutures.js +2 -2
  44. package/js/src/lbank.js +3 -3
  45. package/js/src/okx.d.ts +0 -1
  46. package/js/src/okx.js +9 -11
  47. package/js/src/paradex.js +1 -1
  48. package/js/src/phemex.d.ts +2 -0
  49. package/js/src/phemex.js +75 -0
  50. package/js/src/pro/coinbaseadvanced.d.ts +4 -0
  51. package/js/src/pro/coinbaseadvanced.js +18 -0
  52. package/js/src/static_dependencies/noble-hashes/_blake2.js +1 -1
  53. package/js/src/static_dependencies/noble-hashes/_sha2.js +1 -1
  54. package/js/src/static_dependencies/noble-hashes/hmac.js +1 -1
  55. package/js/src/static_dependencies/noble-hashes/sha3-addons.js +5 -5
  56. package/js/src/static_dependencies/noble-hashes/sha3.js +1 -1
  57. package/js/src/static_dependencies/watchable/src/index.d.ts +2 -0
  58. package/js/src/static_dependencies/watchable/src/index.js +7 -0
  59. package/js/src/static_dependencies/watchable/src/types.d.ts +28 -0
  60. package/js/src/static_dependencies/watchable/src/types.js +8 -0
  61. package/js/src/static_dependencies/watchable/src/unpromise.d.ts +120 -0
  62. package/js/src/static_dependencies/watchable/src/unpromise.js +297 -0
  63. package/package.json +1 -1
@@ -0,0 +1,120 @@
1
+ import type { PromiseExecutor, PromiseWithResolvers, ProxyPromise, SubscribedPromise } from "./types";
2
+ /**
3
+ * Every `Promise<T>` can be shadowed by a single `ProxyPromise<T>`. It is
4
+ * created once, cached and reused throughout the lifetime of the Promise. Get a
5
+ * Promise's ProxyPromise using `Unpromise.proxy(promise)`.
6
+ *
7
+ * The `ProxyPromise<T>` attaches handlers to the original `Promise<T>`
8
+ * `.then()` and `.catch()` just once. Promises derived from it use a
9
+ * subscription- (and unsubscription-) based mechanism that monitors these
10
+ * handlers.
11
+ *
12
+ * Every time you call `.subscribe()`, `.then()` `.catch()` or `.finally()` on a
13
+ * `ProxyPromise<T>` it returns a `SubscribedPromise<T>` having an additional
14
+ * `unsubscribe()` method. Calling `unsubscribe()` detaches reference chains
15
+ * from the original, potentially long-lived Promise, eliminating memory leaks.
16
+ *
17
+ * This approach can eliminate the memory leaks that otherwise come about from
18
+ * repeated `race()` or `any()` calls invoking `.then()` and `.catch()` multiple
19
+ * times on the same long-lived native Promise (subscriptions which can never be
20
+ * cleaned up).
21
+ *
22
+ * `Unpromise.race(promises)` is a reference implementation of `Promise.race`
23
+ * avoiding memory leaks when using long-lived unsettled Promises.
24
+ *
25
+ * `Unpromise.any(promises)` is a reference implementation of `Promise.any`
26
+ * avoiding memory leaks when using long-lived unsettled Promises.
27
+ *
28
+ * `Unpromise.resolve(promise)` returns an ephemeral `SubscribedPromise<T>` for
29
+ * any given `Promise<T>` facilitating arbitrary async/await patterns. Behind
30
+ * the scenes, `resolve` is implemented simply as
31
+ * `Unpromise.proxy(promise).subscribe()`. Don't forget to call `.unsubscribe()`
32
+ * to tidy up!
33
+ *
34
+ */
35
+ export declare class Unpromise<T> implements ProxyPromise<T> {
36
+ /** INSTANCE IMPLEMENTATION */
37
+ /** The promise shadowed by this Unpromise<T> */
38
+ protected readonly promise: Promise<T> | PromiseLike<T>;
39
+ /** Promises expecting eventual settlement (unless unsubscribed first). This list is deleted
40
+ * after the original promise settles - no further notifications will be issued. */
41
+ protected subscribers: ReadonlyArray<PromiseWithResolvers<T>> | null;
42
+ /** The Promise's settlement (recorded when it fulfils or rejects). This is consulted when
43
+ * calling .subscribe() .then() .catch() .finally() to see if an immediately-resolving Promise
44
+ * can be returned, and therefore subscription can be bypassed. */
45
+ protected settlement: PromiseSettledResult<T> | null;
46
+ /** Constructor accepts a normal Promise executor function like `new
47
+ * Unpromise((resolve, reject) => {...})` or accepts a pre-existing Promise
48
+ * like `new Unpromise(existingPromise)`. Adds `.then()` and `.catch()`
49
+ * handlers to the Promise. These handlers pass fulfilment and rejection
50
+ * notifications to downstream subscribers and maintains records of value
51
+ * or error if the Promise ever settles. */
52
+ protected constructor(promise: Promise<T>);
53
+ protected constructor(promise: PromiseLike<T>);
54
+ protected constructor(executor: PromiseExecutor<T>);
55
+ /** Create a promise that mitigates uncontrolled subscription to a long-lived
56
+ * Promise via .then() and .catch() - otherwise a source of memory leaks.
57
+ *
58
+ * The returned promise has an `unsubscribe()` method which can be called when
59
+ * the Promise is no longer being tracked by application logic, and which
60
+ * ensures that there is no reference chain from the original promise to the
61
+ * new one, and therefore no memory leak.
62
+ *
63
+ * If original promise has not yet settled, this adds a new unique promise
64
+ * that listens to then/catch events, along with an `unsubscribe()` method to
65
+ * detach it.
66
+ *
67
+ * If original promise has settled, then creates a new Promise.resolve() or
68
+ * Promise.reject() and provided unsubscribe is a noop.
69
+ *
70
+ * If you call `unsubscribe()` before the returned Promise has settled, it
71
+ * will never settle.
72
+ */
73
+ subscribe(): SubscribedPromise<T>;
74
+ /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */
75
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): SubscribedPromise<TResult1 | TResult2>;
76
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): SubscribedPromise<T | TResult>;
77
+ finally(onfinally?: (() => void) | null | undefined): SubscribedPromise<T>;
78
+ /** TOSTRING SUPPORT */
79
+ readonly [Symbol.toStringTag] = "Unpromise";
80
+ /** Unpromise STATIC METHODS */
81
+ /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime
82
+ * of the provided Promise reference) */
83
+ static proxy<T>(promise: PromiseLike<T>): ProxyPromise<T>;
84
+ /** Create and store an Unpromise keyed by an original Promise. */
85
+ protected static createSubscribablePromise<T>(promise: PromiseLike<T>): Unpromise<T>;
86
+ /** Retrieve a previously-created Unpromise keyed by an original Promise. */
87
+ protected static getSubscribablePromise<T>(promise: PromiseLike<T>): ProxyPromise<T>;
88
+ /** Promise STATIC METHODS */
89
+ /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from
90
+ * it (that can be later unsubscribed to eliminate Memory leaks) */
91
+ static resolve<T>(value: T | PromiseLike<T>): SubscribedPromise<Awaited<T>>;
92
+ /** Perform Promise.any() via SubscribedPromises, then unsubscribe them.
93
+ * Equivalent to Promise.any but eliminates memory leaks from long-lived
94
+ * promises accumulating .then() and .catch() subscribers. */
95
+ static any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
96
+ /** Perform Promise.race via SubscribedPromises, then unsubscribe them.
97
+ * Equivalent to Promise.race but eliminates memory leaks from long-lived
98
+ * promises accumulating .then() and .catch() subscribers. */
99
+ static race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
100
+ /** Create a race of SubscribedPromises that will fulfil to a single winning
101
+ * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises
102
+ * accumulating .then() and .catch() subscribers. Allows simple logic to
103
+ * consume the result, like...
104
+ * ```ts
105
+ * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]);
106
+ * if(winner === promiseB){
107
+ * const result = await promiseB;
108
+ * // do the thing
109
+ * }
110
+ * ```
111
+ * */
112
+ static raceReferences<P extends Promise<unknown>>(promises: readonly P[]): Promise<readonly [P]>;
113
+ }
114
+ /** Promises a 1-tuple containing the original promise when it resolves. Allows
115
+ * awaiting the eventual Promise ***reference*** (easy to destructure and
116
+ * exactly compare with ===). Avoids resolving to the Promise ***value*** (which
117
+ * may be ambiguous and therefore hard to identify as the winner of a race).
118
+ * You can call unsubscribe on the Promise to mitigate memory leaks.
119
+ * */
120
+ export declare function resolveSelfTuple<P extends Promise<unknown>>(promise: P): SubscribedPromise<readonly [P]>;
@@ -0,0 +1,297 @@
1
+ // ----------------------------------------------------------------------------
2
+
3
+ // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ // EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
7
+ /* eslint-disable @typescript-eslint/unbound-method */
8
+ /* eslint-disable @typescript-eslint/return-await */
9
+ /* eslint-disable @typescript-eslint/promise-function-async */
10
+ var _a;
11
+ /** Memory safe (weakmapped) cache of the ProxyPromise for each Promise,
12
+ * which is retained for the lifetime of the original Promise.
13
+ */
14
+ const subscribableCache = new WeakMap();
15
+ /** A NOOP function allowing a consistent interface for settled
16
+ * SubscribedPromises (settled promises are not subscribed - they resolve
17
+ * immediately). */
18
+ const NOOP = () => { };
19
+ /**
20
+ * Every `Promise<T>` can be shadowed by a single `ProxyPromise<T>`. It is
21
+ * created once, cached and reused throughout the lifetime of the Promise. Get a
22
+ * Promise's ProxyPromise using `Unpromise.proxy(promise)`.
23
+ *
24
+ * The `ProxyPromise<T>` attaches handlers to the original `Promise<T>`
25
+ * `.then()` and `.catch()` just once. Promises derived from it use a
26
+ * subscription- (and unsubscription-) based mechanism that monitors these
27
+ * handlers.
28
+ *
29
+ * Every time you call `.subscribe()`, `.then()` `.catch()` or `.finally()` on a
30
+ * `ProxyPromise<T>` it returns a `SubscribedPromise<T>` having an additional
31
+ * `unsubscribe()` method. Calling `unsubscribe()` detaches reference chains
32
+ * from the original, potentially long-lived Promise, eliminating memory leaks.
33
+ *
34
+ * This approach can eliminate the memory leaks that otherwise come about from
35
+ * repeated `race()` or `any()` calls invoking `.then()` and `.catch()` multiple
36
+ * times on the same long-lived native Promise (subscriptions which can never be
37
+ * cleaned up).
38
+ *
39
+ * `Unpromise.race(promises)` is a reference implementation of `Promise.race`
40
+ * avoiding memory leaks when using long-lived unsettled Promises.
41
+ *
42
+ * `Unpromise.any(promises)` is a reference implementation of `Promise.any`
43
+ * avoiding memory leaks when using long-lived unsettled Promises.
44
+ *
45
+ * `Unpromise.resolve(promise)` returns an ephemeral `SubscribedPromise<T>` for
46
+ * any given `Promise<T>` facilitating arbitrary async/await patterns. Behind
47
+ * the scenes, `resolve` is implemented simply as
48
+ * `Unpromise.proxy(promise).subscribe()`. Don't forget to call `.unsubscribe()`
49
+ * to tidy up!
50
+ *
51
+ */
52
+ export class Unpromise {
53
+ constructor(arg) {
54
+ /** Promises expecting eventual settlement (unless unsubscribed first). This list is deleted
55
+ * after the original promise settles - no further notifications will be issued. */
56
+ this.subscribers = [];
57
+ /** The Promise's settlement (recorded when it fulfils or rejects). This is consulted when
58
+ * calling .subscribe() .then() .catch() .finally() to see if an immediately-resolving Promise
59
+ * can be returned, and therefore subscription can be bypassed. */
60
+ this.settlement = null;
61
+ /** TOSTRING SUPPORT */
62
+ this[_a] = "Unpromise";
63
+ // handle either a Promise or a Promise executor function
64
+ if (typeof arg === "function") {
65
+ this.promise = new Promise(arg);
66
+ }
67
+ else {
68
+ this.promise = arg;
69
+ }
70
+ // subscribe for eventual fulfilment and rejection
71
+ // handle PromiseLike objects (that at least have .then)
72
+ const thenReturn = this.promise.then((value) => {
73
+ // atomically record fulfilment and detach subscriber list
74
+ const { subscribers } = this;
75
+ this.subscribers = null;
76
+ this.settlement = {
77
+ status: "fulfilled",
78
+ value,
79
+ };
80
+ // notify fulfilment to subscriber list
81
+ subscribers?.forEach(({ resolve }) => {
82
+ resolve(value);
83
+ });
84
+ });
85
+ // handle Promise (that also have a .catch behaviour)
86
+ if ("catch" in thenReturn) {
87
+ thenReturn.catch((reason) => {
88
+ // atomically record rejection and detach subscriber list
89
+ const { subscribers } = this;
90
+ this.subscribers = null;
91
+ this.settlement = {
92
+ status: "rejected",
93
+ reason,
94
+ };
95
+ // notify rejection to subscriber list
96
+ subscribers?.forEach(({ reject }) => {
97
+ reject(reason);
98
+ });
99
+ });
100
+ }
101
+ }
102
+ /** Create a promise that mitigates uncontrolled subscription to a long-lived
103
+ * Promise via .then() and .catch() - otherwise a source of memory leaks.
104
+ *
105
+ * The returned promise has an `unsubscribe()` method which can be called when
106
+ * the Promise is no longer being tracked by application logic, and which
107
+ * ensures that there is no reference chain from the original promise to the
108
+ * new one, and therefore no memory leak.
109
+ *
110
+ * If original promise has not yet settled, this adds a new unique promise
111
+ * that listens to then/catch events, along with an `unsubscribe()` method to
112
+ * detach it.
113
+ *
114
+ * If original promise has settled, then creates a new Promise.resolve() or
115
+ * Promise.reject() and provided unsubscribe is a noop.
116
+ *
117
+ * If you call `unsubscribe()` before the returned Promise has settled, it
118
+ * will never settle.
119
+ */
120
+ subscribe() {
121
+ // in all cases we will combine some promise with its unsubscribe function
122
+ let promise;
123
+ let unsubscribe;
124
+ const { settlement } = this;
125
+ if (settlement === null) {
126
+ // not yet settled - subscribe new promise. Expect eventual settlement
127
+ if (this.subscribers === null) {
128
+ // invariant - it is not settled, so it must have subscribers
129
+ throw new Error("Unpromise settled but still has subscribers");
130
+ }
131
+ const subscriber = withResolvers();
132
+ this.subscribers = listWithMember(this.subscribers, subscriber);
133
+ promise = subscriber.promise;
134
+ unsubscribe = () => {
135
+ if (this.subscribers !== null) {
136
+ this.subscribers = listWithoutMember(this.subscribers, subscriber);
137
+ }
138
+ };
139
+ }
140
+ else {
141
+ // settled - don't create subscribed promise. Just resolve or reject
142
+ const { status } = settlement;
143
+ if (status === "fulfilled") {
144
+ promise = Promise.resolve(settlement.value);
145
+ }
146
+ else {
147
+ promise = Promise.reject(settlement.reason);
148
+ }
149
+ unsubscribe = NOOP;
150
+ }
151
+ // extend promise signature with the extra method
152
+ return Object.assign(promise, { unsubscribe });
153
+ }
154
+ /** STANDARD PROMISE METHODS (but returning a SubscribedPromise) */
155
+ then(onfulfilled, onrejected) {
156
+ const subscribed = this.subscribe();
157
+ const { unsubscribe } = subscribed;
158
+ return Object.assign(subscribed.then(onfulfilled, onrejected), {
159
+ unsubscribe,
160
+ });
161
+ }
162
+ catch(onrejected) {
163
+ const subscribed = this.subscribe();
164
+ const { unsubscribe } = subscribed;
165
+ return Object.assign(subscribed.catch(onrejected), {
166
+ unsubscribe,
167
+ });
168
+ }
169
+ finally(onfinally) {
170
+ const subscribed = this.subscribe();
171
+ const { unsubscribe } = subscribed;
172
+ return Object.assign(subscribed.finally(onfinally), {
173
+ unsubscribe,
174
+ });
175
+ }
176
+ /** Unpromise STATIC METHODS */
177
+ /** Create or Retrieve the proxy Unpromise (a re-used Unpromise for the VM lifetime
178
+ * of the provided Promise reference) */
179
+ static proxy(promise) {
180
+ const cached = Unpromise.getSubscribablePromise(promise);
181
+ return typeof cached !== "undefined"
182
+ ? cached
183
+ : Unpromise.createSubscribablePromise(promise);
184
+ }
185
+ /** Create and store an Unpromise keyed by an original Promise. */
186
+ static createSubscribablePromise(promise) {
187
+ const created = new Unpromise(promise);
188
+ subscribableCache.set(promise, created); // resolve promise to unpromise
189
+ subscribableCache.set(created, created); // resolve the unpromise to itself
190
+ return created;
191
+ }
192
+ /** Retrieve a previously-created Unpromise keyed by an original Promise. */
193
+ static getSubscribablePromise(promise) {
194
+ return subscribableCache.get(promise);
195
+ }
196
+ /** Promise STATIC METHODS */
197
+ /** Lookup the Unpromise for this promise, and derive a SubscribedPromise from
198
+ * it (that can be later unsubscribed to eliminate Memory leaks) */
199
+ static resolve(value) {
200
+ const promise = typeof value === "object" &&
201
+ value !== null &&
202
+ "then" in value &&
203
+ typeof value.then === "function"
204
+ ? value
205
+ : Promise.resolve(value);
206
+ return Unpromise.proxy(promise).subscribe();
207
+ }
208
+ static async any(values) {
209
+ const valuesArray = Array.isArray(values) ? values : [...values];
210
+ const subscribedPromises = valuesArray.map(Unpromise.resolve);
211
+ try {
212
+ return await Promise.any(subscribedPromises);
213
+ }
214
+ finally {
215
+ subscribedPromises.forEach(({ unsubscribe }) => {
216
+ unsubscribe();
217
+ });
218
+ }
219
+ }
220
+ static async race(values) {
221
+ const valuesArray = Array.isArray(values) ? values : [...values];
222
+ const subscribedPromises = valuesArray.map(Unpromise.resolve);
223
+ try {
224
+ return await Promise.race(subscribedPromises);
225
+ }
226
+ finally {
227
+ subscribedPromises.forEach(({ unsubscribe }) => {
228
+ unsubscribe();
229
+ });
230
+ }
231
+ }
232
+ /** Create a race of SubscribedPromises that will fulfil to a single winning
233
+ * Promise (in a 1-Tuple). Eliminates memory leaks from long-lived promises
234
+ * accumulating .then() and .catch() subscribers. Allows simple logic to
235
+ * consume the result, like...
236
+ * ```ts
237
+ * const [ winner ] = await Unpromise.race([ promiseA, promiseB ]);
238
+ * if(winner === promiseB){
239
+ * const result = await promiseB;
240
+ * // do the thing
241
+ * }
242
+ * ```
243
+ * */
244
+ static async raceReferences(promises) {
245
+ // map each promise to an eventual 1-tuple containing itself
246
+ const selfPromises = promises.map(resolveSelfTuple);
247
+ // now race them. They will fulfil to a readonly [P] or reject.
248
+ try {
249
+ return await Promise.race(selfPromises);
250
+ }
251
+ finally {
252
+ for (const promise of selfPromises) {
253
+ // unsubscribe proxy promises when the race is over to mitigate memory leaks
254
+ promise.unsubscribe();
255
+ }
256
+ }
257
+ }
258
+ }
259
+ _a = Symbol.toStringTag;
260
+ /** Promises a 1-tuple containing the original promise when it resolves. Allows
261
+ * awaiting the eventual Promise ***reference*** (easy to destructure and
262
+ * exactly compare with ===). Avoids resolving to the Promise ***value*** (which
263
+ * may be ambiguous and therefore hard to identify as the winner of a race).
264
+ * You can call unsubscribe on the Promise to mitigate memory leaks.
265
+ * */
266
+ export function resolveSelfTuple(promise) {
267
+ return Unpromise.proxy(promise).then(() => [promise]);
268
+ }
269
+ /** VENDORED (Future) PROMISE UTILITIES */
270
+ /** Reference implementation of https://github.com/tc39/proposal-promise-with-resolvers */
271
+ function withResolvers() {
272
+ let resolve;
273
+ let reject;
274
+ const promise = new Promise((_resolve, _reject) => {
275
+ resolve = _resolve;
276
+ reject = _reject;
277
+ });
278
+ return {
279
+ promise,
280
+ resolve,
281
+ reject,
282
+ };
283
+ }
284
+ /** IMMUTABLE LIST OPERATIONS */
285
+ function listWithMember(arr, member) {
286
+ return [...arr, member];
287
+ }
288
+ function listWithoutIndex(arr, index) {
289
+ return [...arr.slice(0, index), ...arr.slice(index + 1)];
290
+ }
291
+ function listWithoutMember(arr, member) {
292
+ const index = arr.indexOf(member);
293
+ if (index !== -1) {
294
+ return listWithoutIndex(arr, index);
295
+ }
296
+ return arr;
297
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.4.19",
3
+ "version": "4.4.21",
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",