ccxt 4.2.74 → 4.2.76
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/CHANGELOG.md +206 -10
- package/README.md +10 -9
- package/build.sh +1 -1
- package/dist/ccxt.browser.js +900 -217
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +4 -1
- package/dist/cjs/src/abstract/tradeogre.js +9 -0
- package/dist/cjs/src/ascendex.js +3 -2
- package/dist/cjs/src/binance.js +2 -0
- package/dist/cjs/src/bingx.js +12 -14
- package/dist/cjs/src/bitmart.js +1 -0
- package/dist/cjs/src/bybit.js +2 -1
- package/dist/cjs/src/coinbase.js +18 -2
- package/dist/cjs/src/coinbaseinternational.js +1 -1
- package/dist/cjs/src/coinex.js +4 -3
- package/dist/cjs/src/gate.js +2 -0
- package/dist/cjs/src/htx.js +1 -0
- package/dist/cjs/src/kraken.js +3 -3
- package/dist/cjs/src/kucoin.js +1 -1
- package/dist/cjs/src/pro/coinbaseinternational.js +1 -1
- package/dist/cjs/src/tradeogre.js +632 -0
- package/js/ccxt.d.ts +5 -2
- package/js/ccxt.js +4 -2
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/bingx.d.ts +2 -0
- package/js/src/abstract/tradeogre.d.ts +19 -0
- package/js/src/abstract/tradeogre.js +11 -0
- package/js/src/ascendex.d.ts +2 -7
- package/js/src/ascendex.js +3 -2
- package/js/src/base/Exchange.d.ts +5 -5
- package/js/src/base/types.d.ts +7 -1
- package/js/src/binance.d.ts +1 -1
- package/js/src/binance.js +2 -0
- package/js/src/bingx.js +12 -14
- package/js/src/bitmart.d.ts +1 -1
- package/js/src/bitmart.js +2 -1
- package/js/src/bybit.js +2 -1
- package/js/src/coinbase.d.ts +4 -4
- package/js/src/coinbase.js +18 -2
- package/js/src/coinbaseinternational.d.ts +1 -1
- package/js/src/coinbaseinternational.js +1 -1
- package/js/src/coinbasepro.d.ts +2 -2
- package/js/src/coinex.js +4 -3
- package/js/src/coinlist.d.ts +2 -2
- package/js/src/cryptocom.d.ts +2 -2
- package/js/src/currencycom.d.ts +2 -2
- package/js/src/deribit.d.ts +2 -2
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +2 -0
- package/js/src/htx.d.ts +2 -2
- package/js/src/htx.js +1 -0
- package/js/src/huobijp.d.ts +2 -2
- package/js/src/kraken.d.ts +1 -1
- package/js/src/kraken.js +3 -3
- package/js/src/kucoin.d.ts +3 -3
- package/js/src/kucoin.js +1 -1
- package/js/src/luno.d.ts +2 -2
- package/js/src/mexc.d.ts +3 -3
- package/js/src/ndax.d.ts +2 -2
- package/js/src/novadax.d.ts +2 -2
- package/js/src/okx.d.ts +2 -2
- package/js/src/pro/bitfinex2.d.ts +1 -1
- package/js/src/pro/coinbaseinternational.js +1 -1
- package/js/src/tradeogre.d.ts +32 -0
- package/js/src/tradeogre.js +633 -0
- package/js/src/woo.d.ts +2 -2
- package/package.json +1 -1
- package/skip-tests.json +5 -0
package/js/src/htx.js
CHANGED
|
@@ -6795,6 +6795,7 @@ export default class htx extends Exchange {
|
|
|
6795
6795
|
* @param {int} [since] not used by huobi, but filtered internally by ccxt
|
|
6796
6796
|
* @param {int} [limit] not used by huobi, but filtered internally by ccxt
|
|
6797
6797
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
6798
|
+
* @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)
|
|
6798
6799
|
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
6799
6800
|
*/
|
|
6800
6801
|
if (symbol === undefined) {
|
package/js/src/huobijp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/huobijp.js';
|
|
2
|
-
import type { Balances, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
2
|
+
import type { Account, Balances, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class huobijp
|
|
5
5
|
* @augments Exchange
|
|
@@ -38,7 +38,7 @@ export default class huobijp extends Exchange {
|
|
|
38
38
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
39
39
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
40
40
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
41
|
-
fetchAccounts(params?: {}): Promise<
|
|
41
|
+
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
42
42
|
fetchCurrencies(params?: {}): Promise<{}>;
|
|
43
43
|
parseBalance(response: any): Balances;
|
|
44
44
|
fetchBalance(params?: {}): Promise<Balances>;
|
package/js/src/kraken.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export default class kraken extends Exchange {
|
|
|
112
112
|
};
|
|
113
113
|
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
114
114
|
fetchPositions(symbols?: Strings, params?: {}): Promise<any>;
|
|
115
|
-
|
|
115
|
+
parseAccountType(account: any): string;
|
|
116
116
|
transferOut(code: string, amount: any, params?: {}): Promise<TransferEntry>;
|
|
117
117
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
118
118
|
parseTransfer(transfer: any, currency?: Currency): {
|
package/js/src/kraken.js
CHANGED
|
@@ -2764,7 +2764,7 @@ export default class kraken extends Exchange {
|
|
|
2764
2764
|
// todo unify parsePosition/parsePositions
|
|
2765
2765
|
return result;
|
|
2766
2766
|
}
|
|
2767
|
-
|
|
2767
|
+
parseAccountType(account) {
|
|
2768
2768
|
const accountByType = {
|
|
2769
2769
|
'spot': 'Spot Wallet',
|
|
2770
2770
|
'swap': 'Futures Wallet',
|
|
@@ -2798,8 +2798,8 @@ export default class kraken extends Exchange {
|
|
|
2798
2798
|
*/
|
|
2799
2799
|
await this.loadMarkets();
|
|
2800
2800
|
const currency = this.currency(code);
|
|
2801
|
-
fromAccount = this.
|
|
2802
|
-
toAccount = this.
|
|
2801
|
+
fromAccount = this.parseAccountType(fromAccount);
|
|
2802
|
+
toAccount = this.parseAccountType(toAccount);
|
|
2803
2803
|
const request = {
|
|
2804
2804
|
'amount': this.currencyToPrecision(code, amount),
|
|
2805
2805
|
'from': fromAccount,
|
package/js/src/kucoin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/kucoin.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, OrderType, Order, OHLCV, Trade, Balances, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market, Num } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OrderType, Order, OHLCV, Trade, Balances, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market, Num, Account } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class kucoin
|
|
5
5
|
* @augments Exchange
|
|
@@ -17,7 +17,7 @@ export default class kucoin extends Exchange {
|
|
|
17
17
|
}>;
|
|
18
18
|
fetchMarkets(params?: {}): Promise<any[]>;
|
|
19
19
|
fetchCurrencies(params?: {}): Promise<{}>;
|
|
20
|
-
fetchAccounts(params?: {}): Promise<
|
|
20
|
+
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
21
21
|
fetchTransactionFee(code: string, params?: {}): Promise<{
|
|
22
22
|
info: any;
|
|
23
23
|
withdraw: {};
|
|
@@ -97,7 +97,7 @@ export default class kucoin extends Exchange {
|
|
|
97
97
|
parseTransaction(transaction: any, currency?: Currency): Transaction;
|
|
98
98
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
99
99
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
100
|
-
parseBalanceHelper(entry: any): import("./base/types.js").
|
|
100
|
+
parseBalanceHelper(entry: any): import("./base/types.js").BalanceAccount;
|
|
101
101
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
102
102
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
103
103
|
parseTransfer(transfer: any, currency?: Currency): {
|
package/js/src/kucoin.js
CHANGED
|
@@ -464,7 +464,7 @@ export default class kucoin extends Exchange {
|
|
|
464
464
|
'400006': AuthenticationError,
|
|
465
465
|
'400007': AuthenticationError,
|
|
466
466
|
'400008': NotSupported,
|
|
467
|
-
'400100':
|
|
467
|
+
'400100': InsufficientFunds,
|
|
468
468
|
'400200': InvalidOrder,
|
|
469
469
|
'400350': InvalidOrder,
|
|
470
470
|
'400370': InvalidOrder,
|
package/js/src/luno.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/luno.js';
|
|
2
|
-
import type { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, OHLCV, Num } from './base/types.js';
|
|
2
|
+
import type { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, OHLCV, Num, Account } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class luno
|
|
5
5
|
* @augments Exchange
|
|
@@ -7,7 +7,7 @@ import type { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, Orde
|
|
|
7
7
|
export default class luno extends Exchange {
|
|
8
8
|
describe(): any;
|
|
9
9
|
fetchMarkets(params?: {}): Promise<any[]>;
|
|
10
|
-
fetchAccounts(params?: {}): Promise<
|
|
10
|
+
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
11
11
|
parseBalance(response: any): Balances;
|
|
12
12
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
13
13
|
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
package/js/src/mexc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/mexc.js';
|
|
2
|
-
import type { TransferEntry, IndexType, Int, OrderSide, Balances, OrderType, OHLCV, FundingRateHistory, Position, OrderBook, OrderRequest, FundingHistory, Order, Str, Trade, Transaction, Ticker, Tickers, Strings, Market, Currency, Leverage, Num } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, IndexType, Int, OrderSide, Balances, OrderType, OHLCV, FundingRateHistory, Position, OrderBook, OrderRequest, FundingHistory, Order, Str, Trade, Transaction, Ticker, Tickers, Strings, Market, Currency, Leverage, Num, Account } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class mexc
|
|
5
5
|
* @augments Exchange
|
|
@@ -51,10 +51,10 @@ export default class mexc extends Exchange {
|
|
|
51
51
|
parseOrderStatus(status: any): string;
|
|
52
52
|
parseOrderTimeInForce(status: any): string;
|
|
53
53
|
fetchAccountHelper(type: any, params: any): Promise<any>;
|
|
54
|
-
fetchAccounts(params?: {}): Promise<
|
|
54
|
+
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
55
55
|
fetchTradingFees(params?: {}): Promise<{}>;
|
|
56
56
|
customParseBalance(response: any, marketType: any): Balances;
|
|
57
|
-
parseBalanceHelper(entry: any): import("./base/types.js").
|
|
57
|
+
parseBalanceHelper(entry: any): import("./base/types.js").BalanceAccount;
|
|
58
58
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
59
59
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
60
60
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
package/js/src/ndax.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/ndax.js';
|
|
2
|
-
import type { IndexType, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction, Num } from './base/types.js';
|
|
2
|
+
import type { IndexType, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction, Num, Account } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class ndax
|
|
5
5
|
* @augments Exchange
|
|
@@ -18,7 +18,7 @@ export default class ndax extends Exchange {
|
|
|
18
18
|
fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
19
19
|
parseTrade(trade: any, market?: Market): Trade;
|
|
20
20
|
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
21
|
-
fetchAccounts(params?: {}): Promise<
|
|
21
|
+
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
22
22
|
parseBalance(response: any): Balances;
|
|
23
23
|
fetchBalance(params?: {}): Promise<Balances>;
|
|
24
24
|
parseLedgerEntryType(type: any): string;
|
package/js/src/novadax.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/novadax.js';
|
|
2
|
-
import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, Account } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class novadax
|
|
5
5
|
* @augments Exchange
|
|
@@ -43,7 +43,7 @@ export default class novadax extends Exchange {
|
|
|
43
43
|
};
|
|
44
44
|
parseTransferStatus(status: any): string;
|
|
45
45
|
withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
|
|
46
|
-
fetchAccounts(params?: {}): Promise<
|
|
46
|
+
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
47
47
|
fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
48
48
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
49
49
|
fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
package/js/src/okx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/okx.js';
|
|
2
|
-
import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num } from './base/types.js';
|
|
2
|
+
import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num, Account } from './base/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class okx
|
|
5
5
|
* @augments Exchange
|
|
@@ -19,7 +19,7 @@ export default class okx extends Exchange {
|
|
|
19
19
|
info: any;
|
|
20
20
|
}>;
|
|
21
21
|
fetchTime(params?: {}): Promise<number>;
|
|
22
|
-
fetchAccounts(params?: {}): Promise<
|
|
22
|
+
fetchAccounts(params?: {}): Promise<Account[]>;
|
|
23
23
|
fetchMarkets(params?: {}): Promise<any[]>;
|
|
24
24
|
parseMarket(market: any): Market;
|
|
25
25
|
fetchMarketsByType(type: any, params?: {}): Promise<MarketInterface[]>;
|
|
@@ -20,7 +20,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
20
20
|
handleChecksum(client: Client, message: any, subscription: any): void;
|
|
21
21
|
watchBalance(params?: {}): Promise<Balances>;
|
|
22
22
|
handleBalance(client: Client, message: any, subscription: any): void;
|
|
23
|
-
parseWsBalance(balance: any): import("../base/types.js").
|
|
23
|
+
parseWsBalance(balance: any): import("../base/types.js").BalanceAccount;
|
|
24
24
|
handleSystemStatus(client: Client, message: any): any;
|
|
25
25
|
handleSubscriptionStatus(client: Client, message: any): any;
|
|
26
26
|
authenticate(params?: {}): Promise<any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Market } from '../ccxt.js';
|
|
2
|
+
import Exchange from './abstract/tradeogre.js';
|
|
3
|
+
import type { Int, Num, Order, OrderSide, OrderType, Str, Ticker, IndexType } from './base/types.js';
|
|
4
|
+
/**
|
|
5
|
+
* @class tradeogre
|
|
6
|
+
* @augments Exchange
|
|
7
|
+
*/
|
|
8
|
+
export default class tradeogre extends Exchange {
|
|
9
|
+
describe(): any;
|
|
10
|
+
fetchMarkets(params?: {}): Promise<any[]>;
|
|
11
|
+
fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
12
|
+
parseTicker(ticker: any, market?: Market): Ticker;
|
|
13
|
+
fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<import("./base/types.js").OrderBook>;
|
|
14
|
+
parseBidsAsks(bidasks: any, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): any[];
|
|
15
|
+
fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").Trade[]>;
|
|
16
|
+
parseTrade(trade: any, market?: Market): import("./base/types.js").Trade;
|
|
17
|
+
fetchBalance(params?: {}): Promise<import("./base/types.js").Balances>;
|
|
18
|
+
parseBalance(response: any): import("./base/types.js").Balances;
|
|
19
|
+
createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
|
|
20
|
+
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
21
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order>;
|
|
22
|
+
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
23
|
+
fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
24
|
+
parseOrder(order: any, market?: Market): Order;
|
|
25
|
+
sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
|
|
26
|
+
url: string;
|
|
27
|
+
method: string;
|
|
28
|
+
body: any;
|
|
29
|
+
headers: any;
|
|
30
|
+
};
|
|
31
|
+
handleErrors(code: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
|
|
32
|
+
}
|