ccxt 4.4.39 → 4.4.41
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 +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +9 -9
- package/dist/cjs/src/base/Exchange.js +32 -21
- package/dist/cjs/src/binance.js +37 -43
- package/dist/cjs/src/bingx.js +4 -3
- package/dist/cjs/src/bit2c.js +0 -1
- package/dist/cjs/src/bitbank.js +0 -1
- package/dist/cjs/src/bitbns.js +0 -1
- package/dist/cjs/src/bitfinex.js +18 -19
- package/dist/cjs/src/bitfinex1.js +0 -1
- package/dist/cjs/src/bitflyer.js +0 -1
- package/dist/cjs/src/bitget.js +2 -2
- package/dist/cjs/src/bithumb.js +0 -1
- package/dist/cjs/src/bitmart.js +257 -5
- package/dist/cjs/src/bitmex.js +5 -6
- package/dist/cjs/src/bitopro.js +4 -5
- package/dist/cjs/src/bitrue.js +5 -7
- package/dist/cjs/src/bitso.js +1 -2
- package/dist/cjs/src/bitstamp.js +1 -2
- package/dist/cjs/src/bitteam.js +1 -3
- package/dist/cjs/src/bitvavo.js +2 -4
- package/dist/cjs/src/blockchaincom.js +5 -5
- package/dist/cjs/src/blofin.js +10 -10
- package/dist/cjs/src/btcalpha.js +0 -1
- package/dist/cjs/src/btcbox.js +0 -1
- package/dist/cjs/src/btcmarkets.js +1 -3
- package/dist/cjs/src/bybit.js +10 -11
- package/dist/cjs/src/cex.js +1 -1
- package/dist/cjs/src/coinbase.js +77 -1
- package/dist/cjs/src/coinbaseexchange.js +1 -1
- package/dist/cjs/src/coinbaseinternational.js +62 -0
- package/dist/cjs/src/coincatch.js +1 -1
- package/dist/cjs/src/coinex.js +9 -9
- package/dist/cjs/src/coinlist.js +1 -1
- package/dist/cjs/src/coinmetro.js +1 -1
- package/dist/cjs/src/cryptocom.js +91 -2
- package/dist/cjs/src/currencycom.js +1 -1
- package/dist/cjs/src/defx.js +1 -2
- package/dist/cjs/src/delta.js +1 -1
- package/dist/cjs/src/digifinex.js +1 -1
- package/dist/cjs/src/exmo.js +64 -6
- package/dist/cjs/src/gate.js +2 -2
- package/dist/cjs/src/hashkey.js +3 -5
- package/dist/cjs/src/htx.js +2 -2
- package/dist/cjs/src/hyperliquid.js +66 -2
- package/dist/cjs/src/kraken.js +130 -27
- package/dist/cjs/src/kucoin.js +30 -25
- package/dist/cjs/src/luno.js +1 -1
- package/dist/cjs/src/mexc.js +138 -2
- package/dist/cjs/src/ndax.js +1 -1
- package/dist/cjs/src/okcoin.js +18 -18
- package/dist/cjs/src/okx.js +27 -22
- package/dist/cjs/src/phemex.js +12 -8
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/poloniexfutures.js +6 -6
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/dist/cjs/src/pro/bybit.js +13 -1
- package/dist/cjs/src/pro/coinex.js +2 -2
- package/dist/cjs/src/pro/gate.js +6 -6
- package/dist/cjs/src/pro/kucoin.js +3 -3
- package/dist/cjs/src/pro/okx.js +11 -11
- package/dist/cjs/src/pro/upbit.js +3 -3
- package/dist/cjs/src/vertex.js +11 -11
- package/dist/cjs/src/woo.js +33 -33
- package/dist/cjs/src/woofipro.js +24 -24
- package/dist/cjs/src/xt.js +31 -28
- package/dist/cjs/src/zonda.js +1 -1
- package/js/ccxt.d.ts +3 -3
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitmart.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +5 -0
- package/js/src/ascendex.d.ts +2 -2
- package/js/src/ascendex.js +9 -9
- package/js/src/base/Exchange.d.ts +6 -3
- package/js/src/base/Exchange.js +32 -21
- package/js/src/base/types.d.ts +2 -0
- package/js/src/binance.d.ts +9 -9
- package/js/src/binance.js +37 -43
- package/js/src/bingx.d.ts +1 -1
- package/js/src/bingx.js +4 -3
- package/js/src/bit2c.js +0 -1
- package/js/src/bitbank.js +0 -1
- package/js/src/bitbns.js +0 -1
- package/js/src/bitfinex.d.ts +3 -3
- package/js/src/bitfinex.js +18 -19
- package/js/src/bitfinex1.js +0 -1
- package/js/src/bitflyer.js +0 -1
- package/js/src/bitget.d.ts +1 -1
- package/js/src/bitget.js +2 -2
- package/js/src/bithumb.js +0 -1
- package/js/src/bitmart.d.ts +53 -2
- package/js/src/bitmart.js +257 -5
- package/js/src/bitmex.d.ts +1 -1
- package/js/src/bitmex.js +5 -6
- package/js/src/bitopro.js +4 -5
- package/js/src/bitrue.js +5 -7
- package/js/src/bitso.d.ts +1 -1
- package/js/src/bitso.js +1 -2
- package/js/src/bitstamp.d.ts +1 -1
- package/js/src/bitstamp.js +1 -2
- package/js/src/bitteam.js +1 -3
- package/js/src/bitvavo.d.ts +1 -1
- package/js/src/bitvavo.js +2 -4
- package/js/src/blockchaincom.js +5 -5
- package/js/src/blofin.d.ts +3 -3
- package/js/src/blofin.js +10 -10
- package/js/src/btcalpha.js +0 -1
- package/js/src/btcbox.js +0 -1
- package/js/src/btcmarkets.js +1 -3
- package/js/src/bybit.d.ts +1 -1
- package/js/src/bybit.js +10 -11
- package/js/src/cex.d.ts +1 -1
- package/js/src/cex.js +1 -1
- package/js/src/coinbase.d.ts +1 -1
- package/js/src/coinbase.js +77 -1
- package/js/src/coinbaseexchange.d.ts +1 -1
- package/js/src/coinbaseexchange.js +1 -1
- package/js/src/coinbaseinternational.js +62 -0
- package/js/src/coincatch.d.ts +1 -1
- package/js/src/coincatch.js +1 -1
- package/js/src/coinex.js +9 -9
- package/js/src/coinlist.d.ts +1 -1
- package/js/src/coinlist.js +1 -1
- package/js/src/coinmetro.d.ts +1 -1
- package/js/src/coinmetro.js +1 -1
- package/js/src/cryptocom.d.ts +2 -2
- package/js/src/cryptocom.js +91 -2
- package/js/src/currencycom.d.ts +1 -1
- package/js/src/currencycom.js +1 -1
- package/js/src/defx.d.ts +1 -2
- package/js/src/defx.js +1 -2
- package/js/src/delta.d.ts +1 -1
- package/js/src/delta.js +1 -1
- package/js/src/digifinex.d.ts +1 -1
- package/js/src/digifinex.js +1 -1
- package/js/src/exmo.d.ts +35 -0
- package/js/src/exmo.js +64 -6
- package/js/src/gate.d.ts +1 -1
- package/js/src/gate.js +2 -2
- package/js/src/hashkey.d.ts +1 -1
- package/js/src/hashkey.js +3 -5
- package/js/src/htx.d.ts +1 -1
- package/js/src/htx.js +2 -2
- package/js/src/hyperliquid.d.ts +21 -2
- package/js/src/hyperliquid.js +66 -2
- package/js/src/kraken.d.ts +14 -8
- package/js/src/kraken.js +130 -27
- package/js/src/kucoin.d.ts +13 -13
- package/js/src/kucoin.js +30 -25
- package/js/src/luno.d.ts +1 -1
- package/js/src/luno.js +1 -1
- package/js/src/mexc.d.ts +1 -2
- package/js/src/mexc.js +138 -2
- package/js/src/ndax.d.ts +1 -1
- package/js/src/ndax.js +1 -1
- package/js/src/okcoin.d.ts +4 -4
- package/js/src/okcoin.js +18 -18
- package/js/src/okx.d.ts +3 -3
- package/js/src/okx.js +27 -22
- package/js/src/phemex.js +12 -8
- package/js/src/poloniex.d.ts +1 -1
- package/js/src/poloniex.js +1 -1
- package/js/src/poloniexfutures.d.ts +1 -1
- package/js/src/poloniexfutures.js +6 -6
- package/js/src/pro/bitget.d.ts +1 -1
- package/js/src/pro/bitget.js +1 -1
- package/js/src/pro/bybit.d.ts +1 -1
- package/js/src/pro/bybit.js +13 -1
- package/js/src/pro/coinex.js +2 -2
- package/js/src/pro/gate.d.ts +2 -2
- package/js/src/pro/gate.js +6 -6
- package/js/src/pro/kucoin.d.ts +1 -1
- package/js/src/pro/kucoin.js +3 -3
- package/js/src/pro/okx.d.ts +2 -2
- package/js/src/pro/okx.js +11 -11
- package/js/src/pro/upbit.d.ts +3 -3
- package/js/src/pro/upbit.js +3 -3
- package/js/src/vertex.d.ts +3 -3
- package/js/src/vertex.js +11 -11
- package/js/src/woo.d.ts +7 -7
- package/js/src/woo.js +33 -33
- package/js/src/woofipro.d.ts +1 -1
- package/js/src/woofipro.js +24 -24
- package/js/src/xt.d.ts +7 -7
- package/js/src/xt.js +31 -28
- package/js/src/zonda.d.ts +1 -1
- package/js/src/zonda.js +1 -1
- package/package.json +2 -2
package/dist/cjs/src/zonda.js
CHANGED
|
@@ -849,7 +849,7 @@ class zonda extends zonda$1 {
|
|
|
849
849
|
* @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
|
|
850
850
|
* @param {int} [limit] max number of ledger entries to return, default is undefined
|
|
851
851
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
852
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
852
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
853
853
|
*/
|
|
854
854
|
async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
|
|
855
855
|
const balanceCurrencies = [];
|
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, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio } from './src/base/types.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, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OpenInterests } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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.4.
|
|
7
|
+
declare const version = "4.4.40";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -573,5 +573,5 @@ declare const ccxt: {
|
|
|
573
573
|
zaif: typeof zaif;
|
|
574
574
|
zonda: typeof zonda;
|
|
575
575
|
} & typeof functions & typeof errors;
|
|
576
|
-
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, 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, LongShortRatio, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitcoincom, bitfinex, bitfinex1, 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, coincatch, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, defx, delta, deribit, digifinex, ellipx, exmo, fmfwio, gate, gateio, gemini, hashkey, hitbtc, 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, paradex, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
576
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, 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, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, 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, OpenInterests, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, LongShortRatio, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitcoincom, bitfinex, bitfinex1, 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, coincatch, coincheck, coinex, coinlist, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, currencycom, defx, delta, deribit, digifinex, ellipx, exmo, fmfwio, gate, gateio, gemini, hashkey, hitbtc, 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, paradex, paymium, phemex, poloniex, poloniexfutures, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, wazirx, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
577
577
|
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, 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.4.
|
|
41
|
+
const version = '4.4.41';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
|
@@ -24,6 +24,7 @@ interface Exchange {
|
|
|
24
24
|
publicGetContractPublicDepth(params?: {}): Promise<implicitReturnType>;
|
|
25
25
|
publicGetContractPublicOpenInterest(params?: {}): Promise<implicitReturnType>;
|
|
26
26
|
publicGetContractPublicFundingRate(params?: {}): Promise<implicitReturnType>;
|
|
27
|
+
publicGetContractPublicFundingRateHistory(params?: {}): Promise<implicitReturnType>;
|
|
27
28
|
publicGetContractPublicKline(params?: {}): Promise<implicitReturnType>;
|
|
28
29
|
publicGetAccountV1Currencies(params?: {}): Promise<implicitReturnType>;
|
|
29
30
|
privateGetAccountSubAccountV1TransferList(params?: {}): Promise<implicitReturnType>;
|
|
@@ -63,6 +64,7 @@ interface Exchange {
|
|
|
63
64
|
privateGetContractPrivatePositionRisk(params?: {}): Promise<implicitReturnType>;
|
|
64
65
|
privateGetContractPrivateAffilateRebateList(params?: {}): Promise<implicitReturnType>;
|
|
65
66
|
privateGetContractPrivateAffilateTradeList(params?: {}): Promise<implicitReturnType>;
|
|
67
|
+
privateGetContractPrivateTransactionHistory(params?: {}): Promise<implicitReturnType>;
|
|
66
68
|
privatePostAccountSubAccountMainV1SubToMain(params?: {}): Promise<implicitReturnType>;
|
|
67
69
|
privatePostAccountSubAccountSubV1SubToMain(params?: {}): Promise<implicitReturnType>;
|
|
68
70
|
privatePostAccountSubAccountMainV1MainToSub(params?: {}): Promise<implicitReturnType>;
|
package/js/src/abstract/okx.d.ts
CHANGED
|
@@ -67,6 +67,7 @@ interface Exchange {
|
|
|
67
67
|
publicGetTradingBotPublicRsiBackTesting(params?: {}): Promise<implicitReturnType>;
|
|
68
68
|
publicGetAssetExchangeList(params?: {}): Promise<implicitReturnType>;
|
|
69
69
|
publicGetFinanceStakingDefiEthApyHistory(params?: {}): Promise<implicitReturnType>;
|
|
70
|
+
publicGetFinanceStakingDefiSolApyHistory(params?: {}): Promise<implicitReturnType>;
|
|
70
71
|
publicGetFinanceSavingsLendingRateSummary(params?: {}): Promise<implicitReturnType>;
|
|
71
72
|
publicGetFinanceSavingsLendingRateHistory(params?: {}): Promise<implicitReturnType>;
|
|
72
73
|
publicGetFinanceFixedLoanLendingOffers(params?: {}): Promise<implicitReturnType>;
|
|
@@ -190,6 +191,8 @@ interface Exchange {
|
|
|
190
191
|
privateGetFinanceStakingDefiEthBalance(params?: {}): Promise<implicitReturnType>;
|
|
191
192
|
privateGetFinanceStakingDefiEthPurchaseRedeemHistory(params?: {}): Promise<implicitReturnType>;
|
|
192
193
|
privateGetFinanceStakingDefiEthProductInfo(params?: {}): Promise<implicitReturnType>;
|
|
194
|
+
privateGetFinanceStakingDefiSolBalance(params?: {}): Promise<implicitReturnType>;
|
|
195
|
+
privateGetFinanceStakingDefiSolPurchaseRedeemHistory(params?: {}): Promise<implicitReturnType>;
|
|
193
196
|
privateGetCopytradingCurrentSubpositions(params?: {}): Promise<implicitReturnType>;
|
|
194
197
|
privateGetCopytradingSubpositionsHistory(params?: {}): Promise<implicitReturnType>;
|
|
195
198
|
privateGetCopytradingInstruments(params?: {}): Promise<implicitReturnType>;
|
|
@@ -310,6 +313,8 @@ interface Exchange {
|
|
|
310
313
|
privatePostFinanceStakingDefiCancel(params?: {}): Promise<implicitReturnType>;
|
|
311
314
|
privatePostFinanceStakingDefiEthPurchase(params?: {}): Promise<implicitReturnType>;
|
|
312
315
|
privatePostFinanceStakingDefiEthRedeem(params?: {}): Promise<implicitReturnType>;
|
|
316
|
+
privatePostFinanceStakingDefiSolPurchase(params?: {}): Promise<implicitReturnType>;
|
|
317
|
+
privatePostFinanceStakingDefiSolRedeem(params?: {}): Promise<implicitReturnType>;
|
|
313
318
|
privatePostCopytradingAlgoOrder(params?: {}): Promise<implicitReturnType>;
|
|
314
319
|
privatePostCopytradingCloseSubposition(params?: {}): Promise<implicitReturnType>;
|
|
315
320
|
privatePostCopytradingSetInstruments(params?: {}): Promise<implicitReturnType>;
|
package/js/src/ascendex.d.ts
CHANGED
|
@@ -137,7 +137,7 @@ export default class ascendex extends Exchange {
|
|
|
137
137
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
138
138
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
139
139
|
* @param {bool} [params.postOnly] true or false
|
|
140
|
-
* @param {float} [params.
|
|
140
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
141
141
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered (perpetual swap markets only)
|
|
142
142
|
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
143
143
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered (perpetual swap markets only)
|
|
@@ -155,7 +155,7 @@ export default class ascendex extends Exchange {
|
|
|
155
155
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
156
156
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
157
157
|
* @param {bool} [params.postOnly] true or false
|
|
158
|
-
* @param {float} [params.
|
|
158
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
159
159
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
160
160
|
*/
|
|
161
161
|
createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
|
package/js/src/ascendex.js
CHANGED
|
@@ -1397,7 +1397,7 @@ export default class ascendex extends Exchange {
|
|
|
1397
1397
|
'currency': feeCurrencyCode,
|
|
1398
1398
|
};
|
|
1399
1399
|
}
|
|
1400
|
-
const
|
|
1400
|
+
const triggerPrice = this.omitZero(this.safeString(order, 'stopPrice'));
|
|
1401
1401
|
let reduceOnly = undefined;
|
|
1402
1402
|
const execInst = this.safeString(order, 'execInst');
|
|
1403
1403
|
if (execInst === 'reduceOnly') {
|
|
@@ -1421,8 +1421,8 @@ export default class ascendex extends Exchange {
|
|
|
1421
1421
|
'reduceOnly': reduceOnly,
|
|
1422
1422
|
'side': side,
|
|
1423
1423
|
'price': price,
|
|
1424
|
-
'stopPrice':
|
|
1425
|
-
'triggerPrice':
|
|
1424
|
+
'stopPrice': triggerPrice,
|
|
1425
|
+
'triggerPrice': triggerPrice,
|
|
1426
1426
|
'amount': amount,
|
|
1427
1427
|
'cost': undefined,
|
|
1428
1428
|
'average': average,
|
|
@@ -1498,7 +1498,7 @@ export default class ascendex extends Exchange {
|
|
|
1498
1498
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1499
1499
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1500
1500
|
* @param {bool} [params.postOnly] true or false
|
|
1501
|
-
* @param {float} [params.
|
|
1501
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1502
1502
|
* @returns {object} request to be sent to the exchange
|
|
1503
1503
|
*/
|
|
1504
1504
|
const market = this.market(symbol);
|
|
@@ -1530,7 +1530,7 @@ export default class ascendex extends Exchange {
|
|
|
1530
1530
|
const timeInForce = this.safeString(params, 'timeInForce');
|
|
1531
1531
|
const postOnly = this.isPostOnly(isMarketOrder, false, params);
|
|
1532
1532
|
const reduceOnly = this.safeBool(params, 'reduceOnly', false);
|
|
1533
|
-
const
|
|
1533
|
+
const triggerPrice = this.safeString2(params, 'triggerPrice', 'stopPrice');
|
|
1534
1534
|
if (isLimitOrder) {
|
|
1535
1535
|
request['orderPrice'] = this.priceToPrecision(symbol, price);
|
|
1536
1536
|
}
|
|
@@ -1543,8 +1543,8 @@ export default class ascendex extends Exchange {
|
|
|
1543
1543
|
if (postOnly) {
|
|
1544
1544
|
request['postOnly'] = true;
|
|
1545
1545
|
}
|
|
1546
|
-
if (
|
|
1547
|
-
request['stopPrice'] = this.priceToPrecision(symbol,
|
|
1546
|
+
if (triggerPrice !== undefined) {
|
|
1547
|
+
request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
|
|
1548
1548
|
if (isLimitOrder) {
|
|
1549
1549
|
request['orderType'] = 'stop_limit';
|
|
1550
1550
|
}
|
|
@@ -1586,7 +1586,7 @@ export default class ascendex extends Exchange {
|
|
|
1586
1586
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1587
1587
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1588
1588
|
* @param {bool} [params.postOnly] true or false
|
|
1589
|
-
* @param {float} [params.
|
|
1589
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1590
1590
|
* @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered (perpetual swap markets only)
|
|
1591
1591
|
* @param {float} [params.takeProfit.triggerPrice] *swap only* take profit trigger price
|
|
1592
1592
|
* @param {object} [params.stopLoss] *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered (perpetual swap markets only)
|
|
@@ -1682,7 +1682,7 @@ export default class ascendex extends Exchange {
|
|
|
1682
1682
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1683
1683
|
* @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
|
|
1684
1684
|
* @param {bool} [params.postOnly] true or false
|
|
1685
|
-
* @param {float} [params.
|
|
1685
|
+
* @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
|
|
1686
1686
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1687
1687
|
*/
|
|
1688
1688
|
async createOrders(orders, params = {}) {
|
|
@@ -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, FundingRates, LeverageTiers, Bool, int, DepositAddress, LongShortRatio } from './types.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, FundingRates, LeverageTiers, Bool, int, DepositAddress, LongShortRatio, OpenInterests } 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, DepositAddress, LongShortRatio } from './types.js';
|
|
8
8
|
import { ArrayCache, ArrayCacheByTimestamp } from './ws/Cache.js';
|
|
9
9
|
import { OrderBook as Ob } from './ws/OrderBook.js';
|
|
@@ -531,6 +531,7 @@ export default class Exchange {
|
|
|
531
531
|
fetchOHLCV: any;
|
|
532
532
|
fetchOHLCVWs: any;
|
|
533
533
|
fetchOpenInterest: any;
|
|
534
|
+
fetchOpenInterests: any;
|
|
534
535
|
fetchOpenInterestHistory: any;
|
|
535
536
|
fetchOpenOrder: any;
|
|
536
537
|
fetchOpenOrders: any;
|
|
@@ -815,6 +816,7 @@ export default class Exchange {
|
|
|
815
816
|
fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<DepositAddress[]>;
|
|
816
817
|
fetchOpenInterestHistory(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OpenInterest[]>;
|
|
817
818
|
fetchOpenInterest(symbol: string, params?: {}): Promise<OpenInterest>;
|
|
819
|
+
fetchOpenInterests(symbols?: Strings, params?: {}): Promise<OpenInterests>;
|
|
818
820
|
signIn(params?: {}): Promise<{}>;
|
|
819
821
|
fetchPaymentMethods(params?: {}): Promise<{}>;
|
|
820
822
|
parseToInt(number: any): number;
|
|
@@ -1124,6 +1126,7 @@ export default class Exchange {
|
|
|
1124
1126
|
safeSymbol(marketId: Str, market?: Market, delimiter?: Str, marketType?: Str): string;
|
|
1125
1127
|
parseFundingRate(contract: string, market?: Market): FundingRate;
|
|
1126
1128
|
parseFundingRates(response: any, market?: Market): FundingRates;
|
|
1129
|
+
parseOpenInterests(response: any, market?: Market): OpenInterests;
|
|
1127
1130
|
parseLongShortRatio(info: Dict, market?: Market): LongShortRatio;
|
|
1128
1131
|
parseLongShortRatioHistory(response: any, market?: any, since?: Int, limit?: Int): LongShortRatio[];
|
|
1129
1132
|
handleTriggerAndParams(params: any): any[];
|
|
@@ -1136,7 +1139,7 @@ export default class Exchange {
|
|
|
1136
1139
|
fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
|
|
1137
1140
|
fetchConvertCurrencies(params?: {}): Promise<Currencies>;
|
|
1138
1141
|
parseOpenInterest(interest: any, market?: Market): OpenInterest;
|
|
1139
|
-
|
|
1142
|
+
parseOpenInterestsHistory(response: any, market?: any, since?: Int, limit?: Int): OpenInterest[];
|
|
1140
1143
|
fetchFundingRate(symbol: string, params?: {}): Promise<FundingRate>;
|
|
1141
1144
|
fetchFundingInterval(symbol: string, params?: {}): Promise<FundingRate>;
|
|
1142
1145
|
fetchMarkOHLCV(symbol: any, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
@@ -1159,7 +1162,7 @@ export default class Exchange {
|
|
|
1159
1162
|
filterByArrayTickers(objects: any, key: IndexType, values?: any, indexed?: boolean): Dictionary<Ticker>;
|
|
1160
1163
|
createOHLCVObject(symbol: string, timeframe: string, data: any): Dictionary<Dictionary<OHLCV[]>>;
|
|
1161
1164
|
handleMaxEntriesPerRequestAndParams(method: string, maxEntriesPerRequest?: Int, params?: {}): [Int, any];
|
|
1162
|
-
fetchPaginatedCallDynamic(method: string, symbol?: Str, since?: Int, limit?: Int, params?: {}, maxEntriesPerRequest?: Int): Promise<any>;
|
|
1165
|
+
fetchPaginatedCallDynamic(method: string, symbol?: Str, since?: Int, limit?: Int, params?: {}, maxEntriesPerRequest?: Int, removeRepeated?: boolean): Promise<any>;
|
|
1163
1166
|
safeDeterministicCall(method: string, symbol?: Str, since?: Int, limit?: Int, timeframe?: Str, params?: {}): Promise<any>;
|
|
1164
1167
|
fetchPaginatedCallDeterministic(method: string, symbol?: Str, since?: Int, limit?: Int, timeframe?: Str, params?: {}, maxEntriesPerRequest?: any): Promise<any>;
|
|
1165
1168
|
fetchPaginatedCallCursor(method: string, symbol?: Str, since?: any, limit?: any, params?: {}, cursorReceived?: any, cursorSent?: any, cursorIncrement?: any, maxEntriesPerRequest?: any): Promise<any>;
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -1427,6 +1427,7 @@ export default class Exchange {
|
|
|
1427
1427
|
'fetchOHLCV': undefined,
|
|
1428
1428
|
'fetchOHLCVWs': undefined,
|
|
1429
1429
|
'fetchOpenInterest': undefined,
|
|
1430
|
+
'fetchOpenInterests': undefined,
|
|
1430
1431
|
'fetchOpenInterestHistory': undefined,
|
|
1431
1432
|
'fetchOpenOrder': undefined,
|
|
1432
1433
|
'fetchOpenOrders': undefined,
|
|
@@ -1822,31 +1823,25 @@ export default class Exchange {
|
|
|
1822
1823
|
let wssProxy = undefined;
|
|
1823
1824
|
let wsSocksProxy = undefined;
|
|
1824
1825
|
// ws proxy
|
|
1825
|
-
|
|
1826
|
+
const isWsProxyDefined = this.valueIsDefined(this.wsProxy);
|
|
1827
|
+
const is_ws_proxy_defined = this.valueIsDefined(this.ws_proxy);
|
|
1828
|
+
if (isWsProxyDefined || is_ws_proxy_defined) {
|
|
1826
1829
|
usedProxies.push('wsProxy');
|
|
1827
|
-
wsProxy = this.wsProxy;
|
|
1828
|
-
}
|
|
1829
|
-
if (this.valueIsDefined(this.ws_proxy)) {
|
|
1830
|
-
usedProxies.push('ws_proxy');
|
|
1831
|
-
wsProxy = this.ws_proxy;
|
|
1830
|
+
wsProxy = (isWsProxyDefined) ? this.wsProxy : this.ws_proxy;
|
|
1832
1831
|
}
|
|
1833
1832
|
// wss proxy
|
|
1834
|
-
|
|
1833
|
+
const isWssProxyDefined = this.valueIsDefined(this.wssProxy);
|
|
1834
|
+
const is_wss_proxy_defined = this.valueIsDefined(this.wss_proxy);
|
|
1835
|
+
if (isWssProxyDefined || is_wss_proxy_defined) {
|
|
1835
1836
|
usedProxies.push('wssProxy');
|
|
1836
|
-
wssProxy = this.wssProxy;
|
|
1837
|
-
}
|
|
1838
|
-
if (this.valueIsDefined(this.wss_proxy)) {
|
|
1839
|
-
usedProxies.push('wss_proxy');
|
|
1840
|
-
wssProxy = this.wss_proxy;
|
|
1837
|
+
wssProxy = (isWssProxyDefined) ? this.wssProxy : this.wss_proxy;
|
|
1841
1838
|
}
|
|
1842
1839
|
// ws socks proxy
|
|
1843
|
-
|
|
1840
|
+
const isWsSocksProxyDefined = this.valueIsDefined(this.wsSocksProxy);
|
|
1841
|
+
const is_ws_socks_proxy_defined = this.valueIsDefined(this.ws_socks_proxy);
|
|
1842
|
+
if (isWsSocksProxyDefined || is_ws_socks_proxy_defined) {
|
|
1844
1843
|
usedProxies.push('wsSocksProxy');
|
|
1845
|
-
wsSocksProxy = this.wsSocksProxy;
|
|
1846
|
-
}
|
|
1847
|
-
if (this.valueIsDefined(this.ws_socks_proxy)) {
|
|
1848
|
-
usedProxies.push('ws_socks_proxy');
|
|
1849
|
-
wsSocksProxy = this.ws_socks_proxy;
|
|
1844
|
+
wsSocksProxy = (isWsSocksProxyDefined) ? this.wsSocksProxy : this.ws_socks_proxy;
|
|
1850
1845
|
}
|
|
1851
1846
|
// check
|
|
1852
1847
|
const length = usedProxies.length;
|
|
@@ -2267,6 +2262,9 @@ export default class Exchange {
|
|
|
2267
2262
|
async fetchOpenInterest(symbol, params = {}) {
|
|
2268
2263
|
throw new NotSupported(this.id + ' fetchOpenInterest() is not supported yet');
|
|
2269
2264
|
}
|
|
2265
|
+
async fetchOpenInterests(symbols = undefined, params = {}) {
|
|
2266
|
+
throw new NotSupported(this.id + ' fetchOpenInterests() is not supported yet');
|
|
2267
|
+
}
|
|
2270
2268
|
async signIn(params = {}) {
|
|
2271
2269
|
throw new NotSupported(this.id + ' signIn() is not supported yet');
|
|
2272
2270
|
}
|
|
@@ -5722,6 +5720,14 @@ export default class Exchange {
|
|
|
5722
5720
|
}
|
|
5723
5721
|
return result;
|
|
5724
5722
|
}
|
|
5723
|
+
parseOpenInterests(response, market = undefined) {
|
|
5724
|
+
const result = {};
|
|
5725
|
+
for (let i = 0; i < response.length; i++) {
|
|
5726
|
+
const parsed = this.parseOpenInterest(response[i], market);
|
|
5727
|
+
result[parsed['symbol']] = parsed;
|
|
5728
|
+
}
|
|
5729
|
+
return result;
|
|
5730
|
+
}
|
|
5725
5731
|
parseLongShortRatio(info, market = undefined) {
|
|
5726
5732
|
throw new NotSupported(this.id + ' parseLongShortRatio() is not supported yet');
|
|
5727
5733
|
}
|
|
@@ -5831,7 +5837,7 @@ export default class Exchange {
|
|
|
5831
5837
|
parseOpenInterest(interest, market = undefined) {
|
|
5832
5838
|
throw new NotSupported(this.id + ' parseOpenInterest () is not supported yet');
|
|
5833
5839
|
}
|
|
5834
|
-
|
|
5840
|
+
parseOpenInterestsHistory(response, market = undefined, since = undefined, limit = undefined) {
|
|
5835
5841
|
const interests = [];
|
|
5836
5842
|
for (let i = 0; i < response.length; i++) {
|
|
5837
5843
|
const entry = response[i];
|
|
@@ -6183,7 +6189,7 @@ export default class Exchange {
|
|
|
6183
6189
|
}
|
|
6184
6190
|
return [maxEntriesPerRequest, params];
|
|
6185
6191
|
}
|
|
6186
|
-
async fetchPaginatedCallDynamic(method, symbol = undefined, since = undefined, limit = undefined, params = {}, maxEntriesPerRequest = undefined) {
|
|
6192
|
+
async fetchPaginatedCallDynamic(method, symbol = undefined, since = undefined, limit = undefined, params = {}, maxEntriesPerRequest = undefined, removeRepeated = true) {
|
|
6187
6193
|
let maxCalls = undefined;
|
|
6188
6194
|
[maxCalls, params] = this.handleOptionAndParams(params, method, 'paginationCalls', 10);
|
|
6189
6195
|
let maxRetries = undefined;
|
|
@@ -6191,6 +6197,8 @@ export default class Exchange {
|
|
|
6191
6197
|
let paginationDirection = undefined;
|
|
6192
6198
|
[paginationDirection, params] = this.handleOptionAndParams(params, method, 'paginationDirection', 'backward');
|
|
6193
6199
|
let paginationTimestamp = undefined;
|
|
6200
|
+
let removeRepeatedOption = removeRepeated;
|
|
6201
|
+
[removeRepeatedOption, params] = this.handleOptionAndParams(params, method, 'removeRepeated', removeRepeated);
|
|
6194
6202
|
let calls = 0;
|
|
6195
6203
|
let result = [];
|
|
6196
6204
|
let errors = 0;
|
|
@@ -6261,7 +6269,10 @@ export default class Exchange {
|
|
|
6261
6269
|
}
|
|
6262
6270
|
}
|
|
6263
6271
|
}
|
|
6264
|
-
|
|
6272
|
+
let uniqueResults = result;
|
|
6273
|
+
if (removeRepeatedOption) {
|
|
6274
|
+
uniqueResults = this.removeRepeatedElementsFromArray(result);
|
|
6275
|
+
}
|
|
6265
6276
|
const key = (method === 'fetchOHLCV') ? 0 : 'timestamp';
|
|
6266
6277
|
return this.filterBySinceLimit(uniqueResults, since, limit, key);
|
|
6267
6278
|
}
|
package/js/src/base/types.d.ts
CHANGED
package/js/src/binance.d.ts
CHANGED
|
@@ -429,7 +429,7 @@ export default class binance extends Exchange {
|
|
|
429
429
|
* @param {int} [params.until] the latest time in ms to fetch orders for
|
|
430
430
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
431
431
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
432
|
-
* @param {boolean} [params.
|
|
432
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
433
433
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
434
434
|
*/
|
|
435
435
|
fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
@@ -452,7 +452,7 @@ export default class binance extends Exchange {
|
|
|
452
452
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
453
453
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
454
454
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch open orders in the portfolio margin account
|
|
455
|
-
* @param {boolean} [params.
|
|
455
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account conditional orders
|
|
456
456
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
457
457
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
458
458
|
*/
|
|
@@ -493,7 +493,7 @@ export default class binance extends Exchange {
|
|
|
493
493
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
494
494
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
495
495
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
496
|
-
* @param {boolean} [params.
|
|
496
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
497
497
|
* @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
498
498
|
*/
|
|
499
499
|
fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
@@ -516,7 +516,7 @@ export default class binance extends Exchange {
|
|
|
516
516
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
517
517
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
518
518
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
519
|
-
* @param {boolean} [params.
|
|
519
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
520
520
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
521
521
|
*/
|
|
522
522
|
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
@@ -539,7 +539,7 @@ export default class binance extends Exchange {
|
|
|
539
539
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
540
540
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
541
541
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch orders in a portfolio margin account
|
|
542
|
-
* @param {boolean} [params.
|
|
542
|
+
* @param {boolean} [params.trigger] set to true if you would like to fetch portfolio margin account trigger or conditional orders
|
|
543
543
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
544
544
|
*/
|
|
545
545
|
fetchCanceledAndClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
@@ -561,7 +561,7 @@ export default class binance extends Exchange {
|
|
|
561
561
|
* @param {string} symbol unified symbol of the market the order was made in
|
|
562
562
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
563
563
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel an order in a portfolio margin account
|
|
564
|
-
* @param {boolean} [params.
|
|
564
|
+
* @param {boolean} [params.trigger] set to true if you would like to cancel a portfolio margin account conditional order
|
|
565
565
|
* @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
566
566
|
*/
|
|
567
567
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
@@ -582,7 +582,7 @@ export default class binance extends Exchange {
|
|
|
582
582
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
583
583
|
* @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
|
|
584
584
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to cancel orders in a portfolio margin account
|
|
585
|
-
* @param {boolean} [params.
|
|
585
|
+
* @param {boolean} [params.trigger] set to true if you would like to cancel portfolio margin account conditional orders
|
|
586
586
|
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
587
587
|
*/
|
|
588
588
|
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
@@ -1143,7 +1143,7 @@ export default class binance extends Exchange {
|
|
|
1143
1143
|
* @param {string} id the identification number of the ledger entry
|
|
1144
1144
|
* @param {string} code unified currency code
|
|
1145
1145
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1146
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
1146
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
1147
1147
|
*/
|
|
1148
1148
|
fetchLedgerEntry(id: string, code?: Str, params?: {}): Promise<LedgerEntry>;
|
|
1149
1149
|
/**
|
|
@@ -1163,7 +1163,7 @@ export default class binance extends Exchange {
|
|
|
1163
1163
|
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
|
1164
1164
|
* @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the ledger for a portfolio margin account
|
|
1165
1165
|
* @param {string} [params.subType] "linear" or "inverse"
|
|
1166
|
-
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger
|
|
1166
|
+
* @returns {object} a [ledger structure]{@link https://docs.ccxt.com/#/?id=ledger}
|
|
1167
1167
|
*/
|
|
1168
1168
|
fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
|
|
1169
1169
|
parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
|