ccxt 4.2.34 → 4.2.36
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/dist/ccxt.browser.js +520 -182
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +10 -2
- package/dist/cjs/src/base/ws/Client.js +5 -2
- package/dist/cjs/src/binance.js +335 -94
- package/dist/cjs/src/bitfinex.js +21 -0
- package/dist/cjs/src/bitfinex2.js +12 -1
- package/dist/cjs/src/bitget.js +28 -39
- package/dist/cjs/src/bithumb.js +14 -0
- package/dist/cjs/src/krakenfutures.js +25 -3
- package/dist/cjs/src/pro/binance.js +5 -5
- package/dist/cjs/src/woo.js +64 -35
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/base/Exchange.js +10 -2
- package/js/src/base/ws/Client.js +5 -2
- package/js/src/binance.js +335 -94
- package/js/src/bitfinex.js +21 -0
- package/js/src/bitfinex2.js +12 -1
- package/js/src/bitget.js +28 -39
- package/js/src/bithumb.js +14 -0
- package/js/src/krakenfutures.js +25 -3
- package/js/src/pro/binance.js +5 -5
- package/js/src/woo.js +64 -35
- package/package.json +1 -1
package/js/src/base/Exchange.js
CHANGED
|
@@ -1447,6 +1447,9 @@ export default class Exchange {
|
|
|
1447
1447
|
* @returns {object | undefined}
|
|
1448
1448
|
*/
|
|
1449
1449
|
const value = this.safeValueN(dictionaryOrList, keys, defaultValue);
|
|
1450
|
+
if (value === undefined) {
|
|
1451
|
+
return defaultValue;
|
|
1452
|
+
}
|
|
1450
1453
|
if (typeof value === 'object') {
|
|
1451
1454
|
return value;
|
|
1452
1455
|
}
|
|
@@ -1478,6 +1481,9 @@ export default class Exchange {
|
|
|
1478
1481
|
* @returns {Array | undefined}
|
|
1479
1482
|
*/
|
|
1480
1483
|
const value = this.safeValueN(dictionaryOrList, keys, defaultValue);
|
|
1484
|
+
if (value === undefined) {
|
|
1485
|
+
return defaultValue;
|
|
1486
|
+
}
|
|
1481
1487
|
if (Array.isArray(value)) {
|
|
1482
1488
|
return value;
|
|
1483
1489
|
}
|
|
@@ -5277,7 +5283,8 @@ export default class Exchange {
|
|
|
5277
5283
|
errors = 0;
|
|
5278
5284
|
const responseLength = response.length;
|
|
5279
5285
|
if (this.verbose) {
|
|
5280
|
-
const
|
|
5286
|
+
const iteration = (i + 1).toString();
|
|
5287
|
+
const cursorMessage = 'Cursor pagination call ' + iteration + ' method ' + method + ' response length ' + responseLength.toString() + ' cursor ' + cursorValue;
|
|
5281
5288
|
this.log(cursorMessage);
|
|
5282
5289
|
}
|
|
5283
5290
|
if (responseLength === 0) {
|
|
@@ -5322,7 +5329,8 @@ export default class Exchange {
|
|
|
5322
5329
|
errors = 0;
|
|
5323
5330
|
const responseLength = response.length;
|
|
5324
5331
|
if (this.verbose) {
|
|
5325
|
-
const
|
|
5332
|
+
const iteration = (i + 1).toString();
|
|
5333
|
+
const incrementalMessage = 'Incremental pagination call ' + iteration + ' method ' + method + ' response length ' + responseLength.toString();
|
|
5326
5334
|
this.log(incrementalMessage);
|
|
5327
5335
|
}
|
|
5328
5336
|
if (responseLength === 0) {
|
package/js/src/base/ws/Client.js
CHANGED
|
@@ -143,9 +143,12 @@ export default class Client {
|
|
|
143
143
|
this.onError(new RequestTimeout('Connection to ' + this.url + ' timed out due to a ping-pong keepalive missing on time'));
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
|
+
let message;
|
|
146
147
|
if (this.ping) {
|
|
147
|
-
this.
|
|
148
|
-
|
|
148
|
+
message = this.ping(this);
|
|
149
|
+
}
|
|
150
|
+
if (message) {
|
|
151
|
+
this.send(message).catch((error) => {
|
|
149
152
|
this.onError(error);
|
|
150
153
|
});
|
|
151
154
|
}
|