ccxt 4.2.42 → 4.2.43

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
@@ -177,7 +177,7 @@ var woo$1 = require('./src/pro/woo.js');
177
177
 
178
178
  //-----------------------------------------------------------------------------
179
179
  // this is updated by vss.js when building
180
- const version = '4.2.42';
180
+ const version = '4.2.43';
181
181
  Exchange["default"].ccxtVersion = version;
182
182
  const exchanges = {
183
183
  'ace': ace,
@@ -1942,6 +1942,15 @@ class Exchange {
1942
1942
  async setPositionMode(hedged, symbol = undefined, params = {}) {
1943
1943
  throw new errors.NotSupported(this.id + ' setPositionMode() is not supported yet');
1944
1944
  }
1945
+ async addMargin(symbol, amount, params = {}) {
1946
+ throw new errors.NotSupported(this.id + ' addMargin() is not supported yet');
1947
+ }
1948
+ async reduceMargin(symbol, amount, params = {}) {
1949
+ throw new errors.NotSupported(this.id + ' reduceMargin() is not supported yet');
1950
+ }
1951
+ async setMargin(symbol, amount, params = {}) {
1952
+ throw new errors.NotSupported(this.id + ' setMargin() is not supported yet');
1953
+ }
1945
1954
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
1946
1955
  throw new errors.NotSupported(this.id + ' setMarginMode() is not supported yet');
1947
1956
  }
@@ -6212,8 +6212,9 @@ class binance extends binance$1 {
6212
6212
  * @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)
6213
6213
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
6214
6214
  */
6215
- const orders = await this.fetchOrders(symbol, since, limit, params);
6216
- return this.filterBy(orders, 'status', 'closed');
6215
+ const orders = await this.fetchOrders(symbol, since, undefined, params);
6216
+ const filteredOrders = this.filterBy(orders, 'status', 'closed');
6217
+ return this.filterBySinceLimit(filteredOrders, since, limit);
6217
6218
  }
6218
6219
  async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
6219
6220
  /**
@@ -10,7 +10,7 @@ class binanceus extends binance {
10
10
  // eslint-disable-next-line new-cap
11
11
  const restInstance = new binanceus$1();
12
12
  const restDescribe = restInstance.describe();
13
- const extended = this.deepExtend(super.describe(), restDescribe);
13
+ const extended = this.deepExtend(restDescribe, super.describe());
14
14
  return this.deepExtend(extended, {
15
15
  'id': 'binanceus',
16
16
  'name': 'Binance US',
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 { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, Greeks } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
7
- declare const version = "4.2.41";
7
+ declare const version = "4.2.42";
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, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.2.42';
41
+ const version = '4.2.43';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -640,6 +640,9 @@ export default class Exchange {
640
640
  setLeverage(leverage: Int, symbol?: string, params?: {}): Promise<{}>;
641
641
  fetchLeverage(symbol: string, params?: {}): Promise<{}>;
642
642
  setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<{}>;
643
+ addMargin(symbol: string, amount: number, params?: {}): Promise<{}>;
644
+ reduceMargin(symbol: string, amount: number, params?: {}): Promise<{}>;
645
+ setMargin(symbol: string, amount: number, params?: {}): Promise<{}>;
643
646
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<{}>;
644
647
  fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
645
648
  fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OpenInterest[]>;
@@ -1938,6 +1938,15 @@ export default class Exchange {
1938
1938
  async setPositionMode(hedged, symbol = undefined, params = {}) {
1939
1939
  throw new NotSupported(this.id + ' setPositionMode() is not supported yet');
1940
1940
  }
1941
+ async addMargin(symbol, amount, params = {}) {
1942
+ throw new NotSupported(this.id + ' addMargin() is not supported yet');
1943
+ }
1944
+ async reduceMargin(symbol, amount, params = {}) {
1945
+ throw new NotSupported(this.id + ' reduceMargin() is not supported yet');
1946
+ }
1947
+ async setMargin(symbol, amount, params = {}) {
1948
+ throw new NotSupported(this.id + ' setMargin() is not supported yet');
1949
+ }
1941
1950
  async setMarginMode(marginMode, symbol = undefined, params = {}) {
1942
1951
  throw new NotSupported(this.id + ' setMarginMode() is not supported yet');
1943
1952
  }
package/js/src/binance.js CHANGED
@@ -6215,8 +6215,9 @@ export default class binance extends Exchange {
6215
6215
  * @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)
6216
6216
  * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
6217
6217
  */
