ccxt 4.4.85 → 4.4.87
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 +18 -7
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +16 -9
- package/dist/cjs/src/abstract/bittrade.js +9 -0
- package/dist/cjs/src/abstract/modetrade.js +9 -0
- package/dist/cjs/src/ascendex.js +189 -155
- package/dist/cjs/src/base/Exchange.js +10 -8
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/bitget.js +5 -4
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitteam.js +31 -0
- package/dist/cjs/src/bittrade.js +2049 -0
- package/dist/cjs/src/coinbase.js +2 -6
- package/dist/cjs/src/coinmetro.js +5 -1
- package/dist/cjs/src/deribit.js +4 -5
- package/dist/cjs/src/derive.js +4 -5
- package/dist/cjs/src/ellipx.js +2 -3
- package/dist/cjs/src/gate.js +92 -76
- package/dist/cjs/src/hollaex.js +107 -49
- package/dist/cjs/src/htx.js +30 -52
- package/dist/cjs/src/hyperliquid.js +36 -20
- package/dist/cjs/src/kraken.js +5 -8
- package/dist/cjs/src/mexc.js +2 -2
- package/dist/cjs/src/modetrade.js +2839 -0
- package/dist/cjs/src/ndax.js +25 -24
- package/dist/cjs/src/okcoin.js +12 -31
- package/dist/cjs/src/okx.js +104 -2
- package/dist/cjs/src/okxus.js +53 -0
- package/dist/cjs/src/onetrading.js +9 -6
- package/dist/cjs/src/oxfun.js +42 -114
- package/dist/cjs/src/paradex.js +10 -1
- package/dist/cjs/src/phemex.js +4 -6
- package/dist/cjs/src/poloniex.js +181 -170
- package/dist/cjs/src/pro/binance.js +1 -0
- package/dist/cjs/src/pro/bittrade.js +605 -0
- package/dist/cjs/src/pro/luno.js +6 -5
- package/dist/cjs/src/pro/mexc.js +3 -0
- package/dist/cjs/src/pro/modetrade.js +1334 -0
- package/dist/cjs/src/pro/okxus.js +38 -0
- package/dist/cjs/src/probit.js +18 -51
- package/dist/cjs/src/timex.js +5 -10
- package/dist/cjs/src/vertex.js +3 -4
- package/dist/cjs/src/whitebit.js +41 -11
- package/dist/cjs/src/woo.js +101 -77
- package/dist/cjs/src/woofipro.js +24 -21
- package/dist/cjs/src/xt.js +36 -44
- package/js/ccxt.d.ts +20 -11
- package/js/ccxt.js +14 -8
- package/js/src/abstract/modetrade.d.ts +122 -0
- package/js/src/abstract/myokx.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +2 -0
- package/js/src/abstract/okxus.d.ts +352 -0
- package/js/src/abstract/okxus.js +11 -0
- package/js/src/ascendex.d.ts +2 -0
- package/js/src/ascendex.js +189 -155
- package/js/src/base/Exchange.js +10 -8
- package/js/src/bequant.js +1 -1
- package/js/src/binance.js +1 -1
- package/js/src/bitget.js +5 -4
- package/js/src/bitmart.js +1 -1
- package/js/src/bitteam.js +31 -0
- package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
- package/js/src/{huobijp.js → bittrade.js} +35 -35
- package/js/src/coinbase.js +2 -6
- package/js/src/coinmetro.js +5 -1
- package/js/src/deribit.js +4 -5
- package/js/src/derive.js +4 -3
- package/js/src/ellipx.d.ts +1 -1
- package/js/src/ellipx.js +3 -5
- package/js/src/gate.js +92 -76
- package/js/src/hollaex.js +107 -49
- package/js/src/htx.js +30 -52
- package/js/src/hyperliquid.js +36 -20
- package/js/src/kraken.js +5 -8
- package/js/src/mexc.js +2 -2
- package/js/src/modetrade.d.ts +475 -0
- package/js/src/modetrade.js +2840 -0
- package/js/src/ndax.js +25 -24
- package/js/src/okcoin.js +12 -31
- package/js/src/okx.d.ts +24 -1
- package/js/src/okx.js +104 -2
- package/js/src/okxus.d.ts +4 -0
- package/js/src/okxus.js +54 -0
- package/js/src/onetrading.js +9 -6
- package/js/src/oxfun.js +42 -114
- package/js/src/paradex.js +10 -1
- package/js/src/phemex.js +4 -6
- package/js/src/poloniex.d.ts +2 -0
- package/js/src/poloniex.js +181 -170
- package/js/src/pro/binance.js +1 -0
- package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
- package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
- package/js/src/pro/luno.js +6 -5
- package/js/src/pro/mexc.js +3 -0
- package/js/src/pro/modetrade.d.ts +155 -0
- package/js/src/pro/modetrade.js +1335 -0
- package/js/src/pro/okxus.d.ts +4 -0
- package/js/src/pro/okxus.js +39 -0
- package/js/src/probit.js +18 -51
- package/js/src/timex.js +5 -10
- package/js/src/vertex.js +3 -4
- package/js/src/whitebit.js +42 -11
- package/js/src/woo.d.ts +2 -0
- package/js/src/woo.js +101 -77
- package/js/src/woofipro.d.ts +2 -1
- package/js/src/woofipro.js +24 -21
- package/js/src/xt.js +36 -44
- package/package.json +1 -1
- package/js/src/abstract/kuna.d.ts +0 -185
- package/js/src/kuna.d.ts +0 -335
- package/js/src/kuna.js +0 -2006
- /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
- /package/js/src/abstract/{huobijp.js → bittrade.js} +0 -0
- /package/js/src/abstract/{kuna.js → modetrade.js} +0 -0
|
@@ -743,8 +743,10 @@ class Exchange {
|
|
|
743
743
|
// only call if exchange API provides endpoint (true), thus avoid emulated versions ('emulated')
|
|
744
744
|
if (this.has['fetchCurrencies'] === true) {
|
|
745
745
|
currencies = await this.fetchCurrencies();
|
|
746
|
+
this.options['cachedCurrencies'] = currencies;
|
|
746
747
|
}
|
|
747
748
|
const markets = await this.fetchMarkets(params);
|
|
749
|
+
delete this.options['cachedCurrencies'];
|
|
748
750
|
return this.setMarkets(markets, currencies);
|
|
749
751
|
}
|
|
750
752
|
/**
|
|
@@ -3961,12 +3963,12 @@ class Exchange {
|
|
|
3961
3963
|
}
|
|
3962
3964
|
else {
|
|
3963
3965
|
// if networkCode was provided by user, we should check it after response, as the referenced exchange doesn't support network-code during request
|
|
3964
|
-
const
|
|
3965
|
-
if (
|
|
3966
|
-
chosenNetworkId =
|
|
3966
|
+
const networkIdOrCode = isIndexedByUnifiedNetworkCode ? networkCode : this.networkCodeToId(networkCode, currencyCode);
|
|
3967
|
+
if (networkIdOrCode in indexedNetworkEntries) {
|
|
3968
|
+
chosenNetworkId = networkIdOrCode;
|
|
3967
3969
|
}
|
|
3968
3970
|
else {
|
|
3969
|
-
throw new errors.NotSupported(this.id + ' - ' +
|
|
3971
|
+
throw new errors.NotSupported(this.id + ' - ' + networkIdOrCode + ' network was not found for ' + currencyCode + ', use one of ' + availableNetworkIds.join(', '));
|
|
3970
3972
|
}
|
|
3971
3973
|
}
|
|
3972
3974
|
}
|
|
@@ -4308,15 +4310,15 @@ class Exchange {
|
|
|
4308
4310
|
const cost = this.calculateRateLimiterCost(api, method, path, params, config);
|
|
4309
4311
|
await this.throttle(cost);
|
|
4310
4312
|
}
|
|
4313
|
+
let retries = undefined;
|
|
4314
|
+
[retries, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailure', 0);
|
|
4315
|
+
let retryDelay = undefined;
|
|
4316
|
+
[retryDelay, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailureDelay', 0);
|
|
4311
4317
|
this.lastRestRequestTimestamp = this.milliseconds();
|
|
4312
4318
|
const request = this.sign(path, api, method, params, headers, body);
|
|
4313
4319
|
this.last_request_headers = request['headers'];
|
|
4314
4320
|
this.last_request_body = request['body'];
|
|
4315
4321
|
this.last_request_url = request['url'];
|
|
4316
|
-
let retries = undefined;
|
|
4317
|
-
[retries, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailure', 0);
|
|
4318
|
-
let retryDelay = undefined;
|
|
4319
|
-
[retryDelay, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailureDelay', 0);
|
|
4320
4322
|
for (let i = 0; i < retries + 1; i++) {
|
|
4321
4323
|
try {
|
|
4322
4324
|
return await this.fetch(request['url'], request['method'], request['headers'], request['body']);
|
package/dist/cjs/src/bequant.js
CHANGED
|
@@ -9,8 +9,8 @@ class bequant extends hitbtc {
|
|
|
9
9
|
return this.deepExtend(super.describe(), {
|
|
10
10
|
'id': 'bequant',
|
|
11
11
|
'name': 'Bequant',
|
|
12
|
-
'countries': ['MT'],
|
|
13
12
|
'pro': true,
|
|
13
|
+
'countries': ['MT'],
|
|
14
14
|
'urls': {
|
|
15
15
|
'logo': 'https://github.com/user-attachments/assets/0583ef1f-29fe-4b7c-8189-63565a0e2867',
|
|
16
16
|
'api': {
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -5195,7 +5195,6 @@ class binance extends binance$1 {
|
|
|
5195
5195
|
if (postOnly) {
|
|
5196
5196
|
uppercaseType = 'LIMIT_MAKER';
|
|
5197
5197
|
}
|
|
5198
|
-
request['type'] = uppercaseType;
|
|
5199
5198
|
const triggerPrice = this.safeNumber2(params, 'stopPrice', 'triggerPrice');
|
|
5200
5199
|
if (triggerPrice !== undefined) {
|
|
5201
5200
|
if (uppercaseType === 'MARKET') {
|
|
@@ -5205,6 +5204,7 @@ class binance extends binance$1 {
|
|
|
5205
5204
|
uppercaseType = 'STOP_LOSS_LIMIT';
|
|
5206
5205
|
}
|
|
5207
5206
|
}
|
|
5207
|
+
request['type'] = uppercaseType;
|
|
5208
5208
|
const validOrderTypes = this.safeList(market['info'], 'orderTypes');
|
|
5209
5209
|
if (!this.inArray(uppercaseType, validOrderTypes)) {
|
|
5210
5210
|
if (initialUppercaseType !== uppercaseType) {
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -2390,7 +2390,7 @@ class bitget extends bitget$1 {
|
|
|
2390
2390
|
'coin': currency['id'],
|
|
2391
2391
|
'address': address,
|
|
2392
2392
|
'chain': networkId,
|
|
2393
|
-
'size': amount,
|
|
2393
|
+
'size': this.currencyToPrecision(code, amount, networkCode),
|
|
2394
2394
|
'transferType': 'on_chain',
|
|
2395
2395
|
};
|
|
2396
2396
|
if (tag !== undefined) {
|
|
@@ -2415,8 +2415,6 @@ class bitget extends bitget$1 {
|
|
|
2415
2415
|
const fillResponseFromRequest = this.safeBool(withdrawOptions, 'fillResponseFromRequest', true);
|
|
2416
2416
|
if (fillResponseFromRequest) {
|
|
2417
2417
|
result['currency'] = code;
|
|
2418
|
-
result['timestamp'] = this.milliseconds();
|
|
2419
|
-
result['datetime'] = this.iso8601(this.milliseconds());
|
|
2420
2418
|
result['amount'] = amount;
|
|
2421
2419
|
result['tag'] = tag;
|
|
2422
2420
|
result['address'] = address;
|
|
@@ -2540,7 +2538,10 @@ class bitget extends bitget$1 {
|
|
|
2540
2538
|
const status = this.safeString(transaction, 'status');
|
|
2541
2539
|
const tag = this.safeString(transaction, 'tag');
|
|
2542
2540
|
const feeCostString = this.safeString(transaction, 'fee');
|
|
2543
|
-
|
|
2541
|
+
let feeCostAbsString = undefined;
|
|
2542
|
+
if (feeCostString !== undefined) {
|
|
2543
|
+
feeCostAbsString = Precise["default"].stringAbs(feeCostString);
|
|
2544
|
+
}
|
|
2544
2545
|
let fee = undefined;
|
|
2545
2546
|
let amountString = this.safeString(transaction, 'size');
|
|
2546
2547
|
if (feeCostAbsString !== undefined) {
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -2371,7 +2371,7 @@ class bitmart extends bitmart$1 {
|
|
|
2371
2371
|
const code = this.safeCurrencyCode(currencyId);
|
|
2372
2372
|
const account = this.account();
|
|
2373
2373
|
account['free'] = this.safeString2(balance, 'available', 'available_balance');
|
|
2374
|
-
account['used'] = this.
|
|
2374
|
+
account['used'] = this.safeStringN(balance, ['unAvailable', 'frozen', 'frozen_balance']);
|
|
2375
2375
|
result[code] = account;
|
|
2376
2376
|
}
|
|
2377
2377
|
return this.safeBalance(result);
|
package/dist/cjs/src/bitteam.js
CHANGED
|
@@ -29,12 +29,18 @@ class bitteam extends bitteam$1 {
|
|
|
29
29
|
'future': false,
|
|
30
30
|
'option': false,
|
|
31
31
|
'addMargin': false,
|
|
32
|
+
'borrowCrossMargin': false,
|
|
33
|
+
'borrowIsolatedMargin': false,
|
|
32
34
|
'borrowMargin': false,
|
|
33
35
|
'cancelAllOrders': true,
|
|
34
36
|
'cancelOrder': true,
|
|
35
37
|
'cancelOrders': false,
|
|
38
|
+
'closeAllPositions': false,
|
|
39
|
+
'closePosition': false,
|
|
36
40
|
'createDepositAddress': false,
|
|
37
41
|
'createOrder': true,
|
|
42
|
+
'createOrderWithTakeProfitAndStopLoss': false,
|
|
43
|
+
'createOrderWithTakeProfitAndStopLossWs': false,
|
|
38
44
|
'createPostOnlyOrder': false,
|
|
39
45
|
'createReduceOnlyOrder': false,
|
|
40
46
|
'createStopLimitOrder': false,
|
|
@@ -46,8 +52,11 @@ class bitteam extends bitteam$1 {
|
|
|
46
52
|
'fetchBalance': true,
|
|
47
53
|
'fetchBidsAsks': false,
|
|
48
54
|
'fetchBorrowInterest': false,
|
|
55
|
+
'fetchBorrowRate': false,
|
|
49
56
|
'fetchBorrowRateHistories': false,
|
|
50
57
|
'fetchBorrowRateHistory': false,
|
|
58
|
+
'fetchBorrowRates': false,
|
|
59
|
+
'fetchBorrowRatesPerSymbol': false,
|
|
51
60
|
'fetchCanceledOrders': true,
|
|
52
61
|
'fetchClosedOrder': false,
|
|
53
62
|
'fetchClosedOrders': true,
|
|
@@ -63,24 +72,42 @@ class bitteam extends bitteam$1 {
|
|
|
63
72
|
'fetchDepositWithdrawFee': false,
|
|
64
73
|
'fetchDepositWithdrawFees': false,
|
|
65
74
|
'fetchFundingHistory': false,
|
|
75
|
+
'fetchFundingInterval': false,
|
|
76
|
+
'fetchFundingIntervals': false,
|
|
66
77
|
'fetchFundingRate': false,
|
|
67
78
|
'fetchFundingRateHistory': false,
|
|
68
79
|
'fetchFundingRates': false,
|
|
80
|
+
'fetchGreeks': false,
|
|
69
81
|
'fetchIndexOHLCV': false,
|
|
70
82
|
'fetchIsolatedBorrowRate': false,
|
|
71
83
|
'fetchIsolatedBorrowRates': false,
|
|
84
|
+
'fetchIsolatedPositions': false,
|
|
72
85
|
'fetchL3OrderBook': false,
|
|
73
86
|
'fetchLedger': false,
|
|
74
87
|
'fetchLeverage': false,
|
|
88
|
+
'fetchLeverages': false,
|
|
75
89
|
'fetchLeverageTiers': false,
|
|
90
|
+
'fetchLiquidations': false,
|
|
91
|
+
'fetchLongShortRatio': false,
|
|
92
|
+
'fetchLongShortRatioHistory': false,
|
|
93
|
+
'fetchMarginAdjustmentHistory': false,
|
|
94
|
+
'fetchMarginMode': false,
|
|
95
|
+
'fetchMarginModes': false,
|
|
76
96
|
'fetchMarketLeverageTiers': false,
|
|
77
97
|
'fetchMarkets': true,
|
|
78
98
|
'fetchMarkOHLCV': false,
|
|
99
|
+
'fetchMarkPrices': false,
|
|
100
|
+
'fetchMyLiquidations': false,
|
|
101
|
+
'fetchMySettlementHistory': false,
|
|
79
102
|
'fetchMyTrades': true,
|
|
80
103
|
'fetchOHLCV': true,
|
|
104
|
+
'fetchOpenInterest': false,
|
|
81
105
|
'fetchOpenInterestHistory': false,
|
|
106
|
+
'fetchOpenInterests': false,
|
|
82
107
|
'fetchOpenOrder': false,
|
|
83
108
|
'fetchOpenOrders': true,
|
|
109
|
+
'fetchOption': false,
|
|
110
|
+
'fetchOptionChain': false,
|
|
84
111
|
'fetchOrder': true,
|
|
85
112
|
'fetchOrderBook': true,
|
|
86
113
|
'fetchOrderBooks': false,
|
|
@@ -94,6 +121,7 @@ class bitteam extends bitteam$1 {
|
|
|
94
121
|
'fetchPositionsHistory': false,
|
|
95
122
|
'fetchPositionsRisk': false,
|
|
96
123
|
'fetchPremiumIndexOHLCV': false,
|
|
124
|
+
'fetchSettlementHistory': false,
|
|
97
125
|
'fetchStatus': false,
|
|
98
126
|
'fetchTicker': true,
|
|
99
127
|
'fetchTickers': true,
|
|
@@ -106,10 +134,13 @@ class bitteam extends bitteam$1 {
|
|
|
106
134
|
'fetchTransactionFees': false,
|
|
107
135
|
'fetchTransactions': true,
|
|
108
136
|
'fetchTransfers': false,
|
|
137
|
+
'fetchVolatilityHistory': false,
|
|
109
138
|
'fetchWithdrawal': false,
|
|
110
139
|
'fetchWithdrawals': false,
|
|
111
140
|
'fetchWithdrawalWhitelist': false,
|
|
112
141
|
'reduceMargin': false,
|
|
142
|
+
'repayCrossMargin': false,
|
|
143
|
+
'repayIsolatedMargin': false,
|
|
113
144
|
'repayMargin': false,
|
|
114
145
|
'setLeverage': false,
|
|
115
146
|
'setMargin': false,
|