ccxt 4.3.67 → 4.3.68
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 +3 -3
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +5 -3
- package/dist/cjs/src/base/functions/type.js +2 -2
- package/dist/cjs/src/bingx.js +329 -142
- package/dist/cjs/src/bitget.js +4 -2
- package/dist/cjs/src/pro/krakenfutures.js +7 -6
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/base/Exchange.js +5 -3
- package/js/src/base/functions/type.js +2 -2
- package/js/src/bingx.d.ts +2 -0
- package/js/src/bingx.js +329 -142
- package/js/src/bitget.js +4 -2
- package/js/src/pro/krakenfutures.js +7 -6
- 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));
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, DepositAddressResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, TransferEntries, LeverageTiers } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, 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.67";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, 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.68';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -1575,8 +1575,10 @@ export default class Exchange {
|
|
|
1575
1575
|
if (value === undefined) {
|
|
1576
1576
|
return defaultValue;
|
|
1577
1577
|
}
|
|
1578
|
-
if (typeof value === 'object') {
|
|
1579
|
-
|
|
1578
|
+
if ((typeof value === 'object')) {
|
|
1579
|
+
if (!Array.isArray(value)) {
|
|
1580
|
+
return value;
|
|
1581
|
+
}
|
|
1580
1582
|
}
|
|
1581
1583
|
return defaultValue;
|
|
1582
1584
|
}
|
|
@@ -3465,7 +3467,7 @@ export default class Exchange {
|
|
|
3465
3467
|
}
|
|
3466
3468
|
else {
|
|
3467
3469
|
// otherwise, try to use the global-scope 'defaultNetwork' value (even if that network is not supported by currency, it doesn't make any problem, this will be just used "at first" if currency supports this network at all)
|
|
3468
|
-
const defaultNetwork = this.
|
|
3470
|
+
const defaultNetwork = this.safeString(this.options, 'defaultNetwork');
|
|
3469
3471
|
if (defaultNetwork !== undefined) {
|
|
3470
3472
|
defaultNetworkCode = defaultNetwork;
|
|
3471
3473
|
}
|
|
@@ -82,7 +82,7 @@ const safeInteger2 = (o, k1, k2, $default) => {
|
|
|
82
82
|
return isNumber(n) ? n : $default;
|
|
83
83
|
};
|
|
84
84
|
const safeIntegerProduct2 = (o, k1, k2, $factor, $default) => {
|
|
85
|
-
const n =
|
|
85
|
+
const n = asFloat(prop2(o, k1, k2));
|
|
86
86
|
return isNumber(n) ? parseInt(n * $factor) : $default;
|
|
87
87
|
};
|
|
88
88
|
const safeTimestamp2 = (o, k1, k2, $default) => {
|
|
@@ -129,7 +129,7 @@ const safeIntegerN = (o, k, $default) => {
|
|
|
129
129
|
return isNumber(n) ? n : $default;
|
|
130
130
|
};
|
|
131
131
|
const safeIntegerProductN = (o, k, $factor, $default) => {
|
|
132
|
-
const n =
|
|
132
|
+
const n = asFloat(getValueFromKeysInArray(o, k));
|
|
133
133
|
return isNumber(n) ? parseInt(n * $factor) : $default;
|
|
134
134
|
};
|
|
135
135
|
const safeTimestampN = (o, k, $default) => {
|
package/js/src/bingx.d.ts
CHANGED
|
@@ -86,6 +86,8 @@ export default class bingx extends Exchange {
|
|
|
86
86
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
87
87
|
fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
88
88
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
89
|
+
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
90
|
+
fetchCanceledAndClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
89
91
|
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
90
92
|
fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
|
|
91
93
|
parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
|