6218
- const orders = await this.fetchOrders(symbol, since, limit, params);
6219
- return this.filterBy(orders, 'status', 'closed');
6218
+ const orders = await this.fetchOrders(symbol, since, undefined, params);
6219
+ const filteredOrders = this.filterBy(orders, 'status', 'closed');
6220
+ return this.filterBySinceLimit(filteredOrders, since, limit);
6220
6221
  }
6221
6222
  async fetchCanceledOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
6222
6223
  /**
package/js/src/bingx.d.ts CHANGED
@@ -108,7 +108,7 @@ export default class bingx extends Exchange {
108
108
  parseTransaction(transaction: any, currency?: Currency): Transaction;
109
109
  parseTransactionStatus(status: any): string;
110
110
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
111
- setMargin(symbol: string, amount: any, params?: {}): Promise<any>;
111
+ setMargin(symbol: string, amount: number, params?: {}): Promise<any>;
112
112
  fetchLeverage(symbol: string, params?: {}): Promise<any>;
113
113
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
114
114
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
@@ -154,7 +154,7 @@ export default class bitfinex2 extends Exchange {
154
154
  parseOpenInterest(interest: any, market?: Market): OpenInterest;
155
155
  fetchLiquidations(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Liquidation[]>;
156
156
  parseLiquidation(liquidation: any, market?: Market): Liquidation;
157
- setMargin(symbol: string, amount: any, params?: {}): Promise<{
157
+ setMargin(symbol: string, amount: number, params?: {}): Promise<{
158
158
  info: any;
159
159
  type: any;
160
160
  amount: any;
@@ -81,7 +81,7 @@ export default class bitrue extends Exchange {
81
81
  symbol: any;
82
82
  status: any;
83
83
  };
84
- setMargin(symbol: string, amount: any, params?: {}): Promise<{
84
+ setMargin(symbol: string, amount: number, params?: {}): Promise<{
85
85
  info: any;
86
86
  type: any;
87
87
  amount: any;
@@ -62,7 +62,7 @@ export default class coinbasepro extends Exchange {
62
62
  fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
63
63
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
64
64
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
65
- parseTransactionStatus(transaction: any): "ok" | "canceled" | "failed" | "pending";
65
+ parseTransactionStatus(transaction: any): "ok" | "failed" | "canceled" | "pending";
66
66
  parseTransaction(transaction: any, currency?: Currency): Transaction;
67
67
  createDepositAddress(code: string, params?: {}): Promise<{
68
68
  currency: string;
@@ -99,7 +99,7 @@ export default class phemex extends Exchange {
99
99
  previousFundingTimestamp: any;
100
100
  previousFundingDatetime: any;
101
101
  };
102
- setMargin(symbol: string, amount: any, params?: {}): Promise<any>;
102
+ setMargin(symbol: string, amount: number, params?: {}): Promise<any>;
103
103
  parseMarginStatus(status: any): string;
104
104
  parseMarginModification(data: any, market?: Market): {
105
105
  info: any;
@@ -13,7 +13,7 @@ export default class binanceus extends binance {
13
13
  // eslint-disable-next-line new-cap
14
14
  const restInstance = new binanceusRest();
15
15
  const restDescribe = restInstance.describe();
16
- const extended = this.deepExtend(super.describe(), restDescribe);
16
+ const extended = this.deepExtend(restDescribe, super.describe());
17
17
  return this.deepExtend(extended, {
18
18
  'id': 'binanceus',
19
19
  'name': 'Binance US',
@@ -15,7 +15,7 @@ export declare class BigInteger {
15
15
  protected intValue(): number;
16
16
  protected byteValue(): number;
17
17
  protected shortValue(): number;
18
- protected signum(): 1 | 0 | -1;
18
+ protected signum(): 0 | 1 | -1;
19
19
  toByteArray(): number[];
20
20
  protected equals(a: BigInteger): boolean;
21
21
  protected min(a: BigInteger): BigInteger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.42",
3
+ "version": "4.2.43",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",