ccxt 4.5.53 → 4.5.54
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 +144 -145
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -4
- package/dist/cjs/src/base/Exchange.js +29 -0
- package/dist/cjs/src/bydfi.js +1 -1
- package/dist/cjs/src/coinbase.js +1 -1
- package/dist/cjs/src/coinbaseinternational.js +0 -38
- package/dist/cjs/src/coinex.js +1 -1
- package/dist/cjs/src/deepcoin.js +1 -1
- package/dist/cjs/src/dydx.js +1 -1
- package/dist/cjs/src/hollaex.js +2 -6
- package/dist/cjs/src/modetrade.js +1 -1
- package/dist/cjs/src/pacifica.js +42 -44
- package/dist/cjs/src/paradex.js +1 -1
- package/dist/cjs/src/pro/backpack.js +12 -3
- package/dist/cjs/src/pro/binance.js +7 -2
- package/dist/cjs/src/pro/hashkey.js +7 -4
- package/dist/cjs/src/pro/krakenfutures.js +27 -12
- package/dist/cjs/src/pro/kucoin.js +3 -3
- package/dist/cjs/src/pro/modetrade.js +1 -1
- package/dist/cjs/src/pro/weex.js +7 -5
- package/dist/cjs/src/pro/woo.js +1 -1
- package/dist/cjs/src/pro/woofipro.js +1 -1
- package/dist/cjs/src/weex.js +9 -6
- package/dist/cjs/src/woo.js +1 -1
- package/dist/cjs/src/woofipro.js +1 -1
- package/dist/cjs/src/xt.js +2 -2
- package/js/ccxt.d.ts +2 -5
- package/js/ccxt.js +2 -4
- package/js/src/base/Exchange.d.ts +23 -2
- package/js/src/base/Exchange.js +29 -0
- package/js/src/bydfi.js +1 -1
- package/js/src/coinbase.js +1 -1
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/coinbaseinternational.d.ts +0 -21
- package/js/src/coinbaseinternational.js +0 -38
- package/js/src/coinex.js +1 -1
- package/js/src/deepcoin.js +1 -1
- package/js/src/dydx.js +1 -1
- package/js/src/hollaex.js +2 -6
- package/js/src/modetrade.js +1 -1
- package/js/src/pacifica.js +42 -44
- package/js/src/paradex.js +1 -1
- package/js/src/pro/backpack.js +12 -3
- package/js/src/pro/binance.d.ts +1 -1
- package/js/src/pro/binance.js +7 -2
- package/js/src/pro/hashkey.js +7 -4
- package/js/src/pro/krakenfutures.js +27 -12
- package/js/src/pro/kucoin.js +3 -3
- package/js/src/pro/modetrade.js +1 -1
- package/js/src/pro/weex.d.ts +1 -0
- package/js/src/pro/weex.js +7 -5
- package/js/src/pro/woo.js +1 -1
- package/js/src/pro/woofipro.js +1 -1
- package/js/src/protobuf/mexc/compiled.d.cts +0 -6
- package/js/src/static_dependencies/dydx-v4-client/long/index.d.cts +0 -6
- package/js/src/static_dependencies/fflake/browser.d.ts +5 -5
- package/js/src/static_dependencies/noble-curves/abstract/weierstrass.d.ts +0 -1
- package/js/src/weex.js +9 -6
- package/js/src/woo.js +1 -1
- package/js/src/woofipro.js +1 -1
- package/js/src/xt.js +2 -2
- package/package.json +3 -3
- package/dist/cjs/src/abstract/zonda.js +0 -11
- package/dist/cjs/src/zonda.js +0 -1998
- package/js/src/abstract/zonda.d.ts +0 -56
- package/js/src/abstract/zonda.js +0 -11
- package/js/src/zonda.d.ts +0 -214
- package/js/src/zonda.js +0 -1997
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, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OrderBooks, OpenInterests, ConstructorArgs, ADL } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.5.
|
|
7
|
+
declare const version = "4.5.54";
|
|
8
8
|
import aftermath from './src/aftermath.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import apex from './src/apex.js';
|
|
@@ -115,7 +115,6 @@ import xt from './src/xt.js';
|
|
|
115
115
|
import yobit from './src/yobit.js';
|
|
116
116
|
import zaif from './src/zaif.js';
|
|
117
117
|
import zebpay from './src/zebpay.js';
|
|
118
|
-
import zonda from './src/zonda.js';
|
|
119
118
|
import aftermathPro from './src/pro/aftermath.js';
|
|
120
119
|
import alpacaPro from './src/pro/alpaca.js';
|
|
121
120
|
import apexPro from './src/pro/apex.js';
|
|
@@ -307,7 +306,6 @@ declare const exchanges: {
|
|
|
307
306
|
yobit: typeof yobit;
|
|
308
307
|
zaif: typeof zaif;
|
|
309
308
|
zebpay: typeof zebpay;
|
|
310
|
-
zonda: typeof zonda;
|
|
311
309
|
};
|
|
312
310
|
declare const pro: {
|
|
313
311
|
aftermath: typeof aftermathPro;
|
|
@@ -589,7 +587,6 @@ declare const ccxt: {
|
|
|
589
587
|
yobit: typeof yobit;
|
|
590
588
|
zaif: typeof zaif;
|
|
591
589
|
zebpay: typeof zebpay;
|
|
592
|
-
zonda: typeof zonda;
|
|
593
590
|
} & typeof functions & typeof errors;
|
|
594
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, UnsubscribeError, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, ConstructorArgs, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, MarketInterface, Trade, Order, OrderBook, OrderBooks, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, OpenInterests, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, LongShortRatio, ADL, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, aftermath, alpaca, apex, arkham, ascendex, aster, backpack, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcbox, btcmarkets, btcturk, bullish, bybit, bydfi, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, deepcoin, delta, deribit, derive, digifinex, dydx, exmo, fmfwio, foxbit, gate, gateio, gemini, grvt, hashkey, hibachi, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, lighter, luno, mercado, mexc, modetrade, myokx, ndax, novadax, okx, okxus, onetrading, oxfun, p2b, pacifica, paradex, paymium, phemex, poloniex, tokocrypto, toobit, upbit, wavesexchange, weex, whitebit, woo, woofipro, xt, yobit, zaif, zebpay,
|
|
591
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, UnsubscribeError, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, ConstructorArgs, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, MarketInterface, Trade, Order, OrderBook, OrderBooks, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, OpenInterests, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, LongShortRatio, ADL, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, aftermath, alpaca, apex, arkham, ascendex, aster, backpack, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcbox, btcmarkets, btcturk, bullish, bybit, bydfi, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, deepcoin, delta, deribit, derive, digifinex, dydx, exmo, fmfwio, foxbit, gate, gateio, gemini, grvt, hashkey, hibachi, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, lighter, luno, mercado, mexc, modetrade, myokx, ndax, novadax, okx, okxus, onetrading, oxfun, p2b, pacifica, paradex, paymium, phemex, poloniex, tokocrypto, toobit, upbit, wavesexchange, weex, whitebit, woo, woofipro, xt, yobit, zaif, zebpay, };
|
|
595
592
|
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, ManualInteractionNeeded, RestrictedLocation, 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, UnsubscribeError } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.5.
|
|
41
|
+
const version = '4.5.54';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import aftermath from './src/aftermath.js';
|
|
@@ -151,7 +151,6 @@ import xt from './src/xt.js';
|
|
|
151
151
|
import yobit from './src/yobit.js';
|
|
152
152
|
import zaif from './src/zaif.js';
|
|
153
153
|
import zebpay from './src/zebpay.js';
|
|
154
|
-
import zonda from './src/zonda.js';
|
|
155
154
|
// pro exchanges
|
|
156
155
|
import aftermathPro from './src/pro/aftermath.js';
|
|
157
156
|
import alpacaPro from './src/pro/alpaca.js';
|
|
@@ -344,7 +343,6 @@ const exchanges = {
|
|
|
344
343
|
'yobit': yobit,
|
|
345
344
|
'zaif': zaif,
|
|
346
345
|
'zebpay': zebpay,
|
|
347
|
-
'zonda': zonda,
|
|
348
346
|
};
|
|
349
347
|
const pro = {
|
|
350
348
|
'aftermath': aftermathPro,
|
|
@@ -440,6 +438,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
440
438
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
441
439
|
//-----------------------------------------------------------------------------
|
|
442
440
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
443
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, UnsubscribeError, aftermath, alpaca, apex, arkham, ascendex, aster, backpack, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcbox, btcmarkets, btcturk, bullish, bybit, bydfi, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, deepcoin, delta, deribit, derive, digifinex, dydx, exmo, fmfwio, foxbit, gate, gateio, gemini, grvt, hashkey, hibachi, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, lighter, luno, mercado, mexc, modetrade, myokx, ndax, novadax, okx, okxus, onetrading, oxfun, p2b, pacifica, paradex, paymium, phemex, poloniex, tokocrypto, toobit, upbit, wavesexchange, weex, whitebit, woo, woofipro, xt, yobit, zaif, zebpay,
|
|
441
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, 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, UnsubscribeError, aftermath, alpaca, apex, arkham, ascendex, aster, backpack, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcbox, btcmarkets, btcturk, bullish, bybit, bydfi, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, deepcoin, delta, deribit, derive, digifinex, dydx, exmo, fmfwio, foxbit, gate, gateio, gemini, grvt, hashkey, hibachi, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, lighter, luno, mercado, mexc, modetrade, myokx, ndax, novadax, okx, okxus, onetrading, oxfun, p2b, pacifica, paradex, paymium, phemex, poloniex, tokocrypto, toobit, upbit, wavesexchange, weex, whitebit, woo, woofipro, xt, yobit, zaif, zebpay, };
|
|
444
442
|
export default ccxt;
|
|
445
443
|
//-----------------------------------------------------------------------------
|
|
@@ -246,7 +246,7 @@ export default class Exchange {
|
|
|
246
246
|
outputLen: number;
|
|
247
247
|
blockLen: number;
|
|
248
248
|
create(): import("../static_dependencies/noble-hashes/utils.js").Hash<import("../static_dependencies/noble-hashes/utils.js").Hash<any>>;
|
|
249
|
-
}, digest?: "
|
|
249
|
+
}, digest?: "binary" | "hex" | "base64") => any;
|
|
250
250
|
arrayConcat: (a: any[], b: any[]) => any[];
|
|
251
251
|
encode: (str: string) => Uint8Array;
|
|
252
252
|
urlencode: (object: object, sort?: boolean) => string;
|
|
@@ -255,7 +255,7 @@ export default class Exchange {
|
|
|
255
255
|
outputLen: number;
|
|
256
256
|
blockLen: number;
|
|
257
257
|
create(): import("../static_dependencies/noble-hashes/utils.js").Hash<import("../static_dependencies/noble-hashes/utils.js").Hash<any>>;
|
|
258
|
-
}, digest?: "
|
|
258
|
+
}, digest?: "binary" | "hex" | "base64") => any;
|
|
259
259
|
numberToString: typeof functions.numberToString;
|
|
260
260
|
parseTimeframe: (timeframe: string) => number;
|
|
261
261
|
safeInteger2: (o: any, k1: IndexType, k2: IndexType, $default?: number) => number;
|
|
@@ -654,6 +654,27 @@ export default class Exchange {
|
|
|
654
654
|
fetchL2OrderBook(symbol: string, limit?: Int, params?: {}): Promise<any>;
|
|
655
655
|
filterBySymbol(objects: any, symbol?: Str): any;
|
|
656
656
|
parseOHLCV(ohlcv: any, market?: Market): OHLCV;
|
|
657
|
+
safeNetwork(network: any): {
|
|
658
|
+
info: any;
|
|
659
|
+
id: string;
|
|
660
|
+
name: string;
|
|
661
|
+
network: string;
|
|
662
|
+
active: boolean;
|
|
663
|
+
deposit: boolean;
|
|
664
|
+
withdraw: boolean;
|
|
665
|
+
fee: number;
|
|
666
|
+
precision: number;
|
|
667
|
+
limits: {
|
|
668
|
+
withdraw: {
|
|
669
|
+
min: number;
|
|
670
|
+
max: number;
|
|
671
|
+
};
|
|
672
|
+
deposit: {
|
|
673
|
+
min: number;
|
|
674
|
+
max: number;
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
};
|
|
657
678
|
networkCodeToId(networkCode: string, currencyCode?: Str): string;
|
|
658
679
|
networkIdToCode(networkId?: Str, currencyCode?: Str): string;
|
|
659
680
|
handleNetworkCodeAndParams(params: any): any[];
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -4564,6 +4564,35 @@ export default class Exchange {
|
|
|
4564
4564
|
}
|
|
4565
4565
|
return ohlcv;
|
|
4566
4566
|
}
|
|
4567
|
+
safeNetwork(network) {
|
|
4568
|
+
const withdrawEnabled = this.safeBool(network, 'withdraw');
|
|
4569
|
+
const depositEnabled = this.safeBool(network, 'deposit');
|
|
4570
|
+
const limits = this.safeDict(network, 'limits');
|
|
4571
|
+
const withdraw = this.safeDict(limits, 'withdraw');
|
|
4572
|
+
const deposit = this.safeDict(limits, 'deposit');
|
|
4573
|
+
const isEnabled = (withdrawEnabled && depositEnabled);
|
|
4574
|
+
return {
|
|
4575
|
+
'info': network['info'],
|
|
4576
|
+
'id': this.safeString(network, 'id'),
|
|
4577
|
+
'name': this.safeString(network, 'name'),
|
|
4578
|
+
'network': this.safeString(network, 'network'),
|
|
4579
|
+
'active': this.safeBool(network, 'active', isEnabled),
|
|
4580
|
+
'deposit': depositEnabled,
|
|
4581
|
+
'withdraw': withdrawEnabled,
|
|
4582
|
+
'fee': this.safeNumber(network, 'fee'),
|
|
4583
|
+
'precision': this.safeNumber(network, 'precision'),
|
|
4584
|
+
'limits': {
|
|
4585
|
+
'withdraw': {
|
|
4586
|
+
'min': this.safeNumber(withdraw, 'min'),
|
|
4587
|
+
'max': this.safeNumber(withdraw, 'max'),
|
|
4588
|
+
},
|
|
4589
|
+
'deposit': {
|
|
4590
|
+
'min': this.safeNumber(deposit, 'min'),
|
|
4591
|
+
'max': this.safeNumber(deposit, 'max'),
|
|
4592
|
+
},
|
|
4593
|
+
},
|
|
4594
|
+
};
|
|
4595
|
+
}
|
|
4567
4596
|
networkCodeToId(networkCode, currencyCode = undefined) {
|
|
4568
4597
|
/**
|
|
4569
4598
|
* @ignore
|
package/js/src/bydfi.js
CHANGED
|
@@ -637,7 +637,7 @@ export default class bydfi extends Exchange {
|
|
|
637
637
|
'symbol': market['id'],
|
|
638
638
|
};
|
|
639
639
|
if (limit !== undefined) {
|
|
640
|
-
request['limit'] = limit;
|
|
640
|
+
request['limit'] = Math.min(limit, 1000);
|
|
641
641
|
}
|
|
642
642
|
const response = await this.publicGetV1FapiMarketTrades(this.extend(request, params));
|
|
643
643
|
//
|
package/js/src/coinbase.js
CHANGED
|
@@ -1488,6 +1488,7 @@ export default class coinbase extends Exchange {
|
|
|
1488
1488
|
// has_promo_fee: false
|
|
1489
1489
|
// }
|
|
1490
1490
|
//
|
|
1491
|
+
const promises = await Promise.all(spotUnresolvedPromises);
|
|
1491
1492
|
let unresolvedContractPromises = [];
|
|
1492
1493
|
try {
|
|
1493
1494
|
unresolvedContractPromises = [
|
|
@@ -1498,7 +1499,6 @@ export default class coinbase extends Exchange {
|
|
|
1498
1499
|
catch (e) {
|
|
1499
1500
|
unresolvedContractPromises = []; // the sync version of ccxt won't have the promise.all line so the request is made here. Some users can't access perpetual products
|
|
1500
1501
|
}
|
|
1501
|
-
const promises = await Promise.all(spotUnresolvedPromises);
|
|
1502
1502
|
let contractPromises = undefined;
|
|
1503
1503
|
try {
|
|
1504
1504
|
contractPromises = await Promise.all(unresolvedContractPromises); // some users don't have access to contracts
|
|
@@ -311,7 +311,7 @@ export default class coinbaseexchange extends Exchange {
|
|
|
311
311
|
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
312
312
|
*/
|
|
313
313
|
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
|
|
314
|
-
parseTransactionStatus(transaction: any): "
|
|
314
|
+
parseTransactionStatus(transaction: any): "pending" | "ok" | "failed" | "canceled";
|
|
315
315
|
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
|
|
316
316
|
/**
|
|
317
317
|
* @method
|
|
@@ -412,27 +412,6 @@ export default class coinbaseinternational extends Exchange {
|
|
|
412
412
|
* @returns {object} a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}
|
|
413
413
|
*/
|
|
414
414
|
withdraw(code: string, amount: number, address: string, tag?: Str, params?: {}): Promise<Transaction>;
|
|
415
|
-
safeNetwork(network: any): {
|
|
416
|
-
info: any;
|
|
417
|
-
id: string;
|
|
418
|
-
name: string;
|
|
419
|
-
network: string;
|
|
420
|
-
active: boolean;
|
|
421
|
-
deposit: boolean;
|
|
422
|
-
withdraw: boolean;
|
|
423
|
-
fee: number;
|
|
424
|
-
precision: number;
|
|
425
|
-
limits: {
|
|
426
|
-
withdraw: {
|
|
427
|
-
min: number;
|
|
428
|
-
max: number;
|
|
429
|
-
};
|
|
430
|
-
deposit: {
|
|
431
|
-
min: number;
|
|
432
|
-
max: number;
|
|
433
|
-
};
|
|
434
|
-
};
|
|
435
|
-
};
|
|
436
415
|
sign(path: any, api?: any[], method?: string, params?: {}, headers?: any, body?: any): {
|
|
437
416
|
url: string;
|
|
438
417
|
method: string;
|
|
@@ -2244,44 +2244,6 @@ export default class coinbaseinternational extends Exchange {
|
|
|
2244
2244
|
//
|
|
2245
2245
|
return this.parseTransaction(response, currency);
|
|
2246
2246
|
}
|
|
2247
|
-
safeNetwork(network) {
|
|
2248
|
-
let withdrawEnabled = this.safeBool(network, 'withdraw');
|
|
2249
|
-
let depositEnabled = this.safeBool(network, 'deposit');
|
|
2250
|
-
const limits = this.safeDict(network, 'limits');
|
|
2251
|
-
const withdraw = this.safeDict(limits, 'withdraw');
|
|
2252
|
-
const withdrawMax = this.safeNumber(withdraw, 'max');
|
|
2253
|
-
const deposit = this.safeDict(limits, 'deposit');
|
|
2254
|
-
const depositMax = this.safeNumber(deposit, 'max');
|
|
2255
|
-
if (withdrawEnabled === undefined && withdrawMax !== undefined) {
|
|
2256
|
-
withdrawEnabled = (withdrawMax > 0);
|
|
2257
|
-
}
|
|
2258
|
-
if (depositEnabled === undefined && depositMax !== undefined) {
|
|
2259
|
-
depositEnabled = (depositMax > 0);
|
|
2260
|
-
}
|
|
2261
|
-
const networkId = this.safeString(network, 'id');
|
|
2262
|
-
const isEnabled = (withdrawEnabled && depositEnabled);
|
|
2263
|
-
return {
|
|
2264
|
-
'info': network['info'],
|
|
2265
|
-
'id': networkId,
|
|
2266
|
-
'name': this.safeString(network, 'name'),
|
|
2267
|
-
'network': this.safeString(network, 'network'),
|
|
2268
|
-
'active': this.safeBool(network, 'active', isEnabled),
|
|
2269
|
-
'deposit': depositEnabled,
|
|
2270
|
-
'withdraw': withdrawEnabled,
|
|
2271
|
-
'fee': this.safeNumber(network, 'fee'),
|
|
2272
|
-
'precision': this.safeNumber(network, 'precision'),
|
|
2273
|
-
'limits': {
|
|
2274
|
-
'withdraw': {
|
|
2275
|
-
'min': this.safeNumber(withdraw, 'min'),
|
|
2276
|
-
'max': withdrawMax,
|
|
2277
|
-
},
|
|
2278
|
-
'deposit': {
|
|
2279
|
-
'min': this.safeNumber(deposit, 'min'),
|
|
2280
|
-
'max': depositMax,
|
|
2281
|
-
},
|
|
2282
|
-
},
|
|
2283
|
-
};
|
|
2284
|
-
}
|
|
2285
2247
|
sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
2286
2248
|
const version = api[0];
|
|
2287
2249
|
const signed = api[1] === 'private';
|
package/js/src/coinex.js
CHANGED
|
@@ -1431,7 +1431,7 @@ export default class coinex extends Exchange {
|
|
|
1431
1431
|
// 'last_id': 0,
|
|
1432
1432
|
};
|
|
1433
1433
|
if (limit !== undefined) {
|
|
1434
|
-
request['limit'] = limit;
|
|
1434
|
+
request['limit'] = Math.min(limit, 1000);
|
|
1435
1435
|
}
|
|
1436
1436
|
let response = undefined;
|
|
1437
1437
|
if (market['swap']) {
|
package/js/src/deepcoin.js
CHANGED
|
@@ -815,7 +815,7 @@ export default class deepcoin extends Exchange {
|
|
|
815
815
|
'instId': market['id'],
|
|
816
816
|
};
|
|
817
817
|
if (limit !== undefined) {
|
|
818
|
-
request['limit'] = limit
|
|
818
|
+
request['limit'] = Math.min(limit, 2000);
|
|
819
819
|
}
|
|
820
820
|
const productGroup = this.getProductGroupFromMarket(market);
|
|
821
821
|
request['productGroup'] = productGroup;
|
package/js/src/dydx.js
CHANGED
|
@@ -673,7 +673,7 @@ export default class dydx extends Exchange {
|
|
|
673
673
|
'market': market['id'],
|
|
674
674
|
};
|
|
675
675
|
if (limit !== undefined) {
|
|
676
|
-
request['limit'] = limit;
|
|
676
|
+
request['limit'] = Math.min(limit, 1000);
|
|
677
677
|
}
|
|
678
678
|
const response = await this.indexerGetTradesPerpetualMarketMarket(this.extend(request, params));
|
|
679
679
|
//
|
package/js/src/hollaex.js
CHANGED
|
@@ -925,14 +925,10 @@ export default class hollaex extends Exchange {
|
|
|
925
925
|
const timeDelta = this.parseTimeframe(timeframe) * maxLimit * 1000;
|
|
926
926
|
let start = since;
|
|
927
927
|
const now = this.milliseconds();
|
|
928
|
-
if (until === undefined
|
|
929
|
-
until = now;
|
|
930
|
-
start = until - timeDelta;
|
|
931
|
-
}
|
|
932
|
-
else if (until === undefined) {
|
|
928
|
+
if (until === undefined) {
|
|
933
929
|
until = now; // the exchange has not a lot of trades, so if we count until by limit and limit is small, it may return empty result
|
|
934
930
|
}
|
|
935
|
-
|
|
931
|
+
if (start === undefined) {
|
|
936
932
|
start = until - timeDelta;
|
|
937
933
|
}
|
|
938
934
|
request['from'] = this.parseToInt(start / 1000); // convert to seconds
|
package/js/src/modetrade.js
CHANGED
package/js/src/pacifica.js
CHANGED
|
@@ -1001,53 +1001,51 @@ export default class pacifica extends Exchange {
|
|
|
1001
1001
|
if (paginate) {
|
|
1002
1002
|
return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params, defaultMaxLimit);
|
|
1003
1003
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1004
|
+
const tf = this.safeString(this.timeframes, timeframe, timeframe);
|
|
1005
|
+
let request = {
|
|
1006
|
+
'symbol': market['id'],
|
|
1007
|
+
'interval': tf,
|
|
1008
|
+
'start_time': since,
|
|
1009
|
+
};
|
|
1010
|
+
[request, params] = this.handleUntilOption('end_time', request, params);
|
|
1011
|
+
const nowMillis = this.milliseconds();
|
|
1012
|
+
let until = this.safeInteger(request, 'end_time');
|
|
1013
|
+
if (until === undefined) {
|
|
1014
|
+
if (limit !== undefined) {
|
|
1015
|
+
until = since + (limit * (this.parseTimeframe(tf) * 1000)) - 1;
|
|
1016
|
+
}
|
|
1014
1017
|
if (until === undefined) {
|
|
1015
|
-
|
|
1016
|
-
until = since + (limit * (this.parseTimeframe(tf) * 1000)) - 1;
|
|
1017
|
-
}
|
|
1018
|
-
if (until === undefined) {
|
|
1019
|
-
until = since + (defaultMaxLimit * (this.parseTimeframe(tf) * 1000)) - 1;
|
|
1020
|
-
}
|
|
1021
|
-
if (until > nowMillis) {
|
|
1022
|
-
until = nowMillis;
|
|
1023
|
-
}
|
|
1024
|
-
request['end_time'] = until;
|
|
1018
|
+
until = since + (defaultMaxLimit * (this.parseTimeframe(tf) * 1000)) - 1;
|
|
1025
1019
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
// "data": [
|
|
1031
|
-
// {
|
|
1032
|
-
// "t": 1748954160000,
|
|
1033
|
-
// "T": 1748954220000,
|
|
1034
|
-
// "s": "BTC",
|
|
1035
|
-
// "i": "1m",
|
|
1036
|
-
// "o": "105376",
|
|
1037
|
-
// "c": "105376",
|
|
1038
|
-
// "h": "105376",
|
|
1039
|
-
// "l": "105376",
|
|
1040
|
-
// "v": "0.00022",
|
|
1041
|
-
// "n": 2
|
|
1042
|
-
// }
|
|
1043
|
-
// ],
|
|
1044
|
-
// "error": null,
|
|
1045
|
-
// "code": null
|
|
1046
|
-
// }
|
|
1047
|
-
//
|
|
1048
|
-
const candles = this.safeList(response, 'data', []);
|
|
1049
|
-
return this.parseOHLCVs(candles, market, timeframe, since, limit);
|
|
1020
|
+
if (until > nowMillis) {
|
|
1021
|
+
until = nowMillis;
|
|
1022
|
+
}
|
|
1023
|
+
request['end_time'] = until;
|
|
1050
1024
|
}
|
|
1025
|
+
const response = await this.publicGetKline(this.extend(request, params));
|
|
1026
|
+
//
|
|
1027
|
+
// {
|
|
1028
|
+
// "success": true,
|
|
1029
|
+
// "data": [
|
|
1030
|
+
// {
|
|
1031
|
+
// "t": 1748954160000,
|
|
1032
|
+
// "T": 1748954220000,
|
|
1033
|
+
// "s": "BTC",
|
|
1034
|
+
// "i": "1m",
|
|
1035
|
+
// "o": "105376",
|
|
1036
|
+
// "c": "105376",
|
|
1037
|
+
// "h": "105376",
|
|
1038
|
+
// "l": "105376",
|
|
1039
|
+
// "v": "0.00022",
|
|
1040
|
+
// "n": 2
|
|
1041
|
+
// }
|
|
1042
|
+
// ],
|
|
1043
|
+
// "error": null,
|
|
1044
|
+
// "code": null
|
|
1045
|
+
// }
|
|
1046
|
+
//
|
|
1047
|
+
const candles = this.safeList(response, 'data', []);
|
|
1048
|
+
return this.parseOHLCVs(candles, market, timeframe, since, limit);
|
|
1051
1049
|
}
|
|
1052
1050
|
parseOHLCV(ohlcv, market = undefined) {
|
|
1053
1051
|
//
|
package/js/src/paradex.js
CHANGED
|
@@ -908,7 +908,7 @@ export default class paradex extends Exchange {
|
|
|
908
908
|
'market': market['id'],
|
|
909
909
|
};
|
|
910
910
|
if (limit !== undefined) {
|
|
911
|
-
request['page_size'] = limit;
|
|
911
|
+
request['page_size'] = Math.min(limit, 1000);
|
|
912
912
|
}
|
|
913
913
|
if (since !== undefined) {
|
|
914
914
|
request['start_at'] = since;
|
package/js/src/pro/backpack.js
CHANGED
|
@@ -720,9 +720,18 @@ export default class backpack extends backpackRest {
|
|
|
720
720
|
const id = this.safeString(trade, 't');
|
|
721
721
|
const marketId = this.safeString(trade, 's');
|
|
722
722
|
market = this.safeMarket(marketId, market);
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
|
|
723
|
+
const isBuyerMaker = this.safeBool(trade, 'm');
|
|
724
|
+
let side = undefined;
|
|
725
|
+
let takerOrMaker = undefined;
|
|
726
|
+
if (isBuyerMaker !== undefined) {
|
|
727
|
+
takerOrMaker = 'taker';
|
|
728
|
+
if (isBuyerMaker) {
|
|
729
|
+
side = 'sell';
|
|
730
|
+
}
|
|
731
|
+
else {
|
|
732
|
+
side = 'buy';
|
|
733
|
+
}
|
|
734
|
+
}
|
|
726
735
|
const price = this.safeString(trade, 'p');
|
|
727
736
|
const amount = this.safeString(trade, 'q');
|
|
728
737
|
let orderId = undefined;
|
package/js/src/pro/binance.d.ts
CHANGED
|
@@ -178,7 +178,7 @@ export default class binance extends binanceRest {
|
|
|
178
178
|
isSpotUrl(client: Client): boolean;
|
|
179
179
|
stream(type: Str, subscriptionHash: Str, numSubscriptions?: number): string;
|
|
180
180
|
getWsUrl(type: any, category: any): any;
|
|
181
|
-
getFutureWsCategory(channel: any): "
|
|
181
|
+
getFutureWsCategory(channel: any): "public" | "market";
|
|
182
182
|
getPrivateWsUrl(type: any, listenKey: any): string;
|
|
183
183
|
/**
|
|
184
184
|
* @method
|
package/js/src/pro/binance.js
CHANGED
|
@@ -235,8 +235,13 @@ export default class binance extends binanceRest {
|
|
|
235
235
|
const baseUrl = this.urls['api']['ws'][type];
|
|
236
236
|
if (type === 'future') {
|
|
237
237
|
// skip URL manipulation for proxied/bridge URLs (contain an embedded protocol)
|
|
238
|
-
const firstProtocol = baseUrl.indexOf('://');
|
|
239
|
-
if (firstProtocol !== -1 && baseUrl.indexOf('://', firstProtocol + 3) !== -1) {
|
|
238
|
+
// const firstProtocol = baseUrl.indexOf ('://');
|
|
239
|
+
// if (firstProtocol !== -1 && baseUrl.indexOf ('://', firstProtocol + 3) !== -1) {
|
|
240
|
+
// return baseUrl;
|
|
241
|
+
// }
|
|
242
|
+
const baseUrlSplit = baseUrl.split('://');
|
|
243
|
+
const baseUrlSplitLength = baseUrlSplit.length;
|
|
244
|
+
if (baseUrlSplitLength > 2) {
|
|
240
245
|
return baseUrl;
|
|
241
246
|
}
|
|
242
247
|
// only rewrite when the URL ends with exactly "/ws"
|
package/js/src/pro/hashkey.js
CHANGED
|
@@ -557,13 +557,16 @@ export default class hashkey extends hashkeyRest {
|
|
|
557
557
|
const marketId = this.safeString(trade, 's');
|
|
558
558
|
market = this.safeMarket(marketId, market);
|
|
559
559
|
const timestamp = this.safeInteger(trade, 't');
|
|
560
|
-
const
|
|
560
|
+
const isBuyerMaker = this.safeBool(trade, 'm');
|
|
561
|
+
let side = undefined;
|
|
561
562
|
let takerOrMaker = undefined;
|
|
562
|
-
if (
|
|
563
|
-
if (
|
|
563
|
+
if (isBuyerMaker !== undefined) {
|
|
564
|
+
if (isBuyerMaker) {
|
|
565
|
+
side = 'sell';
|
|
564
566
|
takerOrMaker = 'maker';
|
|
565
567
|
}
|
|
566
568
|
else {
|
|
569
|
+
side = 'buy';
|
|
567
570
|
takerOrMaker = 'taker';
|
|
568
571
|
}
|
|
569
572
|
}
|
|
@@ -572,7 +575,7 @@ export default class hashkey extends hashkeyRest {
|
|
|
572
575
|
'timestamp': timestamp,
|
|
573
576
|
'datetime': this.iso8601(timestamp),
|
|
574
577
|
'symbol': market['symbol'],
|
|
575
|
-
'side': this.safeStringLower(trade, 'S'),
|
|
578
|
+
'side': this.safeStringLower(trade, 'S', side),
|
|
576
579
|
'price': this.safeString(trade, 'p'),
|
|
577
580
|
'amount': this.safeString(trade, 'q'),
|
|
578
581
|
'cost': undefined,
|
|
@@ -550,6 +550,21 @@ export default class krakenfutures extends krakenfuturesRest {
|
|
|
550
550
|
// "price": 34893
|
|
551
551
|
// }
|
|
552
552
|
//
|
|
553
|
+
// order update
|
|
554
|
+
// {
|
|
555
|
+
// "instrument": "PF_DOGEUSD",
|
|
556
|
+
// "time": 1778610421471,
|
|
557
|
+
// "last_update_time": 1778610444402,
|
|
558
|
+
// "qty": 0,
|
|
559
|
+
// "filled": 10,
|
|
560
|
+
// "limit_price": 0.10912,
|
|
561
|
+
// "stop_price": 0,
|
|
562
|
+
// "type": "limit",
|
|
563
|
+
// "order_id": "a1c3803c-8f3d-4317-a085-8d06e11b1d36",
|
|
564
|
+
// "direction": 0,
|
|
565
|
+
// "reduce_only": false
|
|
566
|
+
// }
|
|
567
|
+
//
|
|
553
568
|
const marketId = this.safeString(trade, 'product_id');
|
|
554
569
|
market = this.safeMarket(marketId, market);
|
|
555
570
|
const timestamp = this.safeInteger(trade, 'time');
|
|
@@ -563,8 +578,8 @@ export default class krakenfutures extends krakenfuturesRest {
|
|
|
563
578
|
'type': this.safeString(trade, 'type'),
|
|
564
579
|
'side': this.safeString(trade, 'side'),
|
|
565
580
|
'takerOrMaker': 'taker',
|
|
566
|
-
'price': this.
|
|
567
|
-
'amount': this.
|
|
581
|
+
'price': this.safeString2(trade, 'price', 'limit_price'),
|
|
582
|
+
'amount': this.safeString2(trade, 'filled', 'qty'),
|
|
568
583
|
'cost': undefined,
|
|
569
584
|
'fee': {
|
|
570
585
|
'rate': undefined,
|
|
@@ -614,7 +629,7 @@ export default class krakenfutures extends krakenfuturesRest {
|
|
|
614
629
|
'type': this.safeStringLower(trade, 'type'),
|
|
615
630
|
'side': this.safeString(trade, 'side'),
|
|
616
631
|
'takerOrMaker': this.safeString(trade, 'matchRole'),
|
|
617
|
-
'price': this.
|
|
632
|
+
'price': this.safeString2(trade, 'price', 'limit_price'),
|
|
618
633
|
'amount': this.safeString(trade, 'tradeAmount'),
|
|
619
634
|
'cost': undefined,
|
|
620
635
|
'fee': {
|
|
@@ -733,13 +748,13 @@ export default class krakenfutures extends krakenfuturesRest {
|
|
|
733
748
|
previousOrder['average'] = Precise.stringDiv(totalCost, totalAmount);
|
|
734
749
|
}
|
|
735
750
|
previousOrder['cost'] = totalCost;
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
751
|
+
const filledString = this.numberToString(trade['amount']);
|
|
752
|
+
const stringOrderFilled = this.safeString(previousOrder, 'filled', '0');
|
|
753
|
+
const totalFilled = Precise.stringAdd(stringOrderFilled, filledString);
|
|
754
|
+
previousOrder['filled'] = totalFilled;
|
|
755
|
+
const prevAmountString = this.safeString(previousOrder, 'amount');
|
|
756
|
+
const remaining = Precise.stringSub(prevAmountString, totalFilled);
|
|
757
|
+
previousOrder['remaining'] = remaining;
|
|
743
758
|
if (previousOrder['fee'] === undefined) {
|
|
744
759
|
previousOrder['fee'] = {
|
|
745
760
|
'rate': undefined,
|
|
@@ -914,11 +929,11 @@ export default class krakenfutures extends krakenfuturesRest {
|
|
|
914
929
|
'price': this.safeString(unparsedOrder, 'limit_price'),
|
|
915
930
|
'stopPrice': this.safeString(unparsedOrder, 'stop_price'),
|
|
916
931
|
'triggerPrice': this.safeString(unparsedOrder, 'stop_price'),
|
|
917
|
-
'amount':
|
|
932
|
+
'amount': undefined,
|
|
918
933
|
'cost': undefined,
|
|
919
934
|
'average': undefined,
|
|
920
935
|
'filled': this.safeString(unparsedOrder, 'filled'),
|
|
921
|
-
'remaining':
|
|
936
|
+
'remaining': this.safeString(unparsedOrder, 'qty'),
|
|
922
937
|
'status': status,
|
|
923
938
|
'fee': {
|
|
924
939
|
'rate': undefined,
|
package/js/src/pro/kucoin.js
CHANGED
|
@@ -1698,14 +1698,14 @@ export default class kucoin extends kucoinRest {
|
|
|
1698
1698
|
getCacheIndex(orderbook, cache) {
|
|
1699
1699
|
const firstDelta = this.safeValue(cache, 0);
|
|
1700
1700
|
const nonce = this.safeInteger(orderbook, 'nonce');
|
|
1701
|
-
const firstDeltaStart = this.
|
|
1701
|
+
const firstDeltaStart = this.safeIntegerN(firstDelta, ['sequenceStart', 'sequence', 'O']);
|
|
1702
1702
|
if (nonce < firstDeltaStart - 1) {
|
|
1703
1703
|
return -1;
|
|
1704
1704
|
}
|
|
1705
1705
|
for (let i = 0; i < cache.length; i++) {
|
|
1706
1706
|
const delta = cache[i];
|
|
1707
|
-
const deltaStart = this.
|
|
1708
|
-
const deltaEnd = this.
|
|
1707
|
+
const deltaStart = this.safeIntegerN(delta, ['sequenceStart', 'sequence', 'O']);
|
|
1708
|
+
const deltaEnd = this.safeIntegerN(delta, ['sequenceEnd', 'sequence', 'C']); // todo check
|
|
1709
1709
|
if ((nonce >= deltaStart - 1) && (nonce < deltaEnd)) {
|
|
1710
1710
|
return i;
|
|
1711
1711
|
}
|
package/js/src/pro/modetrade.js
CHANGED
|
@@ -730,7 +730,7 @@ export default class modetrade extends modetradeRest {
|
|
|
730
730
|
// "orderTag": "default",
|
|
731
731
|
// "totalFee": 0,
|
|
732
732
|
// "visible": 0.01,
|
|
733
|
-
// "timestamp":
|
|
733
|
+
// "timestamp": 1657515556798,
|
|
734
734
|
// "reduceOnly": false,
|
|
735
735
|
// "maker": false
|
|
736
736
|
// }
|