ccxt 4.4.96 → 4.4.98
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 +15 -15
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +2 -1
- package/dist/cjs/src/base/Exchange.js +63 -15
- package/dist/cjs/src/base/errors.js +8 -1
- package/dist/cjs/src/base/functions/number.js +30 -9
- package/dist/cjs/src/binance.js +95 -34
- package/dist/cjs/src/binancecoinm.js +5 -1
- package/dist/cjs/src/binanceus.js +3 -1
- package/dist/cjs/src/binanceusdm.js +3 -1
- package/dist/cjs/src/bingx.js +1 -1
- package/dist/cjs/src/bitget.js +18 -2
- package/dist/cjs/src/coinmetro.js +2 -3
- package/dist/cjs/src/cryptocom.js +77 -1
- package/dist/cjs/src/exmo.js +1 -1
- package/dist/cjs/src/foxbit.js +1 -1
- package/dist/cjs/src/gate.js +1 -2
- package/dist/cjs/src/hashkey.js +39 -0
- package/dist/cjs/src/hyperliquid.js +42 -27
- package/dist/cjs/src/independentreserve.js +35 -0
- package/dist/cjs/src/indodax.js +34 -0
- package/dist/cjs/src/kucoin.js +2 -1
- package/dist/cjs/src/latoken.js +42 -0
- package/dist/cjs/src/luno.js +36 -0
- package/dist/cjs/src/mercado.js +34 -0
- package/dist/cjs/src/mexc.js +3 -25
- package/dist/cjs/src/ndax.js +8 -0
- package/dist/cjs/src/okx.js +1 -0
- package/dist/cjs/src/phemex.js +36 -31
- package/dist/cjs/src/pro/binancecoinm.js +3 -1
- package/dist/cjs/src/pro/binanceus.js +3 -1
- package/dist/cjs/src/pro/binanceusdm.js +3 -1
- package/dist/cjs/src/pro/bybit.js +33 -0
- package/js/ccxt.d.ts +3 -3
- package/js/ccxt.js +3 -3
- package/js/src/abstract/binance.d.ts +3 -0
- package/js/src/abstract/binancecoinm.d.ts +3 -0
- package/js/src/abstract/binanceus.d.ts +3 -0
- package/js/src/abstract/binanceusdm.d.ts +3 -0
- package/js/src/abstract/phemex.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +11 -3
- package/js/src/base/Exchange.js +63 -15
- package/js/src/base/errorHierarchy.d.ts +1 -0
- package/js/src/base/errorHierarchy.js +1 -0
- package/js/src/base/errors.d.ts +5 -1
- package/js/src/base/errors.js +8 -2
- package/js/src/base/functions/number.js +30 -9
- package/js/src/binance.d.ts +1 -0
- package/js/src/binance.js +95 -34
- package/js/src/binancecoinm.js +5 -1
- package/js/src/binanceus.js +3 -1
- package/js/src/binanceusdm.js +3 -1
- package/js/src/bingx.js +1 -1
- package/js/src/bitget.js +18 -2
- package/js/src/coinmetro.js +2 -3
- package/js/src/cryptocom.d.ts +12 -1
- package/js/src/cryptocom.js +77 -1
- package/js/src/exmo.js +1 -1
- package/js/src/foxbit.js +1 -1
- package/js/src/gate.js +1 -2
- package/js/src/hashkey.js +39 -0
- package/js/src/hyperliquid.js +42 -27
- package/js/src/independentreserve.js +35 -0
- package/js/src/indodax.js +34 -0
- package/js/src/kucoin.js +2 -1
- package/js/src/latoken.js +42 -0
- package/js/src/luno.js +36 -0
- package/js/src/mercado.js +34 -0
- package/js/src/mexc.d.ts +0 -1
- package/js/src/mexc.js +3 -25
- package/js/src/ndax.js +8 -0
- package/js/src/okx.js +2 -1
- package/js/src/phemex.js +36 -31
- package/js/src/pro/binancecoinm.js +3 -1
- package/js/src/pro/binanceus.js +3 -1
- package/js/src/pro/binanceusdm.js +3 -1
- package/js/src/pro/bybit.d.ts +11 -1
- package/js/src/pro/bybit.js +33 -0
- package/package.json +1 -2
package/dist/cjs/src/mercado.js
CHANGED
|
@@ -28,6 +28,9 @@ class mercado extends mercado$1 {
|
|
|
28
28
|
'future': false,
|
|
29
29
|
'option': false,
|
|
30
30
|
'addMargin': false,
|
|
31
|
+
'borrowCrossMargin': false,
|
|
32
|
+
'borrowIsolatedMargin': false,
|
|
33
|
+
'borrowMargin': false,
|
|
31
34
|
'cancelOrder': true,
|
|
32
35
|
'closeAllPositions': false,
|
|
33
36
|
'closePosition': false,
|
|
@@ -37,29 +40,54 @@ class mercado extends mercado$1 {
|
|
|
37
40
|
'createStopLimitOrder': false,
|
|
38
41
|
'createStopMarketOrder': false,
|
|
39
42
|
'createStopOrder': false,
|
|
43
|
+
'fetchAllGreeks': false,
|
|
40
44
|
'fetchBalance': true,
|
|
45
|
+
'fetchBorrowInterest': false,
|
|
46
|
+
'fetchBorrowRate': false,
|
|
47
|
+
'fetchBorrowRateHistories': false,
|
|
41
48
|
'fetchBorrowRateHistory': false,
|
|
49
|
+
'fetchBorrowRates': false,
|
|
50
|
+
'fetchBorrowRatesPerSymbol': false,
|
|
42
51
|
'fetchCrossBorrowRate': false,
|
|
43
52
|
'fetchCrossBorrowRates': false,
|
|
44
53
|
'fetchDepositAddress': false,
|
|
45
54
|
'fetchDepositAddresses': false,
|
|
46
55
|
'fetchDepositAddressesByNetwork': false,
|
|
47
56
|
'fetchFundingHistory': false,
|
|
57
|
+
'fetchFundingInterval': false,
|
|
58
|
+
'fetchFundingIntervals': false,
|
|
48
59
|
'fetchFundingRate': false,
|
|
49
60
|
'fetchFundingRateHistory': false,
|
|
50
61
|
'fetchFundingRates': false,
|
|
62
|
+
'fetchGreeks': false,
|
|
51
63
|
'fetchIndexOHLCV': false,
|
|
52
64
|
'fetchIsolatedBorrowRate': false,
|
|
53
65
|
'fetchIsolatedBorrowRates': false,
|
|
66
|
+
'fetchIsolatedPositions': false,
|
|
54
67
|
'fetchLeverage': false,
|
|
68
|
+
'fetchLeverages': false,
|
|
55
69
|
'fetchLeverageTiers': false,
|
|
70
|
+
'fetchLiquidations': false,
|
|
71
|
+
'fetchLongShortRatio': false,
|
|
72
|
+
'fetchLongShortRatioHistory': false,
|
|
73
|
+
'fetchMarginAdjustmentHistory': false,
|
|
56
74
|
'fetchMarginMode': false,
|
|
75
|
+
'fetchMarginModes': false,
|
|
76
|
+
'fetchMarketLeverageTiers': false,
|
|
57
77
|
'fetchMarkets': true,
|
|
58
78
|
'fetchMarkOHLCV': false,
|
|
79
|
+
'fetchMarkPrice': false,
|
|
80
|
+
'fetchMarkPrices': false,
|
|
81
|
+
'fetchMyLiquidations': false,
|
|
82
|
+
'fetchMySettlementHistory': false,
|
|
59
83
|
'fetchMyTrades': 'emulated',
|
|
60
84
|
'fetchOHLCV': true,
|
|
85
|
+
'fetchOpenInterest': false,
|
|
61
86
|
'fetchOpenInterestHistory': false,
|
|
87
|
+
'fetchOpenInterests': false,
|
|
62
88
|
'fetchOpenOrders': true,
|
|
89
|
+
'fetchOption': false,
|
|
90
|
+
'fetchOptionChain': false,
|
|
63
91
|
'fetchOrder': true,
|
|
64
92
|
'fetchOrderBook': true,
|
|
65
93
|
'fetchOrders': true,
|
|
@@ -71,13 +99,19 @@ class mercado extends mercado$1 {
|
|
|
71
99
|
'fetchPositionsHistory': false,
|
|
72
100
|
'fetchPositionsRisk': false,
|
|
73
101
|
'fetchPremiumIndexOHLCV': false,
|
|
102
|
+
'fetchSettlementHistory': false,
|
|
74
103
|
'fetchTicker': true,
|
|
75
104
|
'fetchTickers': false,
|
|
76
105
|
'fetchTrades': true,
|
|
77
106
|
'fetchTradingFee': false,
|
|
78
107
|
'fetchTradingFees': false,
|
|
108
|
+
'fetchUnderlyingAssets': false,
|
|
109
|
+
'fetchVolatilityHistory': false,
|
|
79
110
|
'reduceMargin': false,
|
|
111
|
+
'repayCrossMargin': false,
|
|
112
|
+
'repayIsolatedMargin': false,
|
|
80
113
|
'setLeverage': false,
|
|
114
|
+
'setMargin': false,
|
|
81
115
|
'setMarginMode': false,
|
|
82
116
|
'setPositionMode': false,
|
|
83
117
|
'withdraw': true,
|
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -434,6 +434,7 @@ class mexc extends mexc$1 {
|
|
|
434
434
|
},
|
|
435
435
|
},
|
|
436
436
|
},
|
|
437
|
+
'useCcxtTradeId': true,
|
|
437
438
|
'timeframes': {
|
|
438
439
|
'spot': {
|
|
439
440
|
'1m': '1m',
|
|
@@ -1714,8 +1715,8 @@ class mexc extends mexc$1 {
|
|
|
1714
1715
|
}
|
|
1715
1716
|
}
|
|
1716
1717
|
}
|
|
1717
|
-
if (id === undefined) {
|
|
1718
|
-
id = this.
|
|
1718
|
+
if (id === undefined && this.safeBool(this.options, 'useCcxtTradeId', true)) {
|
|
1719
|
+
id = this.createCcxtTradeId(timestamp, side, amountString, priceString, takerOrMaker);
|
|
1719
1720
|
}
|
|
1720
1721
|
return this.safeTrade({
|
|
1721
1722
|
'id': id,
|
|
@@ -1733,29 +1734,6 @@ class mexc extends mexc$1 {
|
|
|
1733
1734
|
'info': trade,
|
|
1734
1735
|
}, market);
|
|
1735
1736
|
}
|
|
1736
|
-
syntheticTradeId(market = undefined, timestamp = undefined, side = undefined, amount = undefined, price = undefined, orderType = undefined, takerOrMaker = undefined) {
|
|
1737
|
-
// TODO: can be unified method? this approach is being used by multiple exchanges (mexc, woo-coinsbit, dydx, ...)
|
|
1738
|
-
let id = '';
|
|
1739
|
-
if (timestamp !== undefined) {
|
|
1740
|
-
id = this.numberToString(timestamp) + '-' + this.safeString(market, 'id', '_');
|
|
1741
|
-
if (side !== undefined) {
|
|
1742
|
-
id += '-' + side;
|
|
1743
|
-
}
|
|
1744
|
-
if (amount !== undefined) {
|
|
1745
|
-
id += '-' + this.numberToString(amount);
|
|
1746
|
-
}
|
|
1747
|
-
if (price !== undefined) {
|
|
1748
|
-
id += '-' + this.numberToString(price);
|
|
1749
|
-
}
|
|
1750
|
-
if (takerOrMaker !== undefined) {
|
|
1751
|
-
id += '-' + takerOrMaker;
|
|
1752
|
-
}
|
|
1753
|
-
if (orderType !== undefined) {
|
|
1754
|
-
id += '-' + orderType;
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
return id;
|
|
1758
|
-
}
|
|
1759
1737
|
/**
|
|
1760
1738
|
* @method
|
|
1761
1739
|
* @name mexc#fetchOHLCV
|
package/dist/cjs/src/ndax.js
CHANGED
|
@@ -29,6 +29,9 @@ class ndax extends ndax$1 {
|
|
|
29
29
|
'future': false,
|
|
30
30
|
'option': false,
|
|
31
31
|
'addMargin': false,
|
|
32
|
+
'borrowCrossMargin': false,
|
|
33
|
+
'borrowIsolatedMargin': false,
|
|
34
|
+
'borrowMargin': false,
|
|
32
35
|
'cancelAllOrders': true,
|
|
33
36
|
'cancelOrder': true,
|
|
34
37
|
'closeAllPositions': false,
|
|
@@ -41,6 +44,7 @@ class ndax extends ndax$1 {
|
|
|
41
44
|
'createStopOrder': true,
|
|
42
45
|
'editOrder': true,
|
|
43
46
|
'fetchAccounts': true,
|
|
47
|
+
'fetchAllGreeks': false,
|
|
44
48
|
'fetchBalance': true,
|
|
45
49
|
'fetchBorrowInterest': false,
|
|
46
50
|
'fetchBorrowRate': false,
|
|
@@ -71,12 +75,15 @@ class ndax extends ndax$1 {
|
|
|
71
75
|
'fetchLeverages': false,
|
|
72
76
|
'fetchLeverageTiers': false,
|
|
73
77
|
'fetchLiquidations': false,
|
|
78
|
+
'fetchLongShortRatio': false,
|
|
79
|
+
'fetchLongShortRatioHistory': false,
|
|
74
80
|
'fetchMarginAdjustmentHistory': false,
|
|
75
81
|
'fetchMarginMode': false,
|
|
76
82
|
'fetchMarginModes': false,
|
|
77
83
|
'fetchMarketLeverageTiers': false,
|
|
78
84
|
'fetchMarkets': true,
|
|
79
85
|
'fetchMarkOHLCV': false,
|
|
86
|
+
'fetchMarkPrice': false,
|
|
80
87
|
'fetchMarkPrices': false,
|
|
81
88
|
'fetchMyLiquidations': false,
|
|
82
89
|
'fetchMySettlementHistory': false,
|
|
@@ -84,6 +91,7 @@ class ndax extends ndax$1 {
|
|
|
84
91
|
'fetchOHLCV': true,
|
|
85
92
|
'fetchOpenInterest': false,
|
|
86
93
|
'fetchOpenInterestHistory': false,
|
|
94
|
+
'fetchOpenInterests': false,
|
|
87
95
|
'fetchOpenOrders': true,
|
|
88
96
|
'fetchOption': false,
|
|
89
97
|
'fetchOptionChain': false,
|
package/dist/cjs/src/okx.js
CHANGED
|
@@ -736,6 +736,7 @@ class okx extends okx$1 {
|
|
|
736
736
|
'51137': errors.InvalidOrder,
|
|
737
737
|
'51138': errors.InvalidOrder,
|
|
738
738
|
'51139': errors.InvalidOrder,
|
|
739
|
+
'51155': errors.RestrictedLocation,
|
|
739
740
|
'51156': errors.BadRequest,
|
|
740
741
|
'51159': errors.BadRequest,
|
|
741
742
|
'51162': errors.InvalidOrder,
|
package/dist/cjs/src/phemex.js
CHANGED
|
@@ -265,6 +265,7 @@ class phemex extends phemex$1 {
|
|
|
265
265
|
// swap
|
|
266
266
|
'orders/replace': 1,
|
|
267
267
|
'g-orders/replace': 1,
|
|
268
|
+
'g-orders/create': 1,
|
|
268
269
|
'positions/leverage': 5,
|
|
269
270
|
'g-positions/leverage': 5,
|
|
270
271
|
'g-positions/switch-pos-mode-sync': 5,
|
|
@@ -1219,7 +1220,8 @@ class phemex extends phemex$1 {
|
|
|
1219
1220
|
// 'id': 123456789, // optional request id
|
|
1220
1221
|
};
|
|
1221
1222
|
let response = undefined;
|
|
1222
|
-
|
|
1223
|
+
const isStableSettled = (market['settle'] === 'USDT') || (market['settle'] === 'USDC');
|
|
1224
|
+
if (market['linear'] && isStableSettled) {
|
|
1223
1225
|
response = await this.v2GetMdV2Orderbook(this.extend(request, params));
|
|
1224
1226
|
}
|
|
1225
1227
|
else {
|
|
@@ -1363,7 +1365,8 @@ class phemex extends phemex$1 {
|
|
|
1363
1365
|
};
|
|
1364
1366
|
const until = this.safeInteger2(params, 'until', 'to');
|
|
1365
1367
|
params = this.omit(params, ['until']);
|
|
1366
|
-
const
|
|
1368
|
+
const isStableSettled = (market['settle'] === 'USDT') || (market['settle'] === 'USDC');
|
|
1369
|
+
const usesSpecialFromToEndpoint = ((market['linear'] || isStableSettled)) && ((since !== undefined) || (until !== undefined));
|
|
1367
1370
|
let maxLimit = 1000;
|
|
1368
1371
|
if (usesSpecialFromToEndpoint) {
|
|
1369
1372
|
maxLimit = 2000;
|
|
@@ -1373,7 +1376,7 @@ class phemex extends phemex$1 {
|
|
|
1373
1376
|
}
|
|
1374
1377
|
request['limit'] = Math.min(limit, maxLimit);
|
|
1375
1378
|
let response = undefined;
|
|
1376
|
-
if (market['linear'] ||
|
|
1379
|
+
if (market['linear'] || isStableSettled) {
|
|
1377
1380
|
if ((until !== undefined) || (since !== undefined)) {
|
|
1378
1381
|
const candleDuration = this.parseTimeframe(timeframe);
|
|
1379
1382
|
if (since !== undefined) {
|
|
@@ -1648,7 +1651,8 @@ class phemex extends phemex$1 {
|
|
|
1648
1651
|
// 'id': 123456789, // optional request id
|
|
1649
1652
|
};
|
|
1650
1653
|
let response = undefined;
|
|
1651
|
-
|
|
1654
|
+
const isStableSettled = (market['settle'] === 'USDT') || (market['settle'] === 'USDC');
|
|
1655
|
+
if (market['linear'] && isStableSettled) {
|
|
1652
1656
|
response = await this.v2GetMdV2Trade(this.extend(request, params));
|
|
1653
1657
|
}
|
|
1654
1658
|
else {
|
|
@@ -1893,7 +1897,7 @@ class phemex extends phemex$1 {
|
|
|
1893
1897
|
}
|
|
1894
1898
|
id = this.safeString2(trade, 'execId', 'execID');
|
|
1895
1899
|
orderId = this.safeString(trade, 'orderID');
|
|
1896
|
-
if (market['settle'] === 'USDT') {
|
|
1900
|
+
if (market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
1897
1901
|
const sideId = this.safeStringLower(trade, 'side');
|
|
1898
1902
|
if ((sideId === 'buy') || (sideId === 'sell')) {
|
|
1899
1903
|
side = sideId;
|
|
@@ -2668,6 +2672,7 @@ class phemex extends phemex$1 {
|
|
|
2668
2672
|
const stopLossDefined = (stopLoss !== undefined);
|
|
2669
2673
|
const takeProfit = this.safeValue(params, 'takeProfit');
|
|
2670
2674
|
const takeProfitDefined = (takeProfit !== undefined);
|
|
2675
|
+
const isStableSettled = (market['settle'] === 'USDT') || (market['settle'] === 'USDC');
|
|
2671
2676
|
if (clientOrderId === undefined) {
|
|
2672
2677
|
const brokerId = this.safeString(this.options, 'brokerId', 'CCXT123456');
|
|
2673
2678
|
if (brokerId !== undefined) {
|
|
@@ -2680,7 +2685,7 @@ class phemex extends phemex$1 {
|
|
|
2680
2685
|
}
|
|
2681
2686
|
const triggerPrice = this.safeStringN(params, ['stopPx', 'stopPrice', 'triggerPrice']);
|
|
2682
2687
|
if (triggerPrice !== undefined) {
|
|
2683
|
-
if (
|
|
2688
|
+
if (isStableSettled) {
|
|
2684
2689
|
request['stopPxRp'] = this.priceToPrecision(symbol, triggerPrice);
|
|
2685
2690
|
}
|
|
2686
2691
|
else {
|
|
@@ -2747,7 +2752,7 @@ class phemex extends phemex$1 {
|
|
|
2747
2752
|
}
|
|
2748
2753
|
posSide = this.capitalize(posSide);
|
|
2749
2754
|
request['posSide'] = posSide;
|
|
2750
|
-
if (
|
|
2755
|
+
if (isStableSettled) {
|
|
2751
2756
|
request['orderQtyRq'] = amount;
|
|
2752
2757
|
}
|
|
2753
2758
|
else {
|
|
@@ -2786,7 +2791,7 @@ class phemex extends phemex$1 {
|
|
|
2786
2791
|
if (stopLossTriggerPrice === undefined) {
|
|
2787
2792
|
throw new errors.InvalidOrder(this.id + ' createOrder() requires a trigger price in params["stopLoss"]["triggerPrice"] for a stop loss order');
|
|
2788
2793
|
}
|
|
2789
|
-
if (
|
|
2794
|
+
if (isStableSettled) {
|
|
2790
2795
|
request['stopLossRp'] = this.priceToPrecision(symbol, stopLossTriggerPrice);
|
|
2791
2796
|
}
|
|
2792
2797
|
else {
|
|
@@ -2806,7 +2811,7 @@ class phemex extends phemex$1 {
|
|
|
2806
2811
|
if (takeProfitTriggerPrice === undefined) {
|
|
2807
2812
|
throw new errors.InvalidOrder(this.id + ' createOrder() requires a trigger price in params["takeProfit"]["triggerPrice"] for a take profit order');
|
|
2808
2813
|
}
|
|
2809
|
-
if (
|
|
2814
|
+
if (isStableSettled) {
|
|
2810
2815
|
request['takeProfitRp'] = this.priceToPrecision(symbol, takeProfitTriggerPrice);
|
|
2811
2816
|
}
|
|
2812
2817
|
else {
|
|
@@ -2824,7 +2829,7 @@ class phemex extends phemex$1 {
|
|
|
2824
2829
|
}
|
|
2825
2830
|
}
|
|
2826
2831
|
if ((type === 'Limit') || (type === 'StopLimit') || (type === 'LimitIfTouched')) {
|
|
2827
|
-
if (
|
|
2832
|
+
if (isStableSettled) {
|
|
2828
2833
|
request['priceRp'] = this.priceToPrecision(symbol, price);
|
|
2829
2834
|
}
|
|
2830
2835
|
else {
|
|
@@ -2834,7 +2839,7 @@ class phemex extends phemex$1 {
|
|
|
2834
2839
|
}
|
|
2835
2840
|
const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
|
|
2836
2841
|
if (takeProfitPrice !== undefined) {
|
|
2837
|
-
if (
|
|
2842
|
+
if (isStableSettled) {
|
|
2838
2843
|
request['takeProfitRp'] = this.priceToPrecision(symbol, takeProfitPrice);
|
|
2839
2844
|
}
|
|
2840
2845
|
else {
|
|
@@ -2844,7 +2849,7 @@ class phemex extends phemex$1 {
|
|
|
2844
2849
|
}
|
|
2845
2850
|
const stopLossPrice = this.safeString(params, 'stopLossPrice');
|
|
2846
2851
|
if (stopLossPrice !== undefined) {
|
|
2847
|
-
if (
|
|
2852
|
+
if (isStableSettled) {
|
|
2848
2853
|
request['stopLossRp'] = this.priceToPrecision(symbol, stopLossPrice);
|
|
2849
2854
|
}
|
|
2850
2855
|
else {
|
|
@@ -2853,7 +2858,7 @@ class phemex extends phemex$1 {
|
|
|
2853
2858
|
params = this.omit(params, 'stopLossPrice');
|
|
2854
2859
|
}
|
|
2855
2860
|
let response = undefined;
|
|
2856
|
-
if (
|
|
2861
|
+
if (isStableSettled) {
|
|
2857
2862
|
response = await this.privatePostGOrders(this.extend(request, params));
|
|
2858
2863
|
}
|
|
2859
2864
|
else if (market['contract']) {
|
|
@@ -2964,7 +2969,7 @@ class phemex extends phemex$1 {
|
|
|
2964
2969
|
};
|
|
2965
2970
|
const clientOrderId = this.safeString2(params, 'clientOrderId', 'clOrdID');
|
|
2966
2971
|
params = this.omit(params, ['clientOrderId', 'clOrdID']);
|
|
2967
|
-
const
|
|
2972
|
+
const isStableSettled = (market['settle'] === 'USDT') || (market['settle'] === 'USDC');
|
|
2968
2973
|
if (clientOrderId !== undefined) {
|
|
2969
2974
|
request['clOrdID'] = clientOrderId;
|
|
2970
2975
|
}
|
|
@@ -2972,7 +2977,7 @@ class phemex extends phemex$1 {
|
|
|
2972
2977
|
request['orderID'] = id;
|
|
2973
2978
|
}
|
|
2974
2979
|
if (price !== undefined) {
|
|
2975
|
-
if (
|
|
2980
|
+
if (isStableSettled) {
|
|
2976
2981
|
request['priceRp'] = this.priceToPrecision(market['symbol'], price);
|
|
2977
2982
|
}
|
|
2978
2983
|
else {
|
|
@@ -2986,7 +2991,7 @@ class phemex extends phemex$1 {
|
|
|
2986
2991
|
request['baseQtyEV'] = finalQty;
|
|
2987
2992
|
}
|
|
2988
2993
|
else if (amount !== undefined) {
|
|
2989
|
-
if (
|
|
2994
|
+
if (isStableSettled) {
|
|
2990
2995
|
request['orderQtyRq'] = this.amountToPrecision(market['symbol'], amount);
|
|
2991
2996
|
}
|
|
2992
2997
|
else {
|
|
@@ -2995,7 +3000,7 @@ class phemex extends phemex$1 {
|
|
|
2995
3000
|
}
|
|
2996
3001
|
const triggerPrice = this.safeStringN(params, ['triggerPrice', 'stopPx', 'stopPrice']);
|
|
2997
3002
|
if (triggerPrice !== undefined) {
|
|
2998
|
-
if (
|
|
3003
|
+
if (isStableSettled) {
|
|
2999
3004
|
request['stopPxRp'] = this.priceToPrecision(symbol, triggerPrice);
|
|
3000
3005
|
}
|
|
3001
3006
|
else {
|
|
@@ -3004,7 +3009,7 @@ class phemex extends phemex$1 {
|
|
|
3004
3009
|
}
|
|
3005
3010
|
params = this.omit(params, ['triggerPrice', 'stopPx', 'stopPrice']);
|
|
3006
3011
|
let response = undefined;
|
|
3007
|
-
if (
|
|
3012
|
+
if (isStableSettled) {
|
|
3008
3013
|
const posSide = this.safeString(params, 'posSide');
|
|
3009
3014
|
if (posSide === undefined) {
|
|
3010
3015
|
request['posSide'] = 'Merged';
|
|
@@ -3049,7 +3054,7 @@ class phemex extends phemex$1 {
|
|
|
3049
3054
|
request['orderID'] = id;
|
|
3050
3055
|
}
|
|
3051
3056
|
let response = undefined;
|
|
3052
|
-
if (market['settle'] === 'USDT') {
|
|
3057
|
+
if (market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
3053
3058
|
const posSide = this.safeString(params, 'posSide');
|
|
3054
3059
|
if (posSide === undefined) {
|
|
3055
3060
|
request['posSide'] = 'Merged';
|
|
@@ -3091,7 +3096,7 @@ class phemex extends phemex$1 {
|
|
|
3091
3096
|
request['untriggerred'] = trigger;
|
|
3092
3097
|
}
|
|
3093
3098
|
let response = undefined;
|
|
3094
|
-
if (market['settle'] === 'USDT') {
|
|
3099
|
+
if (market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
3095
3100
|
response = await this.privateDeleteGOrdersAll(this.extend(request, params));
|
|
3096
3101
|
//
|
|
3097
3102
|
// {
|
|
@@ -3157,7 +3162,7 @@ class phemex extends phemex$1 {
|
|
|
3157
3162
|
request['orderID'] = id;
|
|
3158
3163
|
}
|
|
3159
3164
|
let response = undefined;
|
|
3160
|
-
if (market['settle'] === 'USDT') {
|
|
3165
|
+
if (market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
3161
3166
|
response = await this.privateGetApiDataGFuturesOrdersByOrderId(this.extend(request, params));
|
|
3162
3167
|
}
|
|
3163
3168
|
else if (market['spot']) {
|
|
@@ -3213,7 +3218,7 @@ class phemex extends phemex$1 {
|
|
|
3213
3218
|
request['limit'] = limit;
|
|
3214
3219
|
}
|
|
3215
3220
|
let response = undefined;
|
|
3216
|
-
if (market['settle'] === 'USDT') {
|
|
3221
|
+
if (market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
3217
3222
|
request['currency'] = market['settle'];
|
|
3218
3223
|
response = await this.privateGetExchangeOrderV2OrderList(this.extend(request, params));
|
|
3219
3224
|
}
|
|
@@ -3252,7 +3257,7 @@ class phemex extends phemex$1 {
|
|
|
3252
3257
|
};
|
|
3253
3258
|
let response = undefined;
|
|
3254
3259
|
try {
|
|
3255
|
-
if (market['settle'] === 'USDT') {
|
|
3260
|
+
if (market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
3256
3261
|
response = await this.privateGetGOrdersActiveList(this.extend(request, params));
|
|
3257
3262
|
}
|
|
3258
3263
|
else if (market['swap']) {
|
|
@@ -4117,8 +4122,8 @@ class phemex extends phemex$1 {
|
|
|
4117
4122
|
request['limit'] = limit;
|
|
4118
4123
|
}
|
|
4119
4124
|
let response = undefined;
|
|
4120
|
-
const
|
|
4121
|
-
if (
|
|
4125
|
+
const isStableSettled = market['settle'] === 'USDT' || market['settle'] === 'USDC';
|
|
4126
|
+
if (isStableSettled) {
|
|
4122
4127
|
response = await this.privateGetApiDataGFuturesFundingFees(this.extend(request, params));
|
|
4123
4128
|
}
|
|
4124
4129
|
else {
|
|
@@ -4171,8 +4176,8 @@ class phemex extends phemex$1 {
|
|
|
4171
4176
|
return value;
|
|
4172
4177
|
}
|
|
4173
4178
|
// it was confirmed by phemex support, that USDT contracts use direct amounts in funding fees, while USD & INVERSE needs 'valueScale'
|
|
4174
|
-
const
|
|
4175
|
-
if (!
|
|
4179
|
+
const isStableSettled = market['settle'] === 'USDT' || market['settle'] === 'USDC';
|
|
4180
|
+
if (!isStableSettled) {
|
|
4176
4181
|
const currency = this.safeCurrency(currencyCode);
|
|
4177
4182
|
const scale = this.safeString(currency['info'], 'valueScale');
|
|
4178
4183
|
const tickPrecision = this.parsePrecision(scale);
|
|
@@ -4371,8 +4376,8 @@ class phemex extends phemex$1 {
|
|
|
4371
4376
|
}
|
|
4372
4377
|
await this.loadMarkets();
|
|
4373
4378
|
const market = this.market(symbol);
|
|
4374
|
-
if (!market['swap'] || market['settle'] === 'USDT') {
|
|
4375
|
-
throw new errors.BadSymbol(this.id + ' setMarginMode() supports swap (non USDT based) contracts only');
|
|
4379
|
+
if (!market['swap'] || market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
4380
|
+
throw new errors.BadSymbol(this.id + ' setMarginMode() supports swap (non USDT/USDC based) contracts only');
|
|
4376
4381
|
}
|
|
4377
4382
|
marginMode = marginMode.toLowerCase();
|
|
4378
4383
|
if (marginMode !== 'isolated' && marginMode !== 'cross') {
|
|
@@ -4628,7 +4633,7 @@ class phemex extends phemex$1 {
|
|
|
4628
4633
|
'symbol': market['id'],
|
|
4629
4634
|
};
|
|
4630
4635
|
let response = undefined;
|
|
4631
|
-
if (market['settle'] === 'USDT') {
|
|
4636
|
+
if (market['settle'] === 'USDT' || market['settle'] === 'USDC') {
|
|
4632
4637
|
if (!isHedged && longLeverageRr === undefined && shortLeverageRr === undefined) {
|
|
4633
4638
|
request['leverageRr'] = leverage;
|
|
4634
4639
|
}
|
|
@@ -4870,7 +4875,7 @@ class phemex extends phemex$1 {
|
|
|
4870
4875
|
}
|
|
4871
4876
|
await this.loadMarkets();
|
|
4872
4877
|
const market = this.market(symbol);
|
|
4873
|
-
const isUsdtSettled = market['settle'] === 'USDT';
|
|
4878
|
+
const isUsdtSettled = market['settle'] === 'USDT' || market['settle'] === 'USDC';
|
|
4874
4879
|
if (!market['swap']) {
|
|
4875
4880
|
throw new errors.BadRequest(this.id + ' fetchFundingRateHistory() supports swap contracts only');
|
|
4876
4881
|
}
|
|
@@ -15,7 +15,9 @@ class binanceusdm extends binance {
|
|
|
15
15
|
'doc': 'https://developers.binance.com/en',
|
|
16
16
|
},
|
|
17
17
|
'options': {
|
|
18
|
-
'fetchMarkets':
|
|
18
|
+
'fetchMarkets': {
|
|
19
|
+
'types': ['linear'],
|
|
20
|
+
},
|
|
19
21
|
'defaultSubType': 'linear',
|
|
20
22
|
},
|
|
21
23
|
// https://binance-docs.github.io/apidocs/futures/en/#error-codes
|
|
@@ -38,6 +38,17 @@ class bybit extends bybit$1 {
|
|
|
38
38
|
'watchTrades': true,
|
|
39
39
|
'watchPositions': true,
|
|
40
40
|
'watchTradesForSymbols': true,
|
|
41
|
+
'unWatchTicker': true,
|
|
42
|
+
'unWatchTickers': true,
|
|
43
|
+
'unWatchOHLCV': true,
|
|
44
|
+
'unWatchOHLCVForSymbols': true,
|
|
45
|
+
'unWatchOrderBook': true,
|
|
46
|
+
'unWatchOrderBookForSymbols': true,
|
|
47
|
+
'unWatchTrades': true,
|
|
48
|
+
'unWatchTradesForSymbols': true,
|
|
49
|
+
'unWatchMyTrades': true,
|
|
50
|
+
'unWatchOrders': true,
|
|
51
|
+
'unWatchPositions': true,
|
|
41
52
|
},
|
|
42
53
|
'urls': {
|
|
43
54
|
'api': {
|
|
@@ -1553,6 +1564,28 @@ class bybit extends bybit$1 {
|
|
|
1553
1564
|
}
|
|
1554
1565
|
client.resolve(newPositions, 'positions');
|
|
1555
1566
|
}
|
|
1567
|
+
/**
|
|
1568
|
+
* @method
|
|
1569
|
+
* @name bybit#unWatchPositions
|
|
1570
|
+
* @description unWatches all open positions
|
|
1571
|
+
* @see https://bybit-exchange.github.io/docs/v5/websocket/private/position
|
|
1572
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
1573
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1574
|
+
* @returns {object} status of the unwatch request
|
|
1575
|
+
*/
|
|
1576
|
+
async unWatchPositions(symbols = undefined, params = {}) {
|
|
1577
|
+
await this.loadMarkets();
|
|
1578
|
+
const method = 'watchPositions';
|
|
1579
|
+
const messageHash = 'unsubscribe:positions';
|
|
1580
|
+
const subHash = 'positions';
|
|
1581
|
+
if (!this.isEmpty(symbols)) {
|
|
1582
|
+
throw new errors.NotSupported(this.id + ' unWatchPositions() does not support a symbol parameter, you must unwatch all orders');
|
|
1583
|
+
}
|
|
1584
|
+
const url = await this.getUrlByMarketType(undefined, true, method, params);
|
|
1585
|
+
await this.authenticate(url);
|
|
1586
|
+
const topics = ['position'];
|
|
1587
|
+
return await this.unWatchTopics(url, 'positions', symbols, [messageHash], [subHash], topics, params);
|
|
1588
|
+
}
|
|
1556
1589
|
/**
|
|
1557
1590
|
* @method
|
|
1558
1591
|
* @name bybit#watchLiquidations
|
package/js/ccxt.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ 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
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OrderBooks, OpenInterests, ConstructorArgs } from './src/base/types.js';
|
|
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.
|
|
6
|
+
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
+
declare const version = "4.4.97";
|
|
8
8
|
import alpaca from './src/alpaca.js';
|
|
9
9
|
import apex from './src/apex.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -555,5 +555,5 @@ declare const ccxt: {
|
|
|
555
555
|
zaif: typeof zaif;
|
|
556
556
|
zonda: typeof zonda;
|
|
557
557
|
} & typeof functions & typeof errors;
|
|
558
|
-
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, 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, alpaca, apex, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, exmo, fmfwio, foxbit, gate, gateio, gemini, hashkey, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, novadax, oceanex, okcoin, okx, okxus, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
558
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError, Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, ConstructorArgs, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketMarginModes, MarketInterface, Trade, Order, OrderBook, OrderBooks, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, OpenInterests, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, LongShortRatio, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, alpaca, apex, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, exmo, fmfwio, foxbit, gate, gateio, gemini, hashkey, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, novadax, oceanex, okcoin, okx, okxus, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
559
559
|
export default ccxt;
|
package/js/ccxt.js
CHANGED
|
@@ -35,10 +35,10 @@ import { Exchange } from './src/base/Exchange.js';
|
|
|
35
35
|
import { Precise } from './src/base/Precise.js';
|
|
36
36
|
import * as functions from './src/base/functions.js';
|
|
37
37
|
import * as errors from './src/base/errors.js';
|
|
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';
|
|
38
|
+
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.4.
|
|
41
|
+
const version = '4.4.97';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import alpaca from './src/alpaca.js';
|
|
@@ -416,6 +416,6 @@ pro.exchanges = Object.keys(pro);
|
|
|
416
416
|
pro['Exchange'] = Exchange; // now the same for rest and ts
|
|
417
417
|
//-----------------------------------------------------------------------------
|
|
418
418
|
const ccxt = Object.assign({ version, Exchange, Precise, 'exchanges': Object.keys(exchanges), 'pro': pro }, exchanges, functions, errors);
|
|
419
|
-
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, alpaca, apex, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, exmo, fmfwio, foxbit, gate, gateio, gemini, hashkey, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, novadax, oceanex, okcoin, okx, okxus, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
419
|
+
export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError, alpaca, apex, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitfinex, bitflyer, bitget, bithumb, bitmart, bitmex, bitopro, bitrue, bitso, bitstamp, bitteam, bittrade, bitvavo, blockchaincom, blofin, btcalpha, btcbox, btcmarkets, btcturk, bybit, cex, coinbase, coinbaseadvanced, coinbaseexchange, coinbaseinternational, coincatch, coincheck, coinex, coinmate, coinmetro, coinone, coinsph, coinspot, cryptocom, cryptomus, defx, delta, deribit, derive, digifinex, ellipx, exmo, fmfwio, foxbit, gate, gateio, gemini, hashkey, hitbtc, hollaex, htx, huobi, hyperliquid, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, latoken, lbank, luno, mercado, mexc, modetrade, myokx, ndax, novadax, oceanex, okcoin, okx, okxus, onetrading, oxfun, p2b, paradex, paymium, phemex, poloniex, probit, timex, tokocrypto, tradeogre, upbit, vertex, wavesexchange, whitebit, woo, woofipro, xt, yobit, zaif, zonda, };
|
|
420
420
|
export default ccxt;
|
|
421
421
|
//-----------------------------------------------------------------------------
|
|
@@ -221,6 +221,7 @@ interface Exchange {
|
|
|
221
221
|
sapiGetPortfolioBalance(params?: {}): Promise<implicitReturnType>;
|
|
222
222
|
sapiGetPortfolioNegativeBalanceExchangeRecord(params?: {}): Promise<implicitReturnType>;
|
|
223
223
|
sapiGetPortfolioPmloanHistory(params?: {}): Promise<implicitReturnType>;
|
|
224
|
+
sapiGetPortfolioEarnAssetBalance(params?: {}): Promise<implicitReturnType>;
|
|
224
225
|
sapiGetStakingProductList(params?: {}): Promise<implicitReturnType>;
|
|
225
226
|
sapiGetStakingPosition(params?: {}): Promise<implicitReturnType>;
|
|
226
227
|
sapiGetStakingStakingRecord(params?: {}): Promise<implicitReturnType>;
|
|
@@ -363,6 +364,7 @@ interface Exchange {
|
|
|
363
364
|
sapiPostPortfolioRepayFuturesNegativeBalance(params?: {}): Promise<implicitReturnType>;
|
|
364
365
|
sapiPostPortfolioMint(params?: {}): Promise<implicitReturnType>;
|
|
365
366
|
sapiPostPortfolioRedeem(params?: {}): Promise<implicitReturnType>;
|
|
367
|
+
sapiPostPortfolioEarnAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
366
368
|
sapiPostLendingAutoInvestPlanAdd(params?: {}): Promise<implicitReturnType>;
|
|
367
369
|
sapiPostLendingAutoInvestPlanEdit(params?: {}): Promise<implicitReturnType>;
|
|
368
370
|
sapiPostLendingAutoInvestPlanEditStatus(params?: {}): Promise<implicitReturnType>;
|
|
@@ -501,6 +503,7 @@ interface Exchange {
|
|
|
501
503
|
fapiPublicGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
502
504
|
fapiPublicGetLvtKlines(params?: {}): Promise<implicitReturnType>;
|
|
503
505
|
fapiPublicGetConvertExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
506
|
+
fapiPublicGetInsuranceBalance(params?: {}): Promise<implicitReturnType>;
|
|
504
507
|
fapiDataGetDeliveryPrice(params?: {}): Promise<implicitReturnType>;
|
|
505
508
|
fapiDataGetOpenInterestHist(params?: {}): Promise<implicitReturnType>;
|
|
506
509
|
fapiDataGetTopLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|
|
@@ -221,6 +221,7 @@ interface binance {
|
|
|
221
221
|
sapiGetPortfolioBalance(params?: {}): Promise<implicitReturnType>;
|
|
222
222
|
sapiGetPortfolioNegativeBalanceExchangeRecord(params?: {}): Promise<implicitReturnType>;
|
|
223
223
|
sapiGetPortfolioPmloanHistory(params?: {}): Promise<implicitReturnType>;
|
|
224
|
+
sapiGetPortfolioEarnAssetBalance(params?: {}): Promise<implicitReturnType>;
|
|
224
225
|
sapiGetStakingProductList(params?: {}): Promise<implicitReturnType>;
|
|
225
226
|
sapiGetStakingPosition(params?: {}): Promise<implicitReturnType>;
|
|
226
227
|
sapiGetStakingStakingRecord(params?: {}): Promise<implicitReturnType>;
|
|
@@ -363,6 +364,7 @@ interface binance {
|
|
|
363
364
|
sapiPostPortfolioRepayFuturesNegativeBalance(params?: {}): Promise<implicitReturnType>;
|
|
364
365
|
sapiPostPortfolioMint(params?: {}): Promise<implicitReturnType>;
|
|
365
366
|
sapiPostPortfolioRedeem(params?: {}): Promise<implicitReturnType>;
|
|
367
|
+
sapiPostPortfolioEarnAssetTransfer(params?: {}): Promise<implicitReturnType>;
|
|
366
368
|
sapiPostLendingAutoInvestPlanAdd(params?: {}): Promise<implicitReturnType>;
|
|
367
369
|
sapiPostLendingAutoInvestPlanEdit(params?: {}): Promise<implicitReturnType>;
|
|
368
370
|
sapiPostLendingAutoInvestPlanEditStatus(params?: {}): Promise<implicitReturnType>;
|
|
@@ -501,6 +503,7 @@ interface binance {
|
|
|
501
503
|
fapiPublicGetApiTradingStatus(params?: {}): Promise<implicitReturnType>;
|
|
502
504
|
fapiPublicGetLvtKlines(params?: {}): Promise<implicitReturnType>;
|
|
503
505
|
fapiPublicGetConvertExchangeInfo(params?: {}): Promise<implicitReturnType>;
|
|
506
|
+
fapiPublicGetInsuranceBalance(params?: {}): Promise<implicitReturnType>;
|
|
504
507
|
fapiDataGetDeliveryPrice(params?: {}): Promise<implicitReturnType>;
|
|
505
508
|
fapiDataGetOpenInterestHist(params?: {}): Promise<implicitReturnType>;
|
|
506
509
|
fapiDataGetTopLongShortAccountRatio(params?: {}): Promise<implicitReturnType>;
|