ccxt 4.3.67 → 4.3.69
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/README.md +5 -5
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +364 -356
- package/dist/cjs/src/base/functions/type.js +2 -2
- package/dist/cjs/src/bingx.js +463 -217
- package/dist/cjs/src/bitget.js +4 -2
- package/dist/cjs/src/btcbox.js +2 -1
- package/dist/cjs/src/coinbaseinternational.js +79 -1
- package/dist/cjs/src/hyperliquid.js +0 -3
- package/dist/cjs/src/kucoin.js +12 -5
- package/dist/cjs/src/oxfun.js +2 -2
- package/dist/cjs/src/poloniex.js +33 -33
- package/dist/cjs/src/poloniexfutures.js +26 -26
- package/dist/cjs/src/pro/krakenfutures.js +7 -6
- package/dist/cjs/src/pro/poloniex.js +13 -13
- package/dist/cjs/src/pro/poloniexfutures.js +5 -5
- package/js/ccxt.d.ts +3 -3
- package/js/ccxt.js +1 -1
- package/js/src/base/Exchange.d.ts +107 -82
- package/js/src/base/Exchange.js +364 -356
- package/js/src/base/functions/type.js +2 -2
- package/js/src/base/types.d.ts +0 -2
- package/js/src/binance.d.ts +2 -2
- package/js/src/bingx.d.ts +4 -2
- package/js/src/bingx.js +463 -217
- package/js/src/bitget.d.ts +2 -2
- package/js/src/bitget.js +4 -2
- package/js/src/bitmart.d.ts +2 -2
- package/js/src/bitrue.d.ts +2 -2
- package/js/src/btcbox.js +2 -1
- package/js/src/bybit.d.ts +2 -2
- package/js/src/coinbaseinternational.d.ts +11 -0
- package/js/src/coinbaseinternational.js +79 -1
- package/js/src/coinex.d.ts +2 -2
- package/js/src/coinlist.d.ts +2 -2
- package/js/src/deribit.d.ts +2 -2
- package/js/src/digifinex.d.ts +2 -2
- package/js/src/hyperliquid.js +0 -3
- package/js/src/kucoin.js +12 -5
- package/js/src/latoken.d.ts +2 -2
- package/js/src/mexc.d.ts +2 -2
- package/js/src/okx.d.ts +2 -2
- package/js/src/oxfun.d.ts +1 -1
- package/js/src/oxfun.js +2 -2
- package/js/src/phemex.d.ts +2 -2
- package/js/src/poloniex.js +33 -33
- package/js/src/poloniexfutures.js +26 -26
- package/js/src/pro/krakenfutures.js +7 -6
- package/js/src/pro/poloniex.js +13 -13
- package/js/src/pro/poloniexfutures.js +5 -5
- package/js/src/woo.d.ts +2 -2
- package/package.json +1 -1
- package/js/src/coinbaseprime.d.ts +0 -4
- package/js/src/coinbaseprime.js +0 -32
- package/js/src/pro/coinbaseprime.d.ts +0 -4
- package/js/src/pro/coinbaseprime.js +0 -33
- package/js/src/pro/huobipro.d.ts +0 -4
- package/js/src/pro/huobipro.js +0 -17
- package/js/src/pro/mexc3.d.ts +0 -4
- package/js/src/pro/mexc3.js +0 -17
- package/js/src/pro/okex.d.ts +0 -4
- package/js/src/pro/okex.js +0 -17
|
@@ -76,17 +76,17 @@ class krakenfutures extends krakenfutures$1 {
|
|
|
76
76
|
const url = this.urls['api']['ws'];
|
|
77
77
|
const messageHash = 'challenge';
|
|
78
78
|
const client = this.client(url);
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
const future = client.future(messageHash);
|
|
80
|
+
const authenticated = this.safeValue(client.subscriptions, messageHash);
|
|
81
|
+
if (authenticated === undefined) {
|
|
81
82
|
const request = {
|
|
82
83
|
'event': 'challenge',
|
|
83
84
|
'api_key': this.apiKey,
|
|
84
85
|
};
|
|
85
86
|
const message = this.extend(request, params);
|
|
86
|
-
|
|
87
|
-
client.subscriptions[messageHash] = future;
|
|
87
|
+
this.watch(url, messageHash, message, messageHash);
|
|
88
88
|
}
|
|
89
|
-
return future;
|
|
89
|
+
return await future;
|
|
90
90
|
}
|
|
91
91
|
async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
|
|
92
92
|
/**
|
|
@@ -1572,7 +1572,8 @@ class krakenfutures extends krakenfutures$1 {
|
|
|
1572
1572
|
const signature = this.hmac(hashedChallenge, base64Secret, sha512.sha512, 'base64');
|
|
1573
1573
|
this.options['challenge'] = challenge;
|
|
1574
1574
|
this.options['signedChallenge'] = signature;
|
|
1575
|
-
client.
|
|
1575
|
+
const future = this.safeValue(client.futures, messageHash);
|
|
1576
|
+
future.resolve(true);
|
|
1576
1577
|
}
|
|
1577
1578
|
else {
|
|
1578
1579
|
const error = new errors.AuthenticationError(this.id + ' ' + this.json(message));
|
|
@@ -78,7 +78,7 @@ class poloniex extends poloniex$1 {
|
|
|
78
78
|
* @ignore
|
|
79
79
|
* @method
|
|
80
80
|
* @description authenticates the user to access private web socket channels
|
|
81
|
-
* @see https://docs.poloniex.com
|
|
81
|
+
* @see https://api-docs.poloniex.com/spot/websocket/authentication
|
|
82
82
|
* @returns {object} response from exchange
|
|
83
83
|
*/
|
|
84
84
|
this.checkRequiredCredentials();
|
|
@@ -184,7 +184,7 @@ class poloniex extends poloniex$1 {
|
|
|
184
184
|
/**
|
|
185
185
|
* @method
|
|
186
186
|
* @name poloniex#createOrderWs
|
|
187
|
-
* @see https://docs.poloniex.com
|
|
187
|
+
* @see https://api-docs.poloniex.com/spot/websocket/trade-request#create-order
|
|
188
188
|
* @description create a trade order
|
|
189
189
|
* @param {string} symbol unified symbol of the market to create an order in
|
|
190
190
|
* @param {string} type 'market' or 'limit'
|
|
@@ -254,7 +254,7 @@ class poloniex extends poloniex$1 {
|
|
|
254
254
|
/**
|
|
255
255
|
* @method
|
|
256
256
|
* @name poloniex#cancelOrderWs
|
|
257
|
-
* @see https://docs.poloniex.com
|
|
257
|
+
* @see https://api-docs.poloniex.com/spot/websocket/trade-request#cancel-multiple-orders
|
|
258
258
|
* @description cancel multiple orders
|
|
259
259
|
* @param {string} id order id
|
|
260
260
|
* @param {string} [symbol] unified market symbol
|
|
@@ -273,7 +273,7 @@ class poloniex extends poloniex$1 {
|
|
|
273
273
|
/**
|
|
274
274
|
* @method
|
|
275
275
|
* @name poloniex#cancelOrdersWs
|
|
276
|
-
* @see https://docs.poloniex.com
|
|
276
|
+
* @see https://api-docs.poloniex.com/spot/websocket/trade-request#cancel-multiple-orders
|
|
277
277
|
* @description cancel multiple orders
|
|
278
278
|
* @param {string[]} ids order ids
|
|
279
279
|
* @param {string} symbol unified market symbol, default is undefined
|
|
@@ -292,7 +292,7 @@ class poloniex extends poloniex$1 {
|
|
|
292
292
|
/**
|
|
293
293
|
* @method
|
|
294
294
|
* @name poloniex#cancelAllOrdersWs
|
|
295
|
-
* @see https://docs.poloniex.com
|
|
295
|
+
* @see https://api-docs.poloniex.com/spot/websocket/trade-request#cancel-all-orders
|
|
296
296
|
* @description cancel all open orders of a type. Only applicable to Option in Portfolio Margin mode, and MMP privilege is required.
|
|
297
297
|
* @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
|
|
298
298
|
* @param {object} [params] extra parameters specific to the poloniex api endpoint
|
|
@@ -329,7 +329,7 @@ class poloniex extends poloniex$1 {
|
|
|
329
329
|
* @method
|
|
330
330
|
* @name poloniex#watchOHLCV
|
|
331
331
|
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
332
|
-
* @see https://docs.poloniex.com
|
|
332
|
+
* @see https://api-docs.poloniex.com/spot/websocket/market-data#candlesticks
|
|
333
333
|
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
334
334
|
* @param {string} timeframe the length of time each candle represents
|
|
335
335
|
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
@@ -354,7 +354,7 @@ class poloniex extends poloniex$1 {
|
|
|
354
354
|
* @method
|
|
355
355
|
* @name poloniex#watchTicker
|
|
356
356
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
357
|
-
* @see https://docs.poloniex.com
|
|
357
|
+
* @see https://api-docs.poloniex.com/spot/websocket/market-data#ticker
|
|
358
358
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
359
359
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
360
360
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -369,7 +369,7 @@ class poloniex extends poloniex$1 {
|
|
|
369
369
|
* @method
|
|
370
370
|
* @name poloniex#watchTicker
|
|
371
371
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
372
|
-
* @see https://docs.poloniex.com
|
|
372
|
+
* @see https://api-docs.poloniex.com/spot/websocket/market-data#ticker
|
|
373
373
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
374
374
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
375
375
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -388,7 +388,7 @@ class poloniex extends poloniex$1 {
|
|
|
388
388
|
* @method
|
|
389
389
|
* @name poloniex#watchTrades
|
|
390
390
|
* @description get the list of most recent trades for a particular symbol
|
|
391
|
-
* @see https://docs.poloniex.com
|
|
391
|
+
* @see https://api-docs.poloniex.com/spot/websocket/market-data#trades
|
|
392
392
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
393
393
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
394
394
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -409,7 +409,7 @@ class poloniex extends poloniex$1 {
|
|
|
409
409
|
* @method
|
|
410
410
|
* @name poloniex#watchOrderBook
|
|
411
411
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
412
|
-
* @see https://docs.poloniex.com
|
|
412
|
+
* @see https://api-docs.poloniex.com/spot/websocket/market-data#book-level-2
|
|
413
413
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
414
414
|
* @param {int} [limit] not used by poloniex watchOrderBook
|
|
415
415
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -427,7 +427,7 @@ class poloniex extends poloniex$1 {
|
|
|
427
427
|
* @method
|
|
428
428
|
* @name poloniex#watchOrders
|
|
429
429
|
* @description watches information on multiple orders made by the user
|
|
430
|
-
* @see https://docs.poloniex.com
|
|
430
|
+
* @see https://api-docs.poloniex.com/spot/websocket/order
|
|
431
431
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
432
432
|
* @param {int} [since] not used by poloniex watchOrders
|
|
433
433
|
* @param {int} [limit] not used by poloniex watchOrders
|
|
@@ -452,7 +452,7 @@ class poloniex extends poloniex$1 {
|
|
|
452
452
|
* @method
|
|
453
453
|
* @name poloniex#watchMyTrades
|
|
454
454
|
* @description watches information on multiple trades made by the user using orders stream
|
|
455
|
-
* @see https://docs.poloniex.com
|
|
455
|
+
* @see https://api-docs.poloniex.com/spot/websocket/order
|
|
456
456
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
457
457
|
* @param {int} [since] not used by poloniex watchMyTrades
|
|
458
458
|
* @param {int} [limit] not used by poloniex watchMyTrades
|
|
@@ -478,7 +478,7 @@ class poloniex extends poloniex$1 {
|
|
|
478
478
|
* @method
|
|
479
479
|
* @name poloniex#watchBalance
|
|
480
480
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
481
|
-
* @see https://docs.poloniex.com
|
|
481
|
+
* @see https://api-docs.poloniex.com/spot/websocket/balance
|
|
482
482
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
483
483
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
484
484
|
*/
|
|
@@ -239,7 +239,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
239
239
|
* @method
|
|
240
240
|
* @name poloniexfutures#watchTicker
|
|
241
241
|
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
242
|
-
* @see https://
|
|
242
|
+
* @see https://api-docs.poloniex.com/futures/websocket/public#get-real-time-symbol-ticker
|
|
243
243
|
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
244
244
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
245
245
|
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
@@ -254,7 +254,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
254
254
|
* @method
|
|
255
255
|
* @name poloniexfutures#watchTrades
|
|
256
256
|
* @description get the list of most recent trades for a particular symbol
|
|
257
|
-
* @see https://
|
|
257
|
+
* @see https://api-docs.poloniex.com/futures/websocket/public#full-matching-engine-datalevel-3
|
|
258
258
|
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
259
259
|
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
260
260
|
* @param {int} [limit] the maximum amount of trades to fetch
|
|
@@ -277,7 +277,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
277
277
|
* @method
|
|
278
278
|
* @name poloniexfutures#watchOrderBook
|
|
279
279
|
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
280
|
-
* @see https://
|
|
280
|
+
* @see https://api-docs.poloniex.com/futures/websocket/public#level-2-market-data
|
|
281
281
|
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
282
282
|
* @param {int} [limit] not used by poloniexfutures watchOrderBook
|
|
283
283
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
@@ -307,7 +307,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
307
307
|
* @method
|
|
308
308
|
* @name poloniexfutures#watchOrders
|
|
309
309
|
* @description watches information on multiple orders made by the user
|
|
310
|
-
* @see https://
|
|
310
|
+
* @see https://api-docs.poloniex.com/futures/websocket/user-messages#private-messages
|
|
311
311
|
* @param {string} symbol filter by unified market symbol of the market orders were made in
|
|
312
312
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
313
313
|
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
@@ -334,7 +334,7 @@ class poloniexfutures extends poloniexfutures$1 {
|
|
|
334
334
|
* @method
|
|
335
335
|
* @name poloniexfutures#watchBalance
|
|
336
336
|
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
337
|
-
* @see https://
|
|
337
|
+
* @see https://api-docs.poloniex.com/futures/websocket/user-messages#account-balance-events
|
|
338
338
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
339
339
|
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
|
|
340
340
|
*/
|
package/js/ccxt.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { Exchange } from './src/base/Exchange.js';
|
|
|
2
2
|
import { Precise } from './src/base/Precise.js';
|
|
3
3
|
import * as functions from './src/base/functions.js';
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
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,
|
|
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.
|
|
7
|
+
declare const version = "4.3.68";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -546,5 +546,5 @@ declare const ccxt: {
|
|
|
546
546
|
zaif: typeof zaif;
|
|
547
547
|
zonda: typeof zonda;
|
|
548
548
|
} & typeof functions & typeof errors;
|
|
549
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, 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, 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,
|
|
549
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, 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, 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, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitteam, bitvavo, bl3p, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, htx, huobi, huobijp, hyperliquid, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, luno, lykke, mercado, mexc, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
550
550
|
export default ccxt;
|
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.
|
|
41
|
+
const version = '4.3.69';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -3,7 +3,7 @@ import { // eslint-disable-line object-curly-newline
|
|
|
3
3
|
ExchangeError, AuthenticationError, DDoSProtection, RequestTimeout, ExchangeNotAvailable, RateLimitExceeded } from "./errors.js";
|
|
4
4
|
import WsClient from './ws/WsClient.js';
|
|
5
5
|
import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ws/OrderBook.js';
|
|
6
|
-
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CancellationRequest, IsolatedBorrowRate, IsolatedBorrowRates, CrossBorrowRates, CrossBorrowRate, Dict,
|
|
6
|
+
import type { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRate, DepositWithdrawFeeNetwork, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CancellationRequest, IsolatedBorrowRate, IsolatedBorrowRates, CrossBorrowRates, CrossBorrowRate, Dict, FundingRates, LeverageTiers, Bool, int } from './types.js';
|
|
7
7
|
export type { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, Bool, OrderType, OrderSide, Position, LedgerEntry, BorrowInterest, OpenInterest, LeverageTier, TransferEntry, CrossBorrowRate, FundingRateHistory, Liquidation, FundingHistory, OrderRequest, MarginMode, Tickers, Greeks, Option, OptionChain, Str, Num, MarketInterface, CurrencyInterface, BalanceAccount, MarginModes, MarketType, Leverage, Leverages, LastPrice, LastPrices, Account, Strings, Conversion } from './types.js';
|
|
8
8
|
import { ArrayCache, ArrayCacheByTimestamp } from './ws/Cache.js';
|
|
9
9
|
import { OrderBook as Ob } from './ws/OrderBook.js';
|
|
@@ -18,6 +18,9 @@ export default class Exchange {
|
|
|
18
18
|
throttleProp: any;
|
|
19
19
|
sleep: (ms: any) => Promise<unknown>;
|
|
20
20
|
api: any;
|
|
21
|
+
certified: boolean;
|
|
22
|
+
pro: boolean;
|
|
23
|
+
countries: Str[];
|
|
21
24
|
proxy: any;
|
|
22
25
|
proxyUrl: string;
|
|
23
26
|
proxy_url: string;
|
|
@@ -104,8 +107,11 @@ export default class Exchange {
|
|
|
104
107
|
requiresWeb3: boolean;
|
|
105
108
|
requiresEddsa: boolean;
|
|
106
109
|
precision: {
|
|
107
|
-
amount:
|
|
108
|
-
price:
|
|
110
|
+
amount: Num;
|
|
111
|
+
price: Num;
|
|
112
|
+
cost?: Num;
|
|
113
|
+
base?: Num;
|
|
114
|
+
quote?: Num;
|
|
109
115
|
};
|
|
110
116
|
enableLastJsonResponse: boolean;
|
|
111
117
|
enableLastHttpResponse: boolean;
|
|
@@ -120,18 +126,23 @@ export default class Exchange {
|
|
|
120
126
|
id: string;
|
|
121
127
|
markets: Dictionary<any>;
|
|
122
128
|
has: Dictionary<boolean | 'emulated'>;
|
|
123
|
-
status:
|
|
129
|
+
status: {
|
|
130
|
+
status: Str;
|
|
131
|
+
updated: Num;
|
|
132
|
+
eta: Num;
|
|
133
|
+
url: Str;
|
|
134
|
+
info: any;
|
|
135
|
+
};
|
|
124
136
|
requiredCredentials: {
|
|
125
|
-
apiKey:
|
|
126
|
-
secret:
|
|
127
|
-
uid:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
token: boolean;
|
|
137
|
+
apiKey: Bool;
|
|
138
|
+
secret: Bool;
|
|
139
|
+
uid: Bool;
|
|
140
|
+
login: Bool;
|
|
141
|
+
password: Bool;
|
|
142
|
+
twofa: Bool;
|
|
143
|
+
privateKey: Bool;
|
|
144
|
+
walletAddress: Bool;
|
|
145
|
+
token: Bool;
|
|
135
146
|
};
|
|
136
147
|
rateLimit: Num;
|
|
137
148
|
tokenBucket: any;
|
|
@@ -144,7 +155,20 @@ export default class Exchange {
|
|
|
144
155
|
leverage?: MinMax;
|
|
145
156
|
price?: MinMax;
|
|
146
157
|
};
|
|
147
|
-
fees:
|
|
158
|
+
fees: {
|
|
159
|
+
trading: {
|
|
160
|
+
tierBased: Bool;
|
|
161
|
+
percentage: Bool;
|
|
162
|
+
taker: Num;
|
|
163
|
+
maker: Num;
|
|
164
|
+
};
|
|
165
|
+
funding: {
|
|
166
|
+
tierBased: Bool;
|
|
167
|
+
percentage: Bool;
|
|
168
|
+
withdraw: {};
|
|
169
|
+
deposit: {};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
148
172
|
markets_by_id: Dictionary<any>;
|
|
149
173
|
symbols: string[];
|
|
150
174
|
ids: string[];
|
|
@@ -284,12 +308,78 @@ export default class Exchange {
|
|
|
284
308
|
crc32: typeof functions.crc32;
|
|
285
309
|
packb: typeof functions.packb;
|
|
286
310
|
urlencodeBase64: (payload: string | Uint8Array) => string;
|
|
311
|
+
constructor(userConfig?: {});
|
|
312
|
+
encodeURIComponent(...args: any[]): string;
|
|
313
|
+
checkRequiredVersion(requiredVersion: any, error?: boolean): boolean;
|
|
314
|
+
checkAddress(address: any): any;
|
|
315
|
+
initRestRateLimiter(): void;
|
|
316
|
+
throttle(cost?: any): any;
|
|
317
|
+
defineRestApiEndpoint(methodName: any, uppercaseMethod: any, lowercaseMethod: any, camelcaseMethod: any, path: any, paths: any, config?: {}): void;
|
|
318
|
+
defineRestApi(api: any, methodName: any, paths?: any[]): void;
|
|
319
|
+
log(...args: any[]): void;
|
|
320
|
+
httpProxyAgentModule: any;
|
|
321
|
+
httpsProxyAgentModule: any;
|
|
322
|
+
socksProxyAgentModule: any;
|
|
323
|
+
socksProxyAgentModuleChecked: boolean;
|
|
324
|
+
proxyDictionaries: any;
|
|
325
|
+
proxiesModulesLoading: Promise<any>;
|
|
326
|
+
loadProxyModules(): Promise<any>;
|
|
327
|
+
setProxyAgents(httpProxy: any, httpsProxy: any, socksProxy: any): any;
|
|
328
|
+
loadHttpProxyAgent(): Promise<any>;
|
|
329
|
+
getHttpAgentIfNeeded(url: any): any;
|
|
330
|
+
fetch(url: any, method?: string, headers?: any, body?: any): Promise<any>;
|
|
331
|
+
parseJson(jsonString: any): any;
|
|
332
|
+
getResponseHeaders(response: any): {};
|
|
333
|
+
handleRestResponse(response: any, url: any, method?: string, requestHeaders?: any, requestBody?: any): any;
|
|
334
|
+
onRestResponse(statusCode: any, statusText: any, url: any, method: any, responseHeaders: any, responseBody: any, requestHeaders: any, requestBody: any): any;
|
|
335
|
+
onJsonResponse(responseBody: any): any;
|
|
336
|
+
loadMarketsHelper(reload?: boolean, params?: {}): Promise<Dictionary<any>>;
|
|
337
|
+
loadMarkets(reload?: boolean, params?: {}): Promise<Dictionary<Market>>;
|
|
338
|
+
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
339
|
+
fetchCurrenciesWs(params?: {}): Promise<unknown>;
|
|
340
|
+
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
341
|
+
fetchMarketsWs(params?: {}): Promise<Market[]>;
|
|
342
|
+
checkRequiredDependencies(): void;
|
|
343
|
+
parseNumber(value: any, d?: Num): number;
|
|
344
|
+
checkOrderArguments(market: any, type: any, side: any, amount: any, price: any, params: any): void;
|
|
345
|
+
handleHttpStatusCode(code: any, reason: any, url: any, method: any, body: any): void;
|
|
346
|
+
remove0xPrefix(hexData: any): any;
|
|
347
|
+
spawn(method: any, ...args: any[]): import("./ws/Future.js").FutureInterface;
|
|
348
|
+
delay(timeout: any, method: any, ...args: any[]): void;
|
|
349
|
+
orderBook(snapshot?: {}, depth?: number): WsOrderBook;
|
|
350
|
+
indexedOrderBook(snapshot?: {}, depth?: number): IndexedOrderBook;
|
|
351
|
+
countedOrderBook(snapshot?: {}, depth?: number): CountedOrderBook;
|
|
352
|
+
handleMessage(client: any, message: any): void;
|
|
353
|
+
ping(client: Client): any;
|
|
354
|
+
client(url: string): WsClient;
|
|
355
|
+
watchMultiple(url: string, messageHashes: string[], message?: any, subscribeHashes?: any, subscription?: any): import("./ws/Future.js").FutureInterface;
|
|
356
|
+
watch(url: string, messageHash: string, message?: any, subscribeHash?: any, subscription?: any): any;
|
|
357
|
+
onConnected(client: any, message?: any): void;
|
|
358
|
+
onError(client: any, error: any): void;
|
|
359
|
+
onClose(client: any, error: any): void;
|
|
360
|
+
close(): Promise<void>;
|
|
361
|
+
loadOrderBook(client: any, messageHash: string, symbol: string, limit?: Int, params?: {}): Promise<void>;
|
|
362
|
+
convertToBigInt(value: string): bigint;
|
|
363
|
+
stringToCharsArray(value: string): string[];
|
|
364
|
+
valueIsDefined(value: any): boolean;
|
|
365
|
+
arraySlice(array: any, first: any, second?: any): any;
|
|
366
|
+
getProperty(obj: any, property: any, defaultValue?: any): any;
|
|
367
|
+
setProperty(obj: any, property: any, defaultValue?: any): void;
|
|
368
|
+
axolotl(payload: any, hexKey: any, ed25519: any): string;
|
|
369
|
+
fixStringifiedJsonMembers(content: string): any;
|
|
370
|
+
ethAbiEncode(types: any, args: any): Uint8Array;
|
|
371
|
+
ethEncodeStructuredData(domain: any, messageTypes: any, messageData: any): Uint8Array;
|
|
372
|
+
intToBase16(elem: any): string;
|
|
373
|
+
extendExchangeOptions(newOptions: Dict): void;
|
|
374
|
+
createSafeDictionary(): {};
|
|
375
|
+
randomBytes(length: number): string;
|
|
287
376
|
describe(): {
|
|
288
377
|
id: any;
|
|
289
378
|
name: any;
|
|
290
379
|
countries: any;
|
|
291
380
|
enableRateLimit: boolean;
|
|
292
381
|
rateLimit: number;
|
|
382
|
+
timeout: number;
|
|
293
383
|
certified: boolean;
|
|
294
384
|
pro: boolean;
|
|
295
385
|
alias: boolean;
|
|
@@ -607,71 +697,6 @@ export default class Exchange {
|
|
|
607
697
|
};
|
|
608
698
|
};
|
|
609
699
|
};
|
|
610
|
-
constructor(userConfig?: {});
|
|
611
|
-
encodeURIComponent(...args: any[]): string;
|
|
612
|
-
checkRequiredVersion(requiredVersion: any, error?: boolean): boolean;
|
|
613
|
-
checkAddress(address: any): any;
|
|
614
|
-
initRestRateLimiter(): void;
|
|
615
|
-
throttle(cost?: any): any;
|
|
616
|
-
defineRestApiEndpoint(methodName: any, uppercaseMethod: any, lowercaseMethod: any, camelcaseMethod: any, path: any, paths: any, config?: {}): void;
|
|
617
|
-
defineRestApi(api: any, methodName: any, paths?: any[]): void;
|
|
618
|
-
log(...args: any[]): void;
|
|
619
|
-
httpProxyAgentModule: any;
|
|
620
|
-
httpsProxyAgentModule: any;
|
|
621
|
-
socksProxyAgentModule: any;
|
|
622
|
-
socksProxyAgentModuleChecked: boolean;
|
|
623
|
-
proxyDictionaries: any;
|
|
624
|
-
proxiesModulesLoading: Promise<any>;
|
|
625
|
-
loadProxyModules(): Promise<any>;
|
|
626
|
-
setProxyAgents(httpProxy: any, httpsProxy: any, socksProxy: any): any;
|
|
627
|
-
loadHttpProxyAgent(): Promise<any>;
|
|
628
|
-
getHttpAgentIfNeeded(url: any): any;
|
|
629
|
-
fetch(url: any, method?: string, headers?: any, body?: any): Promise<any>;
|
|
630
|
-
parseJson(jsonString: any): any;
|
|
631
|
-
getResponseHeaders(response: any): {};
|
|
632
|
-
handleRestResponse(response: any, url: any, method?: string, requestHeaders?: any, requestBody?: any): any;
|
|
633
|
-
onRestResponse(statusCode: any, statusText: any, url: any, method: any, responseHeaders: any, responseBody: any, requestHeaders: any, requestBody: any): any;
|
|
634
|
-
onJsonResponse(responseBody: any): any;
|
|
635
|
-
loadMarketsHelper(reload?: boolean, params?: {}): Promise<Dictionary<any>>;
|
|
636
|
-
loadMarkets(reload?: boolean, params?: {}): Promise<Dictionary<Market>>;
|
|
637
|
-
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
638
|
-
fetchCurrenciesWs(params?: {}): Promise<unknown>;
|
|
639
|
-
fetchMarkets(params?: {}): Promise<Market[]>;
|
|
640
|
-
fetchMarketsWs(params?: {}): Promise<Market[]>;
|
|
641
|
-
checkRequiredDependencies(): void;
|
|
642
|
-
parseNumber(value: any, d?: Num): number;
|
|
643
|
-
checkOrderArguments(market: any, type: any, side: any, amount: any, price: any, params: any): void;
|
|
644
|
-
handleHttpStatusCode(code: any, reason: any, url: any, method: any, body: any): void;
|
|
645
|
-
remove0xPrefix(hexData: any): any;
|
|
646
|
-
spawn(method: any, ...args: any[]): import("./ws/Future.js").FutureInterface;
|
|
647
|
-
delay(timeout: any, method: any, ...args: any[]): void;
|
|
648
|
-
orderBook(snapshot?: {}, depth?: number): WsOrderBook;
|
|
649
|
-
indexedOrderBook(snapshot?: {}, depth?: number): IndexedOrderBook;
|
|
650
|
-
countedOrderBook(snapshot?: {}, depth?: number): CountedOrderBook;
|
|
651
|
-
handleMessage(client: any, message: any): void;
|
|
652
|
-
ping(client: Client): any;
|
|
653
|
-
client(url: string): WsClient;
|
|
654
|
-
watchMultiple(url: string, messageHashes: string[], message?: any, subscribeHashes?: any, subscription?: any): import("./ws/Future.js").FutureInterface;
|
|
655
|
-
watch(url: string, messageHash: string, message?: any, subscribeHash?: any, subscription?: any): any;
|
|
656
|
-
onConnected(client: any, message?: any): void;
|
|
657
|
-
onError(client: any, error: any): void;
|
|
658
|
-
onClose(client: any, error: any): void;
|
|
659
|
-
close(): Promise<void>;
|
|
660
|
-
loadOrderBook(client: any, messageHash: string, symbol: string, limit?: Int, params?: {}): Promise<void>;
|
|
661
|
-
convertToBigInt(value: string): bigint;
|
|
662
|
-
stringToCharsArray(value: string): string[];
|
|
663
|
-
valueIsDefined(value: any): boolean;
|
|
664
|
-
arraySlice(array: any, first: any, second?: any): any;
|
|
665
|
-
getProperty(obj: any, property: any, defaultValue?: any): any;
|
|
666
|
-
setProperty(obj: any, property: any, defaultValue?: any): void;
|
|
667
|
-
axolotl(payload: any, hexKey: any, ed25519: any): string;
|
|
668
|
-
fixStringifiedJsonMembers(content: string): any;
|
|
669
|
-
ethAbiEncode(types: any, args: any): Uint8Array;
|
|
670
|
-
ethEncodeStructuredData(domain: any, messageTypes: any, messageData: any): Uint8Array;
|
|
671
|
-
intToBase16(elem: any): string;
|
|
672
|
-
extendExchangeOptions(newOptions: Dict): void;
|
|
673
|
-
createSafeDictionary(): {};
|
|
674
|
-
randomBytes(length: number): string;
|
|
675
700
|
safeBoolN(dictionaryOrList: any, keys: IndexType[], defaultValue?: boolean): boolean | undefined;
|
|
676
701
|
safeBool2(dictionary: any, key1: IndexType, key2: IndexType, defaultValue?: boolean): boolean | undefined;
|
|
677
702
|
safeBool(dictionary: any, key: IndexType, defaultValue?: boolean): boolean | undefined;
|
|
@@ -853,7 +878,7 @@ export default class Exchange {
|
|
|
853
878
|
parseAccounts(accounts: any[], params?: {}): Account[];
|
|
854
879
|
parseTrades(trades: any[], market?: Market, since?: Int, limit?: Int, params?: {}): Trade[];
|
|
855
880
|
parseTransactions(transactions: any[], currency?: Currency, since?: Int, limit?: Int, params?: {}): Transaction[];
|
|
856
|
-
parseTransfers(transfers: any[], currency?: Currency, since?: Int, limit?: Int, params?: {}):
|
|
881
|
+
parseTransfers(transfers: any[], currency?: Currency, since?: Int, limit?: Int, params?: {}): TransferEntry[];
|
|
857
882
|
parseLedger(data: any, currency?: Currency, since?: Int, limit?: Int, params?: {}): any;
|
|
858
883
|
nonce(): number;
|
|
859
884
|
setHeaders(headers: any): any;
|
|
@@ -1113,6 +1138,6 @@ export default class Exchange {
|
|
|
1113
1138
|
parseMarginModification(data: Dict, market?: Market): MarginModification;
|
|
1114
1139
|
parseMarginModifications(response: object[], symbols?: string[], symbolKey?: Str, marketType?: MarketType): MarginModification[];
|
|
1115
1140
|
fetchTransfer(id: string, code?: Str, params?: {}): Promise<TransferEntry>;
|
|
1116
|
-
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<
|
|
1141
|
+
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
|
|
1117
1142
|
}
|
|
1118
1143
|
export { Exchange, };
|