ccxt 4.2.65 → 4.2.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/build.sh +1 -1
- package/dist/ccxt.browser.js +64 -23
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bigone.js +6 -2
- package/dist/cjs/src/bitfinex2.js +4 -4
- package/dist/cjs/src/bitget.js +16 -2
- package/dist/cjs/src/hitbtc.js +1 -1
- package/dist/cjs/src/pro/bitfinex2.js +5 -4
- package/dist/cjs/src/pro/bitget.js +3 -3
- package/dist/cjs/src/pro/bitmart.js +28 -6
- package/doc/manual.rst +1 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/bitget.d.ts +5 -0
- package/js/src/bigone.js +6 -2
- package/js/src/bitfinex2.js +4 -4
- package/js/src/bitget.js +16 -2
- package/js/src/hitbtc.js +1 -1
- package/js/src/pro/bitfinex2.js +5 -4
- package/js/src/pro/bitget.js +3 -3
- package/js/src/pro/bitmart.js +28 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -210,13 +210,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
210
210
|
|
|
211
211
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
212
212
|
|
|
213
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.2.
|
|
214
|
-
* unpkg: https://unpkg.com/ccxt@4.2.
|
|
213
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.2.66/dist/ccxt.browser.js
|
|
214
|
+
* unpkg: https://unpkg.com/ccxt@4.2.66/dist/ccxt.browser.js
|
|
215
215
|
|
|
216
216
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
|
217
217
|
|
|
218
218
|
```HTML
|
|
219
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.2.
|
|
219
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.2.66/dist/ccxt.browser.js"></script>
|
|
220
220
|
```
|
|
221
221
|
|
|
222
222
|
Creates a global `ccxt` object:
|
package/build.sh
CHANGED
package/dist/ccxt.browser.js
CHANGED
|
@@ -17481,7 +17481,11 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
17481
17481
|
}
|
|
17482
17482
|
}
|
|
17483
17483
|
request['type'] = uppercaseType;
|
|
17484
|
-
|
|
17484
|
+
const clientOrderId = this.safeString(params, 'clientOrderId');
|
|
17485
|
+
if (clientOrderId !== undefined) {
|
|
17486
|
+
request['client_order_id'] = clientOrderId;
|
|
17487
|
+
}
|
|
17488
|
+
params = this.omit(params, ['stop_price', 'stopPrice', 'triggerPrice', 'timeInForce', 'clientOrderId']);
|
|
17485
17489
|
const response = await this.privatePostOrders(this.extend(request, params));
|
|
17486
17490
|
//
|
|
17487
17491
|
// {
|
|
@@ -17762,7 +17766,7 @@ class bigone extends _abstract_bigone_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
17762
17766
|
}
|
|
17763
17767
|
else if (method === 'POST') {
|
|
17764
17768
|
headers['Content-Type'] = 'application/json';
|
|
17765
|
-
body = query;
|
|
17769
|
+
body = this.json(query);
|
|
17766
17770
|
}
|
|
17767
17771
|
}
|
|
17768
17772
|
headers['User-Agent'] = 'ccxt/' + this.id + '-' + this.version;
|
|
@@ -43196,10 +43200,10 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
43196
43200
|
}
|
|
43197
43201
|
const reversedArray = [];
|
|
43198
43202
|
const rawRates = this.filterBySymbolSinceLimit(rates, symbol, since, limit);
|
|
43199
|
-
const
|
|
43200
|
-
|
|
43201
|
-
|
|
43202
|
-
const valueAtIndex = rawRates[
|
|
43203
|
+
const ratesLength = rawRates.length;
|
|
43204
|
+
for (let i = 0; i < ratesLength; i++) {
|
|
43205
|
+
const index = ratesLength - i - 1;
|
|
43206
|
+
const valueAtIndex = rawRates[index];
|
|
43203
43207
|
reversedArray.push(valueAtIndex);
|
|
43204
43208
|
}
|
|
43205
43209
|
return reversedArray;
|
|
@@ -45259,6 +45263,8 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45259
45263
|
'v2/spot/wallet/transfer': 2,
|
|
45260
45264
|
'v2/spot/wallet/subaccount-transfer': 2,
|
|
45261
45265
|
'v2/spot/wallet/withdrawal': 2,
|
|
45266
|
+
'v2/spot/wallet/cancel-withdrawal': 2,
|
|
45267
|
+
'v2/spot/wallet/modify-deposit-account': 2,
|
|
45262
45268
|
},
|
|
45263
45269
|
},
|
|
45264
45270
|
'mix': {
|
|
@@ -45603,9 +45609,12 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
45603
45609
|
'v2/convert/currencies': 2,
|
|
45604
45610
|
'v2/convert/quoted-price': 2,
|
|
45605
45611
|
'v2/convert/convert-record': 2,
|
|
45612
|
+
'v2/convert/bgb-convert-coin-list': 2,
|
|
45613
|
+
'v2/convert/bgb-convert-records': 2,
|
|
45606
45614
|
},
|
|
45607
45615
|
'post': {
|
|
45608
45616
|
'v2/convert/trade': 2,
|
|
45617
|
+
'v2/convert/bgb-convert': 2,
|
|
45609
45618
|
},
|
|
45610
45619
|
},
|
|
45611
45620
|
'earn': {
|
|
@@ -49810,6 +49819,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
49810
49819
|
* @name bitget#cancelAllOrders
|
|
49811
49820
|
* @description cancel all open orders
|
|
49812
49821
|
* @see https://www.bitget.com/api-doc/spot/trade/Cancel-Symbol-Orders
|
|
49822
|
+
* @see https://www.bitget.com/api-doc/spot/plan/Batch-Cancel-Plan-Order
|
|
49813
49823
|
* @see https://www.bitget.com/api-doc/contract/trade/Batch-Cancel-Orders
|
|
49814
49824
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#isolated-batch-cancel-orders
|
|
49815
49825
|
* @see https://bitgetlimited.github.io/apidoc/en/margin/#cross-batch-cancel-order
|
|
@@ -49837,7 +49847,7 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
49837
49847
|
const request = {
|
|
49838
49848
|
'symbol': market['id'],
|
|
49839
49849
|
};
|
|
49840
|
-
const stop = this.
|
|
49850
|
+
const stop = this.safeBool2(params, 'stop', 'trigger');
|
|
49841
49851
|
params = this.omit(params, ['stop', 'trigger']);
|
|
49842
49852
|
let response = undefined;
|
|
49843
49853
|
if (market['spot']) {
|
|
@@ -49850,7 +49860,15 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
49850
49860
|
}
|
|
49851
49861
|
}
|
|
49852
49862
|
else {
|
|
49853
|
-
|
|
49863
|
+
if (stop) {
|
|
49864
|
+
const stopRequest = {
|
|
49865
|
+
'symbolList': [market['id']],
|
|
49866
|
+
};
|
|
49867
|
+
response = await this.privateSpotPostV2SpotTradeBatchCancelPlanOrder(this.extend(stopRequest, params));
|
|
49868
|
+
}
|
|
49869
|
+
else {
|
|
49870
|
+
response = await this.privateSpotPostV2SpotTradeCancelSymbolOrder(this.extend(request, params));
|
|
49871
|
+
}
|
|
49854
49872
|
}
|
|
49855
49873
|
}
|
|
49856
49874
|
else {
|
|
@@ -143845,10 +143863,10 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
143845
143863
|
'symbol': market['id'],
|
|
143846
143864
|
'period': this.safeString(this.timeframes, timeframe, timeframe),
|
|
143847
143865
|
};
|
|
143848
|
-
[request, params] = this.handleUntilOption('till', request, params);
|
|
143849
143866
|
if (since !== undefined) {
|
|
143850
143867
|
request['from'] = this.iso8601(since);
|
|
143851
143868
|
}
|
|
143869
|
+
[request, params] = this.handleUntilOption('till', request, params);
|
|
143852
143870
|
if (limit !== undefined) {
|
|
143853
143871
|
request['limit'] = limit;
|
|
143854
143872
|
}
|
|
@@ -228658,11 +228676,12 @@ class bitfinex2 extends _bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
228658
228676
|
const messageLength = message.length;
|
|
228659
228677
|
if (messageLength === 2) {
|
|
228660
228678
|
// initial snapshot
|
|
228661
|
-
|
|
228679
|
+
const trades = this.safeList(message, 1, []);
|
|
228662
228680
|
// needs to be reversed to make chronological order
|
|
228663
|
-
|
|
228664
|
-
for (let i = 0; i <
|
|
228665
|
-
const
|
|
228681
|
+
const length = trades.length;
|
|
228682
|
+
for (let i = 0; i < length; i++) {
|
|
228683
|
+
const index = length - i - 1;
|
|
228684
|
+
const parsed = this.parseWsTrade(trades[index], market);
|
|
228666
228685
|
stored.append(parsed);
|
|
228667
228686
|
}
|
|
228668
228687
|
}
|
|
@@ -230176,10 +230195,10 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
230176
230195
|
}
|
|
230177
230196
|
const data = this.safeList(message, 'data', []);
|
|
230178
230197
|
const length = data.length;
|
|
230179
|
-
const maxLength = Math.max(length - 1, 0);
|
|
230180
230198
|
// fix chronological order by reversing
|
|
230181
|
-
for (let i =
|
|
230182
|
-
const
|
|
230199
|
+
for (let i = 0; i < length; i++) {
|
|
230200
|
+
const index = length - i - 1;
|
|
230201
|
+
const rawTrade = data[index];
|
|
230183
230202
|
const parsed = this.parseWsTrade(rawTrade, market);
|
|
230184
230203
|
stored.append(parsed);
|
|
230185
230204
|
}
|
|
@@ -232098,9 +232117,9 @@ class bitmart extends _bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
232098
232117
|
const isSwap = ('group' in message);
|
|
232099
232118
|
if (isSwap) {
|
|
232100
232119
|
// in swap, chronologically decreasing: 1709536849322, 1709536848954,
|
|
232101
|
-
|
|
232102
|
-
|
|
232103
|
-
symbol = this.handleTradeLoop(data[
|
|
232120
|
+
for (let i = 0; i < length; i++) {
|
|
232121
|
+
const index = length - i - 1;
|
|
232122
|
+
symbol = this.handleTradeLoop(data[index]);
|
|
232104
232123
|
}
|
|
232105
232124
|
}
|
|
232106
232125
|
else {
|
|
@@ -232742,7 +232761,17 @@ class bitmart extends _bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
232742
232761
|
}
|
|
232743
232762
|
//
|
|
232744
232763
|
// {"event":"error","message":"Unrecognized request: {\"event\":\"subscribe\",\"channel\":\"spot/depth:BTC-USDT\"}","errorCode":30039}
|
|
232745
|
-
//
|
|
232764
|
+
//
|
|
232765
|
+
// subscribe events on spot:
|
|
232766
|
+
//
|
|
232767
|
+
// {"event":"subscribe", "topic":"spot/kline1m:BTC_USDT" }
|
|
232768
|
+
//
|
|
232769
|
+
// subscribe on contracts:
|
|
232770
|
+
//
|
|
232771
|
+
// {"action":"subscribe", "group":"futures/klineBin1m:BTCUSDT", "success":true, "request":{"action":"subscribe", "args":[ "futures/klineBin1m:BTCUSDT" ] } }
|
|
232772
|
+
//
|
|
232773
|
+
// regular updates - spot
|
|
232774
|
+
//
|
|
232746
232775
|
// {
|
|
232747
232776
|
// "table": "spot/depth",
|
|
232748
232777
|
// "action": "partial",
|
|
@@ -232763,10 +232792,21 @@ class bitmart extends _bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
232763
232792
|
// ]
|
|
232764
232793
|
// }
|
|
232765
232794
|
//
|
|
232795
|
+
// regular updates - contracts
|
|
232796
|
+
//
|
|
232797
|
+
// {
|
|
232798
|
+
// group: "futures/klineBin1m:BTCUSDT",
|
|
232799
|
+
// data: {
|
|
232800
|
+
// symbol: "BTCUSDT",
|
|
232801
|
+
// items: [ { o: "67944.7", "h": .... } ],
|
|
232802
|
+
// },
|
|
232803
|
+
// }
|
|
232804
|
+
//
|
|
232766
232805
|
// { data: '', table: "spot/user/order" }
|
|
232767
232806
|
//
|
|
232768
|
-
|
|
232769
|
-
|
|
232807
|
+
// the only realiable way (for both spot & swap) is to check 'data' key
|
|
232808
|
+
const isDataUpdate = ('data' in message);
|
|
232809
|
+
if (!isDataUpdate) {
|
|
232770
232810
|
const event = this.safeString2(message, 'event', 'action');
|
|
232771
232811
|
if (event !== undefined) {
|
|
232772
232812
|
const methods = {
|
|
@@ -232782,6 +232822,7 @@ class bitmart extends _bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
|
|
|
232782
232822
|
}
|
|
232783
232823
|
}
|
|
232784
232824
|
else {
|
|
232825
|
+
const channel = this.safeString2(message, 'table', 'group');
|
|
232785
232826
|
const methods = {
|
|
232786
232827
|
'depth': this.handleOrderBook,
|
|
232787
232828
|
'ticker': this.handleTicker,
|
|
@@ -316764,7 +316805,7 @@ SOFTWARE.
|
|
|
316764
316805
|
|
|
316765
316806
|
//-----------------------------------------------------------------------------
|
|
316766
316807
|
// this is updated by vss.js when building
|
|
316767
|
-
const version = '4.2.
|
|
316808
|
+
const version = '4.2.66';
|
|
316768
316809
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
316769
316810
|
//-----------------------------------------------------------------------------
|
|
316770
316811
|
|