ccxt 4.1.20 → 4.1.23
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/CHANGELOG.md +192 -0
- package/README.md +8 -4
- package/dist/ccxt.browser.js +2082 -2861
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +1 -0
- package/dist/cjs/src/base/ws/OrderBookSide.js +20 -4
- package/dist/cjs/src/bitget.js +1 -1
- package/dist/cjs/src/bybit.js +4 -2
- package/dist/cjs/src/okcoin.js +2056 -2858
- package/dist/cjs/src/pro/bitfinex2.js +8 -4
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/ascendex.d.ts +1 -0
- package/js/src/abstract/okcoin.d.ts +70 -206
- package/js/src/ascendex.js +1 -0
- package/js/src/base/ws/OrderBookSide.js +20 -4
- package/js/src/bitget.js +1 -1
- package/js/src/bybit.js +4 -2
- package/js/src/okcoin.d.ts +27 -33
- package/js/src/okcoin.js +2057 -2859
- package/js/src/pro/bitfinex2.js +8 -4
- package/package.json +1 -1
- package/skip-tests.json +2 -1
package/js/src/pro/bitfinex2.js
CHANGED
|
@@ -577,7 +577,6 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
577
577
|
const messageHash = channel + ':' + marketId;
|
|
578
578
|
const prec = this.safeString(subscription, 'prec', 'P0');
|
|
579
579
|
const isRaw = (prec === 'R0');
|
|
580
|
-
const id = this.safeString(message, 0);
|
|
581
580
|
// if it is an initial snapshot
|
|
582
581
|
let orderbook = this.safeValue(this.orderbooks, symbol);
|
|
583
582
|
if (orderbook === undefined) {
|
|
@@ -616,6 +615,7 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
616
615
|
bookside.store(price, size, counter);
|
|
617
616
|
}
|
|
618
617
|
}
|
|
618
|
+
orderbook['symbol'] = symbol;
|
|
619
619
|
client.resolve(orderbook, messageHash);
|
|
620
620
|
}
|
|
621
621
|
else {
|
|
@@ -628,7 +628,8 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
628
628
|
const bookside = orderbookItem[side];
|
|
629
629
|
// price = 0 means that you have to remove the order from your book
|
|
630
630
|
const amount = Precise.stringGt(price, '0') ? size : '0';
|
|
631
|
-
|
|
631
|
+
const idString = this.safeString(deltas, 0);
|
|
632
|
+
bookside.store(this.parseNumber(price), this.parseNumber(amount), idString);
|
|
632
633
|
}
|
|
633
634
|
else {
|
|
634
635
|
const amount = this.safeString(deltas, 2);
|
|
@@ -658,16 +659,19 @@ export default class bitfinex2 extends bitfinex2Rest {
|
|
|
658
659
|
const stringArray = [];
|
|
659
660
|
const bids = book['bids'];
|
|
660
661
|
const asks = book['asks'];
|
|
662
|
+
const prec = this.safeString(subscription, 'prec', 'P0');
|
|
663
|
+
const isRaw = (prec === 'R0');
|
|
664
|
+
const idToCheck = isRaw ? 2 : 0;
|
|
661
665
|
// pepperoni pizza from bitfinex
|
|
662
666
|
for (let i = 0; i < depth; i++) {
|
|
663
667
|
const bid = this.safeValue(bids, i);
|
|
664
668
|
const ask = this.safeValue(asks, i);
|
|
665
669
|
if (bid !== undefined) {
|
|
666
|
-
stringArray.push(this.numberToString(bids[i][
|
|
670
|
+
stringArray.push(this.numberToString(bids[i][idToCheck]));
|
|
667
671
|
stringArray.push(this.numberToString(bids[i][1]));
|
|
668
672
|
}
|
|
669
673
|
if (ask !== undefined) {
|
|
670
|
-
stringArray.push(this.numberToString(asks[i][
|
|
674
|
+
stringArray.push(this.numberToString(asks[i][idToCheck]));
|
|
671
675
|
stringArray.push(this.numberToString(-asks[i][1]));
|
|
672
676
|
}
|
|
673
677
|
}
|
package/package.json
CHANGED
package/skip-tests.json
CHANGED
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
"bitfinex2": {
|
|
177
|
-
"skipWs": true,
|
|
177
|
+
"//skipWs": true,
|
|
178
178
|
"skipMethods": {
|
|
179
179
|
"loadMarkets": {
|
|
180
180
|
"currencyIdAndCode": "broken currencies"
|
|
@@ -509,6 +509,7 @@
|
|
|
509
509
|
}
|
|
510
510
|
},
|
|
511
511
|
"btcalpha": {
|
|
512
|
+
"skip": true,
|
|
512
513
|
"skipMethods": {
|
|
513
514
|
"fetchOrderBook": "bids[0][0] is not < asks[0][0]",
|
|
514
515
|
"fetchL2OrderBook": "same",
|