ccxt 4.4.70 → 4.4.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -8
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +1 -6
- package/dist/cjs/src/abstract/poloniexfutures.js +1 -1
- package/dist/cjs/src/base/Exchange.js +22 -0
- package/dist/cjs/src/binance.js +106 -101
- package/dist/cjs/src/bingx.js +64 -42
- package/dist/cjs/src/bitget.js +1 -5
- package/dist/cjs/src/bitmart.js +15 -1
- package/dist/cjs/src/bitopro.js +1 -0
- package/dist/cjs/src/bitrue.js +1 -0
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/coinbaseexchange.js +1 -0
- package/dist/cjs/src/deribit.js +1 -0
- package/dist/cjs/src/hashkey.js +4 -2
- package/dist/cjs/src/kraken.js +83 -6
- package/dist/cjs/src/kucoin.js +4 -2
- package/dist/cjs/src/mexc.js +8 -4
- package/dist/cjs/src/okx.js +58 -46
- package/dist/cjs/src/poloniex.js +1311 -81
- package/dist/cjs/src/poloniexfutures.js +1 -1
- package/dist/cjs/src/pro/binance.js +94 -94
- package/dist/cjs/src/pro/bingx.js +63 -52
- package/dist/cjs/src/pro/poloniexfutures.js +1 -1
- package/dist/cjs/src/whitebit.js +4 -2
- package/js/ccxt.d.ts +3 -9
- package/js/ccxt.js +2 -6
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/abstract/bitmart.d.ts +1 -0
- package/js/src/abstract/poloniex.d.ts +36 -0
- package/js/src/abstract/poloniexfutures.js +6 -0
- package/js/src/base/Exchange.d.ts +11 -2
- package/js/src/base/Exchange.js +22 -0
- package/js/src/base/types.d.ts +31 -0
- package/js/src/binance.d.ts +98 -97
- package/js/src/binance.js +106 -101
- package/js/src/bingx.js +64 -42
- package/js/src/bitget.js +1 -5
- package/js/src/bitmart.d.ts +1 -0
- package/js/src/bitmart.js +15 -1
- package/js/src/bitopro.js +1 -0
- package/js/src/bitrue.js +1 -0
- package/js/src/cex.js +1 -0
- package/js/src/coinbaseexchange.js +1 -0
- package/js/src/deribit.js +1 -0
- package/js/src/hashkey.js +4 -2
- package/js/src/kraken.d.ts +1 -0
- package/js/src/kraken.js +83 -6
- package/js/src/kucoin.js +4 -2
- package/js/src/mexc.js +8 -4
- package/js/src/okx.js +58 -46
- package/js/src/poloniex.d.ts +109 -1
- package/js/src/poloniex.js +1311 -81
- package/js/src/poloniexfutures.js +6 -0
- package/js/src/pro/binance.d.ts +94 -94
- package/js/src/pro/binance.js +94 -94
- package/js/src/pro/bingx.js +63 -52
- package/js/src/pro/poloniexfutures.js +6 -0
- package/js/src/whitebit.js +4 -2
- package/package.json +1 -1
package/dist/cjs/src/whitebit.js
CHANGED
|
@@ -1357,9 +1357,11 @@ class whitebit extends whitebit$1 {
|
|
|
1357
1357
|
* @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
|
|
1358
1358
|
*/
|
|
1359
1359
|
async createMarketOrderWithCost(symbol, side, cost, params = {}) {
|
|
1360
|
-
|
|
1360
|
+
const req = {
|
|
1361
|
+
'cost': cost,
|
|
1362
|
+
};
|
|
1361
1363
|
// only buy side is supported
|
|
1362
|
-
return await this.createOrder(symbol, 'market', side, 0, undefined, params);
|
|
1364
|
+
return await this.createOrder(symbol, 'market', side, 0, undefined, this.extend(req, params));
|
|
1363
1365
|
}
|
|
1364
1366
|
/**
|
|
1365
1367
|
* @method
|
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, OrderBooks, OpenInterests } 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, OrderBooks, OpenInterests, ConstructorArgs } 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.70";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -101,7 +101,6 @@ import paradex from './src/paradex.js';
|
|
|
101
101
|
import paymium from './src/paymium.js';
|
|
102
102
|
import phemex from './src/phemex.js';
|
|
103
103
|
import poloniex from './src/poloniex.js';
|
|
104
|
-
import poloniexfutures from './src/poloniexfutures.js';
|
|
105
104
|
import probit from './src/probit.js';
|
|
106
105
|
import timex from './src/timex.js';
|
|
107
106
|
import tokocrypto from './src/tokocrypto.js';
|
|
@@ -182,7 +181,6 @@ import p2bPro from './src/pro/p2b.js';
|
|
|
182
181
|
import paradexPro from './src/pro/paradex.js';
|
|
183
182
|
import phemexPro from './src/pro/phemex.js';
|
|
184
183
|
import poloniexPro from './src/pro/poloniex.js';
|
|
185
|
-
import poloniexfuturesPro from './src/pro/poloniexfutures.js';
|
|
186
184
|
import probitPro from './src/pro/probit.js';
|
|
187
185
|
import upbitPro from './src/pro/upbit.js';
|
|
188
186
|
import vertexPro from './src/pro/vertex.js';
|
|
@@ -287,7 +285,6 @@ declare const exchanges: {
|
|
|
287
285
|
paymium: typeof paymium;
|
|
288
286
|
phemex: typeof phemex;
|
|
289
287
|
poloniex: typeof poloniex;
|
|
290
|
-
poloniexfutures: typeof poloniexfutures;
|
|
291
288
|
probit: typeof probit;
|
|
292
289
|
timex: typeof timex;
|
|
293
290
|
tokocrypto: typeof tokocrypto;
|
|
@@ -370,7 +367,6 @@ declare const pro: {
|
|
|
370
367
|
paradex: typeof paradexPro;
|
|
371
368
|
phemex: typeof phemexPro;
|
|
372
369
|
poloniex: typeof poloniexPro;
|
|
373
|
-
poloniexfutures: typeof poloniexfuturesPro;
|
|
374
370
|
probit: typeof probitPro;
|
|
375
371
|
upbit: typeof upbitPro;
|
|
376
372
|
vertex: typeof vertexPro;
|
|
@@ -451,7 +447,6 @@ declare const ccxt: {
|
|
|
451
447
|
paradex: typeof paradexPro;
|
|
452
448
|
phemex: typeof phemexPro;
|
|
453
449
|
poloniex: typeof poloniexPro;
|
|
454
|
-
poloniexfutures: typeof poloniexfuturesPro;
|
|
455
450
|
probit: typeof probitPro;
|
|
456
451
|
upbit: typeof upbitPro;
|
|
457
452
|
vertex: typeof vertexPro;
|
|
@@ -557,7 +552,6 @@ declare const ccxt: {
|
|
|
557
552
|
paymium: typeof paymium;
|
|
558
553
|
phemex: typeof phemex;
|
|
559
554
|
poloniex: typeof poloniex;
|
|
560
|
-
poloniexfutures: typeof poloniexfutures;
|
|
561
555
|
probit: typeof probit;
|
|
562
556
|
timex: typeof timex;
|
|
563
557
|
tokocrypto: typeof tokocrypto;
|
|
@@ -573,5 +567,5 @@ declare const ccxt: {
|
|
|
573
567
|
zaif: typeof zaif;
|
|
574
568
|
zonda: typeof zonda;
|
|
575
569
|
} & 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, OrderBooks, 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, cryptomus, defx, delta, deribit, derive, 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, mercado, mexc, myokx, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex,
|
|
570
|
+
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, ConstructorArgs, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, MarketInterface, Trade, Order, OrderBook, OrderBooks, 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, cryptomus, defx, delta, deribit, derive, 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, mercado, mexc, myokx, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
577
571
|
export default ccxt;
|
package/js/ccxt.js
CHANGED
|
@@ -32,7 +32,7 @@ import * as errors from './src/base/errors.js';
|
|
|
32
32
|
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';
|
|
33
33
|
//-----------------------------------------------------------------------------
|
|
34
34
|
// this is updated by vss.js when building
|
|
35
|
-
const version = '4.4.
|
|
35
|
+
const version = '4.4.71';
|
|
36
36
|
Exchange.ccxtVersion = version;
|
|
37
37
|
//-----------------------------------------------------------------------------
|
|
38
38
|
import ace from './src/ace.js';
|
|
@@ -131,7 +131,6 @@ import paradex from './src/paradex.js';
|
|
|
131
131
|
import paymium from './src/paymium.js';
|
|
132
132
|
import phemex from './src/phemex.js';
|
|
133
133
|
import poloniex from './src/poloniex.js';
|
|
134
|
-
import poloniexfutures from './src/poloniexfutures.js';
|
|
135
134
|
import probit from './src/probit.js';
|
|
136
135
|
import timex from './src/timex.js';
|
|
137
136
|
import tokocrypto from './src/tokocrypto.js';
|
|
@@ -213,7 +212,6 @@ import p2bPro from './src/pro/p2b.js';
|
|
|
213
212
|
import paradexPro from './src/pro/paradex.js';
|
|
214
213
|
import phemexPro from './src/pro/phemex.js';
|
|
215
214
|
import poloniexPro from './src/pro/poloniex.js';
|
|
216
|
-
import poloniexfuturesPro from './src/pro/poloniexfutures.js';
|
|
217
215
|
import probitPro from './src/pro/probit.js';
|
|
218
216
|
import upbitPro from './src/pro/upbit.js';
|
|
219
217
|
import vertexPro from './src/pro/vertex.js';
|
|
@@ -318,7 +316,6 @@ const exchanges = {
|
|
|
318
316
|
'paymium': paymium,
|
|
319
317
|
'phemex': phemex,
|
|
320
318
|
'poloniex': poloniex,
|
|
321
|
-
'poloniexfutures': poloniexfutures,
|
|
322
319
|
'probit': probit,
|
|
323
320
|
'timex': timex,
|
|
324
321
|
'tokocrypto': tokocrypto,
|
|
@@ -401,7 +398,6 @@ const pro = {
|
|
|
401
398
|
'paradex': paradexPro,
|
|
402
399
|
'phemex': phemexPro,
|
|
403
400
|
'poloniex': poloniexPro,
|
|
404
|
-
'poloniexfutures': poloniexfuturesPro,
|
|
405
401
|
'probit': probitPro,
|
|
406
402
|
'upbit': upbitPro,
|
|
407
403
|
'vertex': vertexPro,
|
|
@@ -422,6 +418,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
422
418
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
423
419
|
//-----------------------------------------------------------------------------
|
|
424
420
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
425
|
-
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, 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, cryptomus, defx, delta, deribit, derive, 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, mercado, mexc, myokx, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex,
|
|
421
|
+
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, 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, cryptomus, defx, delta, deribit, derive, 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, mercado, mexc, myokx, ndax, novadax, oceanex, okcoin, okx, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
426
422
|
export default ccxt;
|
|
427
423
|
//-----------------------------------------------------------------------------
|
|
@@ -15,6 +15,7 @@ interface Exchange {
|
|
|
15
15
|
spotV1PrivateGetTradeMyTrades(params?: {}): Promise<implicitReturnType>;
|
|
16
16
|
spotV1PrivateGetUserCommissionRate(params?: {}): Promise<implicitReturnType>;
|
|
17
17
|
spotV1PrivateGetAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
18
|
+
spotV1PrivateGetAccountAllAccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
18
19
|
spotV1PrivatePostTradeOrder(params?: {}): Promise<implicitReturnType>;
|
|
19
20
|
spotV1PrivatePostTradeCancel(params?: {}): Promise<implicitReturnType>;
|
|
20
21
|
spotV1PrivatePostTradeBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
@@ -107,6 +107,7 @@ interface Exchange {
|
|
|
107
107
|
privatePostContractPrivateSubmitTpSlOrder(params?: {}): Promise<implicitReturnType>;
|
|
108
108
|
privatePostContractPrivateModifyPlanOrder(params?: {}): Promise<implicitReturnType>;
|
|
109
109
|
privatePostContractPrivateModifyPresetPlanOrder(params?: {}): Promise<implicitReturnType>;
|
|
110
|
+
privatePostContractPrivateModifyLimitOrder(params?: {}): Promise<implicitReturnType>;
|
|
110
111
|
privatePostContractPrivateModifyTpSlOrder(params?: {}): Promise<implicitReturnType>;
|
|
111
112
|
privatePostContractPrivateSubmitTrailOrder(params?: {}): Promise<implicitReturnType>;
|
|
112
113
|
privatePostContractPrivateCancelTrailOrder(params?: {}): Promise<implicitReturnType>;
|
|
@@ -66,6 +66,42 @@ interface Exchange {
|
|
|
66
66
|
privateDeleteSmartorders(params?: {}): Promise<implicitReturnType>;
|
|
67
67
|
privatePutOrdersId(params?: {}): Promise<implicitReturnType>;
|
|
68
68
|
privatePutSmartordersId(params?: {}): Promise<implicitReturnType>;
|
|
69
|
+
swapPublicGetV3MarketAllInstruments(params?: {}): Promise<implicitReturnType>;
|
|
70
|
+
swapPublicGetV3MarketInstruments(params?: {}): Promise<implicitReturnType>;
|
|
71
|
+
swapPublicGetV3MarketOrderBook(params?: {}): Promise<implicitReturnType>;
|
|
72
|
+
swapPublicGetV3MarketCandles(params?: {}): Promise<implicitReturnType>;
|
|
73
|
+
swapPublicGetV3MarketIndexPriceCandlesticks(params?: {}): Promise<implicitReturnType>;
|
|
74
|
+
swapPublicGetV3MarketPremiumIndexCandlesticks(params?: {}): Promise<implicitReturnType>;
|
|
75
|
+
swapPublicGetV3MarketMarkPriceCandlesticks(params?: {}): Promise<implicitReturnType>;
|
|
76
|
+
swapPublicGetV3MarketTrades(params?: {}): Promise<implicitReturnType>;
|
|
77
|
+
swapPublicGetV3MarketLiquidationOrder(params?: {}): Promise<implicitReturnType>;
|
|
78
|
+
swapPublicGetV3MarketTickers(params?: {}): Promise<implicitReturnType>;
|
|
79
|
+
swapPublicGetV3MarketMarkPrice(params?: {}): Promise<implicitReturnType>;
|
|
80
|
+
swapPublicGetV3MarketIndexPrice(params?: {}): Promise<implicitReturnType>;
|
|
81
|
+
swapPublicGetV3MarketIndexPriceComponents(params?: {}): Promise<implicitReturnType>;
|
|
82
|
+
swapPublicGetV3MarketFundingRate(params?: {}): Promise<implicitReturnType>;
|
|
83
|
+
swapPublicGetV3MarketOpenInterest(params?: {}): Promise<implicitReturnType>;
|
|
84
|
+
swapPublicGetV3MarketInsurance(params?: {}): Promise<implicitReturnType>;
|
|
85
|
+
swapPublicGetV3MarketRiskLimit(params?: {}): Promise<implicitReturnType>;
|
|
86
|
+
swapPrivateGetV3AccountBalance(params?: {}): Promise<implicitReturnType>;
|
|
87
|
+
swapPrivateGetV3AccountBills(params?: {}): Promise<implicitReturnType>;
|
|
88
|
+
swapPrivateGetV3TradeOrderOpens(params?: {}): Promise<implicitReturnType>;
|
|
89
|
+
swapPrivateGetV3TradeOrderTrades(params?: {}): Promise<implicitReturnType>;
|
|
90
|
+
swapPrivateGetV3TradeOrderHistory(params?: {}): Promise<implicitReturnType>;
|
|
91
|
+
swapPrivateGetV3TradePositionOpens(params?: {}): Promise<implicitReturnType>;
|
|
92
|
+
swapPrivateGetV3TradePositionHistory(params?: {}): Promise<implicitReturnType>;
|
|
93
|
+
swapPrivateGetV3PositionLeverages(params?: {}): Promise<implicitReturnType>;
|
|
94
|
+
swapPrivateGetV3PositionMode(params?: {}): Promise<implicitReturnType>;
|
|
95
|
+
swapPrivatePostV3TradeOrder(params?: {}): Promise<implicitReturnType>;
|
|
96
|
+
swapPrivatePostV3TradeOrders(params?: {}): Promise<implicitReturnType>;
|
|
97
|
+
swapPrivatePostV3TradePosition(params?: {}): Promise<implicitReturnType>;
|
|
98
|
+
swapPrivatePostV3TradePositionAll(params?: {}): Promise<implicitReturnType>;
|
|
99
|
+
swapPrivatePostV3PositionLeverage(params?: {}): Promise<implicitReturnType>;
|
|
100
|
+
swapPrivatePostV3PositionMode(params?: {}): Promise<implicitReturnType>;
|
|
101
|
+
swapPrivatePostV3TradePositionMargin(params?: {}): Promise<implicitReturnType>;
|
|
102
|
+
swapPrivateDeleteV3TradeOrder(params?: {}): Promise<implicitReturnType>;
|
|
103
|
+
swapPrivateDeleteV3TradeBatchOrders(params?: {}): Promise<implicitReturnType>;
|
|
104
|
+
swapPrivateDeleteV3TradeAllOrders(params?: {}): Promise<implicitReturnType>;
|
|
69
105
|
}
|
|
70
106
|
declare abstract class Exchange extends _Exchange {
|
|
71
107
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
// ----------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
+
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
+
// EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
+
|
|
1
7
|
// -------------------------------------------------------------------------------
|
|
2
8
|
import { Exchange as _Exchange } from '../base/Exchange.js';
|
|
3
9
|
class Exchange extends _Exchange {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as functions from './functions.js';
|
|
2
2
|
import WsClient from './ws/WsClient.js';
|
|
3
3
|
import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ws/OrderBook.js';
|
|
4
|
-
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, OrderBooks, OpenInterests } from './types.js';
|
|
4
|
+
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, OrderBooks, OpenInterests, ConstructorArgs } from './types.js';
|
|
5
5
|
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';
|
|
6
6
|
import { ArrayCache, ArrayCacheByTimestamp } from './ws/Cache.js';
|
|
7
7
|
import { OrderBook as Ob } from './ws/OrderBook.js';
|
|
@@ -310,7 +310,7 @@ export default class Exchange {
|
|
|
310
310
|
crc32: typeof functions.crc32;
|
|
311
311
|
packb: typeof functions.packb;
|
|
312
312
|
urlencodeBase64: (payload: string | Uint8Array) => string;
|
|
313
|
-
constructor(userConfig?:
|
|
313
|
+
constructor(userConfig?: ConstructorArgs);
|
|
314
314
|
encodeURIComponent(...args: any[]): string;
|
|
315
315
|
checkRequiredVersion(requiredVersion: any, error?: boolean): boolean;
|
|
316
316
|
throttle(cost?: any): any;
|
|
@@ -609,6 +609,15 @@ export default class Exchange {
|
|
|
609
609
|
handleParamInteger2(params: object, paramName1: string, paramName2: string, defaultValue?: Int): [Int, object];
|
|
610
610
|
handleParamBool(params: object, paramName: string, defaultValue?: Bool): [Bool, object];
|
|
611
611
|
handleParamBool2(params: object, paramName1: string, paramName2: string, defaultValue?: Bool): [Bool, object];
|
|
612
|
+
/**
|
|
613
|
+
* @param {object} params - extra parameters
|
|
614
|
+
* @param {object} request - existing dictionary of request
|
|
615
|
+
* @param {string} exchangeSpecificKey - the key for chain id to be set in request
|
|
616
|
+
* @param {object} currencyCode - (optional) existing dictionary of request
|
|
617
|
+
* @param {boolean} isRequired - (optional) whether that param is required to be present
|
|
618
|
+
* @returns {object[]} - returns [request, params] where request is the modified request object and params is the modified params object
|
|
619
|
+
*/
|
|
620
|
+
handleRequestNetwork(params: Dict, request: Dict, exchangeSpecificKey: string, currencyCode?: Str, isRequired?: boolean): Dict[];
|
|
612
621
|
resolvePath(path: any, params: any): any[];
|
|
613
622
|
getListFromObjectValues(objects: any, key: IndexType): any[];
|
|
614
623
|
getSymbolsForMarketType(marketType?: Str, subType?: Str, symbolWithActiveStatus?: boolean, symbolWithUnknownStatus?: boolean): any[];
|
package/js/src/base/Exchange.js
CHANGED
|
@@ -338,6 +338,9 @@ export default class Exchange {
|
|
|
338
338
|
}
|
|
339
339
|
this.newUpdates = (this.options.newUpdates !== undefined) ? this.options.newUpdates : true;
|
|
340
340
|
this.afterConstruct();
|
|
341
|
+
if (this.safeBool(userConfig, 'sandbox') || this.safeBool(userConfig, 'testnet')) {
|
|
342
|
+
this.setSandboxMode(true);
|
|
343
|
+
}
|
|
341
344
|
}
|
|
342
345
|
encodeURIComponent(...args) {
|
|
343
346
|
// @ts-expect-error
|
|
@@ -4128,6 +4131,25 @@ export default class Exchange {
|
|
|
4128
4131
|
}
|
|
4129
4132
|
return [value, params];
|
|
4130
4133
|
}
|
|
4134
|
+
/**
|
|
4135
|
+
* @param {object} params - extra parameters
|
|
4136
|
+
* @param {object} request - existing dictionary of request
|
|
4137
|
+
* @param {string} exchangeSpecificKey - the key for chain id to be set in request
|
|
4138
|
+
* @param {object} currencyCode - (optional) existing dictionary of request
|
|
4139
|
+
* @param {boolean} isRequired - (optional) whether that param is required to be present
|
|
4140
|
+
* @returns {object[]} - returns [request, params] where request is the modified request object and params is the modified params object
|
|
4141
|
+
*/
|
|
4142
|
+
handleRequestNetwork(params, request, exchangeSpecificKey, currencyCode = undefined, isRequired = false) {
|
|
4143
|
+
let networkCode = undefined;
|
|
4144
|
+
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
4145
|
+
if (networkCode !== undefined) {
|
|
4146
|
+
request[exchangeSpecificKey] = this.networkCodeToId(networkCode, currencyCode);
|
|
4147
|
+
}
|
|
4148
|
+
else if (isRequired) {
|
|
4149
|
+
throw new ArgumentsRequired(this.id + ' - "network" param is required for this request');
|
|
4150
|
+
}
|
|
4151
|
+
return [request, params];
|
|
4152
|
+
}
|
|
4131
4153
|
resolvePath(path, params) {
|
|
4132
4154
|
return [
|
|
4133
4155
|
this.implodeParams(path, params),
|
package/js/src/base/types.d.ts
CHANGED
|
@@ -555,3 +555,34 @@ export declare type OHLCVC = [Num, Num, Num, Num, Num, Num, Num];
|
|
|
555
555
|
export declare type implicitReturnType = any;
|
|
556
556
|
export declare type Market = MarketInterface | undefined;
|
|
557
557
|
export declare type Currency = CurrencyInterface | undefined;
|
|
558
|
+
interface BaseConstructorArgs {
|
|
559
|
+
apiKey?: string;
|
|
560
|
+
secret?: string;
|
|
561
|
+
password?: string;
|
|
562
|
+
privateKey?: string;
|
|
563
|
+
walletAddress?: string;
|
|
564
|
+
uid?: string;
|
|
565
|
+
verbose?: boolean;
|
|
566
|
+
sandbox?: boolean;
|
|
567
|
+
testnet?: boolean;
|
|
568
|
+
options?: Dict;
|
|
569
|
+
enableRateLimit?: boolean;
|
|
570
|
+
httpsProxy?: string;
|
|
571
|
+
socksProxy?: string;
|
|
572
|
+
wssProxy?: string;
|
|
573
|
+
proxy?: string;
|
|
574
|
+
rateLimit?: number;
|
|
575
|
+
commonCurrencies?: Dict;
|
|
576
|
+
userAgent?: string;
|
|
577
|
+
userAgents?: Dict;
|
|
578
|
+
timeout?: number;
|
|
579
|
+
markets?: Dict;
|
|
580
|
+
currencies?: Dict;
|
|
581
|
+
hostname?: string;
|
|
582
|
+
urls?: Dict;
|
|
583
|
+
headers?: Dict;
|
|
584
|
+
}
|
|
585
|
+
export declare type ConstructorArgs = Partial<BaseConstructorArgs> & {
|
|
586
|
+
[key: string]: any;
|
|
587
|
+
};
|
|
588
|
+
export {};
|