ccxt 4.4.72 → 4.4.73
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 +4 -4
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -6
- package/dist/cjs/src/ace.js +42 -7
- package/dist/cjs/src/alpaca.js +46 -0
- package/dist/cjs/src/ascendex.js +1 -1
- package/dist/cjs/src/base/Exchange.js +6 -16
- package/dist/cjs/src/binance.js +20 -15
- package/dist/cjs/src/bit2c.js +11 -0
- package/dist/cjs/src/bitget.js +7 -5
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bybit.js +9 -0
- package/dist/cjs/src/defx.js +1 -1
- package/dist/cjs/src/derive.js +2 -0
- package/dist/cjs/src/pro/bitget.js +1 -1
- package/js/ccxt.d.ts +2 -8
- package/js/ccxt.js +2 -6
- package/js/src/ace.js +42 -7
- package/js/src/alpaca.js +46 -0
- package/js/src/ascendex.js +1 -1
- package/js/src/base/Exchange.d.ts +1 -1
- package/js/src/base/Exchange.js +6 -16
- package/js/src/binance.js +20 -15
- package/js/src/bit2c.js +11 -0
- package/js/src/bitget.js +7 -5
- package/js/src/bitrue.js +1 -1
- package/js/src/bybit.d.ts +4 -20
- package/js/src/bybit.js +9 -0
- package/js/src/defx.js +1 -1
- package/js/src/derive.js +2 -0
- package/js/src/pro/bitget.d.ts +1 -1
- package/js/src/pro/bitget.js +1 -1
- package/package.json +1 -1
- package/js/src/bitfinex1.d.ts +0 -297
- package/js/src/bitfinex1.js +0 -1770
- package/js/src/pro/bitfinex1.d.ts +0 -67
- package/js/src/pro/bitfinex1.js +0 -676
- package/js/src/pro/bitfinex2.d.ts +0 -99
- package/js/src/pro/bitfinex2.js +0 -1165
package/dist/cjs/ccxt.js
CHANGED
|
@@ -27,7 +27,6 @@ var bitbank = require('./src/bitbank.js');
|
|
|
27
27
|
var bitbns = require('./src/bitbns.js');
|
|
28
28
|
var bitcoincom = require('./src/bitcoincom.js');
|
|
29
29
|
var bitfinex = require('./src/bitfinex.js');
|
|
30
|
-
var bitfinex1 = require('./src/bitfinex1.js');
|
|
31
30
|
var bitflyer = require('./src/bitflyer.js');
|
|
32
31
|
var bitget = require('./src/bitget.js');
|
|
33
32
|
var bithumb = require('./src/bithumb.js');
|
|
@@ -132,7 +131,6 @@ var binanceusdm$1 = require('./src/pro/binanceusdm.js');
|
|
|
132
131
|
var bingx$1 = require('./src/pro/bingx.js');
|
|
133
132
|
var bitcoincom$1 = require('./src/pro/bitcoincom.js');
|
|
134
133
|
var bitfinex$1 = require('./src/pro/bitfinex.js');
|
|
135
|
-
var bitfinex1$1 = require('./src/pro/bitfinex1.js');
|
|
136
134
|
var bitget$1 = require('./src/pro/bitget.js');
|
|
137
135
|
var bithumb$1 = require('./src/pro/bithumb.js');
|
|
138
136
|
var bitmart$1 = require('./src/pro/bitmart.js');
|
|
@@ -198,7 +196,7 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
198
196
|
|
|
199
197
|
//-----------------------------------------------------------------------------
|
|
200
198
|
// this is updated by vss.js when building
|
|
201
|
-
const version = '4.4.
|
|
199
|
+
const version = '4.4.73';
|
|
202
200
|
Exchange["default"].ccxtVersion = version;
|
|
203
201
|
const exchanges = {
|
|
204
202
|
'ace': ace,
|
|
@@ -216,7 +214,6 @@ const exchanges = {
|
|
|
216
214
|
'bitbns': bitbns,
|
|
217
215
|
'bitcoincom': bitcoincom,
|
|
218
216
|
'bitfinex': bitfinex,
|
|
219
|
-
'bitfinex1': bitfinex1,
|
|
220
217
|
'bitflyer': bitflyer,
|
|
221
218
|
'bitget': bitget,
|
|
222
219
|
'bithumb': bithumb,
|
|
@@ -323,7 +320,6 @@ const pro = {
|
|
|
323
320
|
'bingx': bingx$1,
|
|
324
321
|
'bitcoincom': bitcoincom$1,
|
|
325
322
|
'bitfinex': bitfinex$1,
|
|
326
|
-
'bitfinex1': bitfinex1$1,
|
|
327
323
|
'bitget': bitget$1,
|
|
328
324
|
'bithumb': bithumb$1,
|
|
329
325
|
'bitmart': bitmart$1,
|
|
@@ -452,7 +448,6 @@ exports.bitbank = bitbank;
|
|
|
452
448
|
exports.bitbns = bitbns;
|
|
453
449
|
exports.bitcoincom = bitcoincom;
|
|
454
450
|
exports.bitfinex = bitfinex;
|
|
455
|
-
exports.bitfinex1 = bitfinex1;
|
|
456
451
|
exports.bitflyer = bitflyer;
|
|
457
452
|
exports.bitget = bitget;
|
|
458
453
|
exports.bithumb = bithumb;
|
package/dist/cjs/src/ace.js
CHANGED
|
@@ -22,22 +22,28 @@ class ace extends ace$1 {
|
|
|
22
22
|
'rateLimit': 100,
|
|
23
23
|
'pro': false,
|
|
24
24
|
'has': {
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'future': false,
|
|
30
|
-
'option': false,
|
|
25
|
+
'addMargin': false,
|
|
26
|
+
'borrowCrossMargin': false,
|
|
27
|
+
'borrowIsolatedMargin': false,
|
|
28
|
+
'borrowMargin': false,
|
|
31
29
|
'cancelAllOrders': false,
|
|
32
30
|
'cancelOrder': true,
|
|
33
31
|
'cancelOrders': false,
|
|
34
32
|
'closeAllPositions': false,
|
|
35
33
|
'closePosition': false,
|
|
34
|
+
'CORS': undefined,
|
|
36
35
|
'createOrder': true,
|
|
36
|
+
'createOrderWithTakeProfitAndStopLoss': false,
|
|
37
|
+
'createOrderWithTakeProfitAndStopLossWs': false,
|
|
38
|
+
'createReduceOnlyOrder': false,
|
|
37
39
|
'editOrder': false,
|
|
38
40
|
'fetchBalance': true,
|
|
41
|
+
'fetchBorrowInterest': false,
|
|
42
|
+
'fetchBorrowRate': false,
|
|
39
43
|
'fetchBorrowRateHistories': false,
|
|
40
44
|
'fetchBorrowRateHistory': false,
|
|
45
|
+
'fetchBorrowRates': false,
|
|
46
|
+
'fetchBorrowRatesPerSymbol': false,
|
|
41
47
|
'fetchClosedOrders': false,
|
|
42
48
|
'fetchCrossBorrowRate': false,
|
|
43
49
|
'fetchCrossBorrowRates': false,
|
|
@@ -45,18 +51,36 @@ class ace extends ace$1 {
|
|
|
45
51
|
'fetchDepositAddress': false,
|
|
46
52
|
'fetchDeposits': false,
|
|
47
53
|
'fetchFundingHistory': false,
|
|
54
|
+
'fetchFundingInterval': false,
|
|
55
|
+
'fetchFundingIntervals': false,
|
|
48
56
|
'fetchFundingRate': false,
|
|
49
57
|
'fetchFundingRateHistory': false,
|
|
50
58
|
'fetchFundingRates': false,
|
|
59
|
+
'fetchGreeks': false,
|
|
51
60
|
'fetchIndexOHLCV': false,
|
|
52
61
|
'fetchIsolatedBorrowRate': false,
|
|
53
62
|
'fetchIsolatedBorrowRates': false,
|
|
63
|
+
'fetchIsolatedPositions': false,
|
|
64
|
+
'fetchLeverage': false,
|
|
65
|
+
'fetchLeverages': false,
|
|
66
|
+
'fetchLeverageTiers': false,
|
|
67
|
+
'fetchLiquidations': false,
|
|
68
|
+
'fetchLongShortRatio': false,
|
|
69
|
+
'fetchLongShortRatioHistory': false,
|
|
70
|
+
'fetchMarginAdjustmentHistory': false,
|
|
54
71
|
'fetchMarginMode': false,
|
|
72
|
+
'fetchMarginModes': false,
|
|
73
|
+
'fetchMarketLeverageTiers': false,
|
|
55
74
|
'fetchMarkets': true,
|
|
56
75
|
'fetchMarkOHLCV': false,
|
|
76
|
+
'fetchMarkPrices': false,
|
|
77
|
+
'fetchMyLiquidations': false,
|
|
78
|
+
'fetchMySettlementHistory': false,
|
|
57
79
|
'fetchMyTrades': true,
|
|
58
80
|
'fetchOHLCV': true,
|
|
81
|
+
'fetchOpenInterest': false,
|
|
59
82
|
'fetchOpenInterestHistory': false,
|
|
83
|
+
'fetchOpenInterests': false,
|
|
60
84
|
'fetchOpenOrders': true,
|
|
61
85
|
'fetchOrder': true,
|
|
62
86
|
'fetchOrderBook': true,
|
|
@@ -70,6 +94,7 @@ class ace extends ace$1 {
|
|
|
70
94
|
'fetchPositionsHistory': false,
|
|
71
95
|
'fetchPositionsRisk': false,
|
|
72
96
|
'fetchPremiumIndexOHLCV': false,
|
|
97
|
+
'fetchSettlementHistory': false,
|
|
73
98
|
'fetchTicker': true,
|
|
74
99
|
'fetchTickers': true,
|
|
75
100
|
'fetchTime': false,
|
|
@@ -82,8 +107,18 @@ class ace extends ace$1 {
|
|
|
82
107
|
'fetchTransfers': false,
|
|
83
108
|
'fetchWithdrawal': false,
|
|
84
109
|
'fetchWithdrawals': false,
|
|
110
|
+
'future': false,
|
|
111
|
+
'margin': false,
|
|
112
|
+
'option': false,
|
|
113
|
+
'reduceMargin': false,
|
|
114
|
+
'repayCrossMargin': false,
|
|
115
|
+
'repayIsolatedMargin': false,
|
|
85
116
|
'setLeverage': false,
|
|
117
|
+
'setMargin': false,
|
|
86
118
|
'setMarginMode': false,
|
|
119
|
+
'setPositionMode': false,
|
|
120
|
+
'spot': true,
|
|
121
|
+
'swap': false,
|
|
87
122
|
'transfer': false,
|
|
88
123
|
'withdraw': false,
|
|
89
124
|
'ws': false,
|
|
@@ -468,7 +503,7 @@ class ace extends ace$1 {
|
|
|
468
503
|
// ],
|
|
469
504
|
// [
|
|
470
505
|
// "0.001",
|
|
471
|
-
// "20948.
|
|
506
|
+
// "20948.13"
|
|
472
507
|
// ]
|
|
473
508
|
// ]
|
|
474
509
|
// },
|
package/dist/cjs/src/alpaca.js
CHANGED
|
@@ -46,6 +46,10 @@ class alpaca extends alpaca$1 {
|
|
|
46
46
|
'swap': false,
|
|
47
47
|
'future': false,
|
|
48
48
|
'option': false,
|
|
49
|
+
'addMargin': false,
|
|
50
|
+
'borrowCrossMargin': false,
|
|
51
|
+
'borrowIsolatedMargin': false,
|
|
52
|
+
'borrowMargin': false,
|
|
49
53
|
'cancelAllOrders': true,
|
|
50
54
|
'cancelOrder': true,
|
|
51
55
|
'closeAllPositions': false,
|
|
@@ -54,26 +58,61 @@ class alpaca extends alpaca$1 {
|
|
|
54
58
|
'createMarketBuyOrderWithCost': true,
|
|
55
59
|
'createMarketOrderWithCost': true,
|
|
56
60
|
'createOrder': true,
|
|
61
|
+
'createOrderWithTakeProfitAndStopLoss': false,
|
|
62
|
+
'createOrderWithTakeProfitAndStopLossWs': false,
|
|
63
|
+
'createReduceOnlyOrder': false,
|
|
57
64
|
'createStopOrder': true,
|
|
58
65
|
'createTriggerOrder': true,
|
|
59
66
|
'editOrder': true,
|
|
60
67
|
'fetchBalance': true,
|
|
61
68
|
'fetchBidsAsks': false,
|
|
69
|
+
'fetchBorrowInterest': false,
|
|
70
|
+
'fetchBorrowRate': false,
|
|
71
|
+
'fetchBorrowRateHistories': false,
|
|
72
|
+
'fetchBorrowRateHistory': false,
|
|
73
|
+
'fetchBorrowRates': false,
|
|
74
|
+
'fetchBorrowRatesPerSymbol': false,
|
|
62
75
|
'fetchClosedOrders': true,
|
|
76
|
+
'fetchCrossBorrowRate': false,
|
|
77
|
+
'fetchCrossBorrowRates': false,
|
|
63
78
|
'fetchCurrencies': false,
|
|
64
79
|
'fetchDepositAddress': true,
|
|
65
80
|
'fetchDepositAddressesByNetwork': false,
|
|
66
81
|
'fetchDeposits': true,
|
|
67
82
|
'fetchDepositsWithdrawals': true,
|
|
68
83
|
'fetchFundingHistory': false,
|
|
84
|
+
'fetchFundingInterval': false,
|
|
85
|
+
'fetchFundingIntervals': false,
|
|
69
86
|
'fetchFundingRate': false,
|
|
70
87
|
'fetchFundingRateHistory': false,
|
|
71
88
|
'fetchFundingRates': false,
|
|
89
|
+
'fetchGreeks': false,
|
|
90
|
+
'fetchIndexOHLCV': false,
|
|
91
|
+
'fetchIsolatedBorrowRate': false,
|
|
92
|
+
'fetchIsolatedBorrowRates': false,
|
|
93
|
+
'fetchIsolatedPositions': false,
|
|
72
94
|
'fetchL1OrderBook': true,
|
|
73
95
|
'fetchL2OrderBook': false,
|
|
96
|
+
'fetchLeverage': false,
|
|
97
|
+
'fetchLeverages': false,
|
|
98
|
+
'fetchLeverageTiers': false,
|
|
99
|
+
'fetchLiquidations': false,
|
|
100
|
+
'fetchLongShortRatio': false,
|
|
101
|
+
'fetchLongShortRatioHistory': false,
|
|
102
|
+
'fetchMarginAdjustmentHistory': false,
|
|
103
|
+
'fetchMarginMode': false,
|
|
104
|
+
'fetchMarginModes': false,
|
|
105
|
+
'fetchMarketLeverageTiers': false,
|
|
74
106
|
'fetchMarkets': true,
|
|
107
|
+
'fetchMarkOHLCV': false,
|
|
108
|
+
'fetchMarkPrices': false,
|
|
109
|
+
'fetchMyLiquidations': false,
|
|
110
|
+
'fetchMySettlementHistory': false,
|
|
75
111
|
'fetchMyTrades': true,
|
|
76
112
|
'fetchOHLCV': true,
|
|
113
|
+
'fetchOpenInterest': false,
|
|
114
|
+
'fetchOpenInterestHistory': false,
|
|
115
|
+
'fetchOpenInterests': false,
|
|
77
116
|
'fetchOpenOrder': false,
|
|
78
117
|
'fetchOpenOrders': true,
|
|
79
118
|
'fetchOrder': true,
|
|
@@ -86,6 +125,8 @@ class alpaca extends alpaca$1 {
|
|
|
86
125
|
'fetchPositionsForSymbol': false,
|
|
87
126
|
'fetchPositionsHistory': false,
|
|
88
127
|
'fetchPositionsRisk': false,
|
|
128
|
+
'fetchPremiumIndexOHLCV': false,
|
|
129
|
+
'fetchSettlementHistory': false,
|
|
89
130
|
'fetchStatus': false,
|
|
90
131
|
'fetchTicker': true,
|
|
91
132
|
'fetchTickers': true,
|
|
@@ -97,9 +138,14 @@ class alpaca extends alpaca$1 {
|
|
|
97
138
|
'fetchTransactions': false,
|
|
98
139
|
'fetchTransfers': false,
|
|
99
140
|
'fetchWithdrawals': true,
|
|
141
|
+
'reduceMargin': false,
|
|
142
|
+
'repayCrossMargin': false,
|
|
143
|
+
'repayIsolatedMargin': false,
|
|
100
144
|
'sandbox': true,
|
|
101
145
|
'setLeverage': false,
|
|
146
|
+
'setMargin': false,
|
|
102
147
|
'setMarginMode': false,
|
|
148
|
+
'setPositionMode': false,
|
|
103
149
|
'transfer': false,
|
|
104
150
|
'withdraw': true,
|
|
105
151
|
},
|
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -547,7 +547,7 @@ class ascendex extends ascendex$1 {
|
|
|
547
547
|
const ids = Object.keys(dataById);
|
|
548
548
|
const result = {};
|
|
549
549
|
for (let i = 0; i < ids.length; i++) {
|
|
550
|
-
const id = ids
|
|
550
|
+
const id = this.safeString(ids, i);
|
|
551
551
|
const currency = dataById[id];
|
|
552
552
|
const code = this.safeCurrencyCode(id);
|
|
553
553
|
const scale = this.safeString2(currency, 'precisionScale', 'nativeScale');
|
|
@@ -91,7 +91,7 @@ class Exchange {
|
|
|
91
91
|
this.validateClientSsl = false;
|
|
92
92
|
this.timeout = 10000; // milliseconds
|
|
93
93
|
this.verbose = false;
|
|
94
|
-
this.twofa = undefined; // two-factor authentication (
|
|
94
|
+
this.twofa = undefined; // two-factor authentication (2-FA)
|
|
95
95
|
this.balance = {};
|
|
96
96
|
this.liquidations = {};
|
|
97
97
|
this.orderbooks = {};
|
|
@@ -564,7 +564,7 @@ class Exchange {
|
|
|
564
564
|
if (proxyUrl !== undefined) {
|
|
565
565
|
// part only for node-js
|
|
566
566
|
if (isNode) {
|
|
567
|
-
// in node we need to set header to *
|
|
567
|
+
// in node-js we need to set header to *
|
|
568
568
|
headers = this.extend({ 'Origin': this.origin }, headers);
|
|
569
569
|
// only for http proxy
|
|
570
570
|
if (proxyUrl.substring(0, 5) === 'http:') {
|
|
@@ -6733,23 +6733,13 @@ class Exchange {
|
|
|
6733
6733
|
}
|
|
6734
6734
|
return result;
|
|
6735
6735
|
}
|
|
6736
|
-
removeRepeatedElementsFromArray(input) {
|
|
6736
|
+
removeRepeatedElementsFromArray(input, fallbackToTimestamp = true) {
|
|
6737
6737
|
const uniqueResult = {};
|
|
6738
6738
|
for (let i = 0; i < input.length; i++) {
|
|
6739
6739
|
const entry = input[i];
|
|
6740
|
-
const
|
|
6741
|
-
if (
|
|
6742
|
-
|
|
6743
|
-
uniqueResult[id] = entry;
|
|
6744
|
-
}
|
|
6745
|
-
}
|
|
6746
|
-
else {
|
|
6747
|
-
const timestamp = this.safeInteger2(entry, 'timestamp', 0);
|
|
6748
|
-
if (timestamp !== undefined) {
|
|
6749
|
-
if (this.safeString(uniqueResult, timestamp) === undefined) {
|
|
6750
|
-
uniqueResult[timestamp] = entry;
|
|
6751
|
-
}
|
|
6752
|
-
}
|
|
6740
|
+
const uniqValue = fallbackToTimestamp ? this.safeStringN(entry, ['id', 'timestamp', 0]) : this.safeString(entry, 'id');
|
|
6741
|
+
if (uniqValue !== undefined && !(uniqValue in uniqueResult)) {
|
|
6742
|
+
uniqueResult[uniqValue] = entry;
|
|
6753
6743
|
}
|
|
6754
6744
|
}
|
|
6755
6745
|
const values = Object.values(uniqueResult);
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -1294,12 +1294,13 @@ class binance extends binance$1 {
|
|
|
1294
1294
|
},
|
|
1295
1295
|
'quoteOrderQty': true,
|
|
1296
1296
|
'broker': {
|
|
1297
|
-
'spot': 'x-
|
|
1298
|
-
'margin': 'x-
|
|
1299
|
-
'future': 'x-
|
|
1297
|
+
'spot': 'x-TKT5PX2F',
|
|
1298
|
+
'margin': 'x-TKT5PX2F',
|
|
1299
|
+
'future': 'x-cvBPrNm9',
|
|
1300
1300
|
'delivery': 'x-xcKtGhcu',
|
|
1301
|
-
'swap': 'x-
|
|
1301
|
+
'swap': 'x-cvBPrNm9',
|
|
1302
1302
|
'option': 'x-xcKtGhcu',
|
|
1303
|
+
'inverse': 'x-xcKtGhcu',
|
|
1303
1304
|
},
|
|
1304
1305
|
'accountsByType': {
|
|
1305
1306
|
'main': 'MAIN',
|
|
@@ -4175,7 +4176,7 @@ class binance extends binance$1 {
|
|
|
4175
4176
|
//
|
|
4176
4177
|
// {
|
|
4177
4178
|
// "symbol": "BTCUSDT",
|
|
4178
|
-
// "markPrice": "11793.63104562",
|
|
4179
|
+
// "markPrice": "11793.63104562", // mark price
|
|
4179
4180
|
// "indexPrice": "11781.80495970", // index price
|
|
4180
4181
|
// "estimatedSettlePrice": "11781.16138815", // Estimated Settle Price, only useful in the last hour before the settlement starts
|
|
4181
4182
|
// "lastFundingRate": "0.00038246", // This is the lastest estimated funding rate
|
|
@@ -5328,7 +5329,7 @@ class binance extends binance$1 {
|
|
|
5328
5329
|
// "symbol": "BTCUSDT",
|
|
5329
5330
|
// "orderId": 16383176297,
|
|
5330
5331
|
// "orderListId": -1,
|
|
5331
|
-
// "clientOrderId": "x-
|
|
5332
|
+
// "clientOrderId": "x-TKT5PX2F22ecb58eb9074fb1be018c",
|
|
5332
5333
|
// "transactTime": 1670891847932,
|
|
5333
5334
|
// "price": "13500.00000000",
|
|
5334
5335
|
// "origQty": "0.00085000",
|
|
@@ -5735,7 +5736,7 @@ class binance extends binance$1 {
|
|
|
5735
5736
|
// "symbol": "BTCUSDT",
|
|
5736
5737
|
// "orderId": 16383176297,
|
|
5737
5738
|
// "orderListId": -1,
|
|
5738
|
-
// "clientOrderId": "x-
|
|
5739
|
+
// "clientOrderId": "x-TKT5PX2F22ecb58eb9074fb1be018c",
|
|
5739
5740
|
// "transactTime": 1670891847932,
|
|
5740
5741
|
// "price": "13500.00000000",
|
|
5741
5742
|
// "origQty": "0.00085000",
|
|
@@ -5798,7 +5799,7 @@ class binance extends binance$1 {
|
|
|
5798
5799
|
// "symbol": "BTCUSDT",
|
|
5799
5800
|
// "orderId": 5403233939,
|
|
5800
5801
|
// "orderListId": -1,
|
|
5801
|
-
// "clientOrderId": "x-
|
|
5802
|
+
// "clientOrderId": "x-TKT5PX2F5e669e75b6c14f69a2c43e",
|
|
5802
5803
|
// "transactTime": 1617151923742,
|
|
5803
5804
|
// "price": "0.00000000",
|
|
5804
5805
|
// "origQty": "0.00050000",
|
|
@@ -5973,7 +5974,7 @@ class binance extends binance$1 {
|
|
|
5973
5974
|
// createOrder, cancelAllOrders, cancelOrder: portfolio margin spot margin
|
|
5974
5975
|
//
|
|
5975
5976
|
// {
|
|
5976
|
-
// "clientOrderId": "x-
|
|
5977
|
+
// "clientOrderId": "x-TKT5PX2Fe9ef29d8346440f0b28b86",
|
|
5977
5978
|
// "cummulativeQuoteQty": "0.00000000",
|
|
5978
5979
|
// "executedQty": "0.00000000",
|
|
5979
5980
|
// "fills": [],
|
|
@@ -5994,7 +5995,7 @@ class binance extends binance$1 {
|
|
|
5994
5995
|
// {
|
|
5995
5996
|
// "symbol": "BTCUSDT",
|
|
5996
5997
|
// "orderId": 24700763749,
|
|
5997
|
-
// "clientOrderId": "x-
|
|
5998
|
+
// "clientOrderId": "x-TKT5PX2F6f724c2a4af6425f98c7b6",
|
|
5998
5999
|
// "price": "35000.00000000",
|
|
5999
6000
|
// "origQty": "0.00100000",
|
|
6000
6001
|
// "executedQty": "0.00000000",
|
|
@@ -6591,8 +6592,12 @@ class binance extends binance$1 {
|
|
|
6591
6592
|
const clientOrderIdRequest = isPortfolioMarginConditional ? 'newClientStrategyId' : 'newClientOrderId';
|
|
6592
6593
|
if (clientOrderId === undefined) {
|
|
6593
6594
|
const broker = this.safeDict(this.options, 'broker', {});
|
|
6594
|
-
const defaultId = (market['contract']) ? 'x-xcKtGhcu' : 'x-
|
|
6595
|
-
|
|
6595
|
+
const defaultId = (market['contract']) ? 'x-xcKtGhcu' : 'x-TKT5PX2F';
|
|
6596
|
+
let idMarketType = 'spot';
|
|
6597
|
+
if (market['contract']) {
|
|
6598
|
+
idMarketType = (market['swap'] && market['linear']) ? 'swap' : 'inverse';
|
|
6599
|
+
}
|
|
6600
|
+
const brokerId = this.safeString(broker, idMarketType, defaultId);
|
|
6596
6601
|
request[clientOrderIdRequest] = brokerId + this.uuid22();
|
|
6597
6602
|
}
|
|
6598
6603
|
else {
|
|
@@ -7206,7 +7211,7 @@ class binance extends binance$1 {
|
|
|
7206
7211
|
// {
|
|
7207
7212
|
// "symbol": "BTCUSDT",
|
|
7208
7213
|
// "orderId": 24684460474,
|
|
7209
|
-
// "clientOrderId": "x-
|
|
7214
|
+
// "clientOrderId": "x-TKT5PX2Fe9ef29d8346440f0b28b86",
|
|
7210
7215
|
// "price": "35000.00000000",
|
|
7211
7216
|
// "origQty": "0.00100000",
|
|
7212
7217
|
// "executedQty": "0.00000000",
|
|
@@ -7899,7 +7904,7 @@ class binance extends binance$1 {
|
|
|
7899
7904
|
// [
|
|
7900
7905
|
// {
|
|
7901
7906
|
// "symbol": "ADAUSDT",
|
|
7902
|
-
// "origClientOrderId": "x-
|
|
7907
|
+
// "origClientOrderId": "x-TKT5PX2F662cde7a90114475b86e21",
|
|
7903
7908
|
// "orderId": 3935107,
|
|
7904
7909
|
// "orderListId": -1,
|
|
7905
7910
|
// "clientOrderId": "bqM2w1oTlugfRAjnTIFBE8",
|
|
@@ -12112,7 +12117,7 @@ class binance extends binance$1 {
|
|
|
12112
12117
|
if (newClientOrderId === undefined) {
|
|
12113
12118
|
const isSpotOrMargin = (api.indexOf('sapi') > -1 || api === 'private');
|
|
12114
12119
|
const marketType = isSpotOrMargin ? 'spot' : 'future';
|
|
12115
|
-
const defaultId = (!isSpotOrMargin) ? 'x-xcKtGhcu' : 'x-
|
|
12120
|
+
const defaultId = (!isSpotOrMargin) ? 'x-xcKtGhcu' : 'x-TKT5PX2F';
|
|
12116
12121
|
const broker = this.safeDict(this.options, 'broker', {});
|
|
12117
12122
|
const brokerId = this.safeString(broker, marketType, defaultId);
|
|
12118
12123
|
params['newClientOrderId'] = brokerId + this.uuid22();
|
package/dist/cjs/src/bit2c.js
CHANGED
|
@@ -54,24 +54,35 @@ class bit2c extends bit2c$1 {
|
|
|
54
54
|
'fetchMarginMode': false,
|
|
55
55
|
'fetchMarkOHLCV': false,
|
|
56
56
|
'fetchMyTrades': true,
|
|
57
|
+
'fetchOpenInterest': false,
|
|
58
|
+
'fetchOpenInterests': false,
|
|
57
59
|
'fetchOpenInterestHistory': false,
|
|
58
60
|
'fetchOpenOrders': true,
|
|
59
61
|
'fetchOrder': true,
|
|
60
62
|
'fetchOrderBook': true,
|
|
61
63
|
'fetchPosition': false,
|
|
64
|
+
'fetchPositionHistory': false,
|
|
65
|
+
'fetchPositionsHistory': false,
|
|
66
|
+
'fetchPositionsForSymbol': false,
|
|
62
67
|
'fetchPositionMode': false,
|
|
63
68
|
'fetchPositions': false,
|
|
64
69
|
'fetchPositionsRisk': false,
|
|
65
70
|
'fetchPremiumIndexOHLCV': false,
|
|
71
|
+
'fetchSettlementHistory': false,
|
|
66
72
|
'fetchTicker': true,
|
|
67
73
|
'fetchTrades': true,
|
|
68
74
|
'fetchTradingFee': false,
|
|
69
75
|
'fetchTradingFees': true,
|
|
70
76
|
'fetchTransfer': false,
|
|
71
77
|
'fetchTransfers': false,
|
|
78
|
+
'fetchUnderlyingAssets': false,
|
|
72
79
|
'reduceMargin': false,
|
|
80
|
+
'repayCrossMargin': false,
|
|
81
|
+
'repayIsolatedMargin': false,
|
|
82
|
+
'repayMargin': false,
|
|
73
83
|
'setLeverage': false,
|
|
74
84
|
'setMarginMode': false,
|
|
85
|
+
'setMargin': false,
|
|
75
86
|
'setPositionMode': false,
|
|
76
87
|
'transfer': false,
|
|
77
88
|
'ws': false,
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -1922,7 +1922,7 @@ class bitget extends bitget$1 {
|
|
|
1922
1922
|
const priceDecimals = this.safeInteger(market, 'pricePlace');
|
|
1923
1923
|
const amountDecimals = this.safeInteger(market, 'volumePlace');
|
|
1924
1924
|
const priceStep = this.safeString(market, 'priceEndStep');
|
|
1925
|
-
const amountStep = this.safeString(market, '
|
|
1925
|
+
const amountStep = this.safeString(market, 'sizeMultiplier');
|
|
1926
1926
|
const precise = new Precise["default"](priceStep);
|
|
1927
1927
|
precise.decimals = Math.max(precise.decimals, priceDecimals);
|
|
1928
1928
|
precise.reduce();
|
|
@@ -2445,18 +2445,20 @@ class bitget extends bitget$1 {
|
|
|
2445
2445
|
if (paginate) {
|
|
2446
2446
|
return await this.fetchPaginatedCallCursor('fetchWithdrawals', undefined, since, limit, params, 'idLessThan', 'idLessThan', undefined, 100);
|
|
2447
2447
|
}
|
|
2448
|
-
|
|
2449
|
-
|
|
2448
|
+
let currency = undefined;
|
|
2449
|
+
if (code !== undefined) {
|
|
2450
|
+
currency = this.currency(code);
|
|
2450
2451
|
}
|
|
2451
|
-
const currency = this.currency(code);
|
|
2452
2452
|
if (since === undefined) {
|
|
2453
2453
|
since = this.milliseconds() - 7776000000; // 90 days
|
|
2454
2454
|
}
|
|
2455
2455
|
let request = {
|
|
2456
|
-
'coin': currency['id'],
|
|
2457
2456
|
'startTime': since,
|
|
2458
2457
|
'endTime': this.milliseconds(),
|
|
2459
2458
|
};
|
|
2459
|
+
if (currency !== undefined) {
|
|
2460
|
+
request['coin'] = currency['id'];
|
|
2461
|
+
}
|
|
2460
2462
|
[request, params] = this.handleUntilOption('endTime', request, params);
|
|
2461
2463
|
if (limit !== undefined) {
|
|
2462
2464
|
request['limit'] = limit;
|
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -1244,7 +1244,7 @@ class bitrue extends bitrue$1 {
|
|
|
1244
1244
|
// "time": 1699338305000
|
|
1245
1245
|
// }
|
|
1246
1246
|
//
|
|
1247
|
-
const timestamp = this.
|
|
1247
|
+
const timestamp = this.safeInteger2(response, 'time', 'lastUpdateId');
|
|
1248
1248
|
const orderbook = this.parseOrderBook(response, symbol, timestamp);
|
|
1249
1249
|
orderbook['nonce'] = this.safeInteger(response, 'lastUpdateId');
|
|
1250
1250
|
return orderbook;
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -6315,10 +6315,16 @@ class bybit extends bybit$1 {
|
|
|
6315
6315
|
* @param {string} [params.subType] market subType, ['linear', 'inverse']
|
|
6316
6316
|
* @param {string} [params.baseCoin] Base coin. Supports linear, inverse & option
|
|
6317
6317
|
* @param {string} [params.settleCoin] Settle coin. Supports linear, inverse & option
|
|
6318
|
+
* @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times
|
|
6318
6319
|
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
|
|
6319
6320
|
*/
|
|
6320
6321
|
async fetchPositions(symbols = undefined, params = {}) {
|
|
6321
6322
|
await this.loadMarkets();
|
|
6323
|
+
let paginate = false;
|
|
6324
|
+
[paginate, params] = this.handleOptionAndParams(params, 'fetchPositions', 'paginate');
|
|
6325
|
+
if (paginate) {
|
|
6326
|
+
return await this.fetchPaginatedCallCursor('fetchPositions', symbols, undefined, undefined, params, 'nextPageCursor', 'cursor', undefined, 200);
|
|
6327
|
+
}
|
|
6322
6328
|
let symbol = undefined;
|
|
6323
6329
|
if ((symbols !== undefined) && Array.isArray(symbols)) {
|
|
6324
6330
|
const symbolsLength = symbols.length;
|
|
@@ -6359,6 +6365,9 @@ class bybit extends bybit$1 {
|
|
|
6359
6365
|
}
|
|
6360
6366
|
}
|
|
6361
6367
|
}
|
|
6368
|
+
if (this.safeInteger(params, 'limit') === undefined) {
|
|
6369
|
+
request['limit'] = 200; // max limit
|
|
6370
|
+
}
|
|
6362
6371
|
params = this.omit(params, ['type']);
|
|
6363
6372
|
request['category'] = type;
|
|
6364
6373
|
const response = await this.privateGetV5PositionList(this.extend(request, params));
|
package/dist/cjs/src/defx.js
CHANGED
|
@@ -610,7 +610,7 @@ class defx extends defx$1 {
|
|
|
610
610
|
'active': this.safeString(market, 'status', '') === 'active',
|
|
611
611
|
'contract': true,
|
|
612
612
|
'linear': true,
|
|
613
|
-
'inverse':
|
|
613
|
+
'inverse': false,
|
|
614
614
|
'taker': this.safeNumber(fees, 'taker'),
|
|
615
615
|
'maker': this.safeNumber(fees, 'maker'),
|
|
616
616
|
'contractSize': this.parseNumber('1'),
|
package/dist/cjs/src/derive.js
CHANGED
|
@@ -11,7 +11,7 @@ var sha256 = require('../static_dependencies/noble-hashes/sha256.js');
|
|
|
11
11
|
/**
|
|
12
12
|
* @class bitget
|
|
13
13
|
* @augments Exchange
|
|
14
|
-
* @description watching delivery future markets is not yet implemented (perpertual future
|
|
14
|
+
* @description watching delivery future markets is not yet implemented (perpertual future & swap is implemented)
|
|
15
15
|
*/
|
|
16
16
|
class bitget extends bitget$1 {
|
|
17
17
|
describe() {
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OrderBooks, OpenInterests, ConstructorArgs } 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.72";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
|
@@ -20,7 +20,6 @@ import bitbank from './src/bitbank.js';
|
|
|
20
20
|
import bitbns from './src/bitbns.js';
|
|
21
21
|
import bitcoincom from './src/bitcoincom.js';
|
|
22
22
|
import bitfinex from './src/bitfinex.js';
|
|
23
|
-
import bitfinex1 from './src/bitfinex1.js';
|
|
24
23
|
import bitflyer from './src/bitflyer.js';
|
|
25
24
|
import bitget from './src/bitget.js';
|
|
26
25
|
import bithumb from './src/bithumb.js';
|
|
@@ -125,7 +124,6 @@ import binanceusdmPro from './src/pro/binanceusdm.js';
|
|
|
125
124
|
import bingxPro from './src/pro/bingx.js';
|
|
126
125
|
import bitcoincomPro from './src/pro/bitcoincom.js';
|
|
127
126
|
import bitfinexPro from './src/pro/bitfinex.js';
|
|
128
|
-
import bitfinex1Pro from './src/pro/bitfinex1.js';
|
|
129
127
|
import bitgetPro from './src/pro/bitget.js';
|
|
130
128
|
import bithumbPro from './src/pro/bithumb.js';
|
|
131
129
|
import bitmartPro from './src/pro/bitmart.js';
|
|
@@ -204,7 +202,6 @@ declare const exchanges: {
|
|
|
204
202
|
bitbns: typeof bitbns;
|
|
205
203
|
bitcoincom: typeof bitcoincom;
|
|
206
204
|
bitfinex: typeof bitfinex;
|
|
207
|
-
bitfinex1: typeof bitfinex1;
|
|
208
205
|
bitflyer: typeof bitflyer;
|
|
209
206
|
bitget: typeof bitget;
|
|
210
207
|
bithumb: typeof bithumb;
|
|
@@ -311,7 +308,6 @@ declare const pro: {
|
|
|
311
308
|
bingx: typeof bingxPro;
|
|
312
309
|
bitcoincom: typeof bitcoincomPro;
|
|
313
310
|
bitfinex: typeof bitfinexPro;
|
|
314
|
-
bitfinex1: typeof bitfinex1Pro;
|
|
315
311
|
bitget: typeof bitgetPro;
|
|
316
312
|
bithumb: typeof bithumbPro;
|
|
317
313
|
bitmart: typeof bitmartPro;
|
|
@@ -391,7 +387,6 @@ declare const ccxt: {
|
|
|
391
387
|
bingx: typeof bingxPro;
|
|
392
388
|
bitcoincom: typeof bitcoincomPro;
|
|
393
389
|
bitfinex: typeof bitfinexPro;
|
|
394
|
-
bitfinex1: typeof bitfinex1Pro;
|
|
395
390
|
bitget: typeof bitgetPro;
|
|
396
391
|
bithumb: typeof bithumbPro;
|
|
397
392
|
bitmart: typeof bitmartPro;
|
|
@@ -471,7 +466,6 @@ declare const ccxt: {
|
|
|
471
466
|
bitbns: typeof bitbns;
|
|
472
467
|
bitcoincom: typeof bitcoincom;
|
|
473
468
|
bitfinex: typeof bitfinex;
|
|
474
|
-
bitfinex1: typeof bitfinex1;
|
|
475
469
|
bitflyer: typeof bitflyer;
|
|
476
470
|
bitget: typeof bitget;
|
|
477
471
|
bithumb: typeof bithumb;
|
|
@@ -567,5 +561,5 @@ declare const ccxt: {
|
|
|
567
561
|
zaif: typeof zaif;
|
|
568
562
|
zonda: typeof zonda;
|
|
569
563
|
} & typeof functions & typeof errors;
|
|
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, 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,
|
|
564
|
+
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, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbns, bitcoincom, bitfinex, 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, };
|
|
571
565
|
export default ccxt;
|