IPC removed, replaced by WS

This commit is contained in:
Luis Fernando Molina committed 2020-04-06 08:33:07 +02:00
1 parent ba4217fb24
commit 656c193511
503 files changed
+28128 -34498

No files matched your search

+6 -5
View File
@@ -3,7 +3,7 @@
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange');
const { ExchangeError, DDoSProtection, BadSymbol } = require ('./base/errors');
const { ExchangeNotAvailable, ExchangeError, DDoSProtection, BadSymbol } = require ('./base/errors');
// ---------------------------------------------------------------------------
@@ -107,6 +107,7 @@ module.exports = class whitebit extends Exchange {
},
'exceptions': {
'exact': {
'503': ExchangeNotAvailable, // {"response":null,"status":503,"errors":{"message":[""]},"notification":null,"warning":null,"_token":null}
},
'broad': {
'Market is not available': BadSymbol, // {"success":false,"message":{"market":["Market is not available"]},"result":[]}
@@ -584,7 +585,7 @@ module.exports = class whitebit extends Exchange {
}
async fetchStatus (params = {}) {
const response = await this.webGetV1Healthcheck ();
const response = await this.webGetV1Healthcheck (params);
const status = this.safeInteger (response, 'status');
let formattedStatus = 'ok';
if (status === 503) {
@@ -617,9 +618,9 @@ module.exports = class whitebit extends Exchange {
const success = this.safeValue (response, 'success');
if (!success) {
const feedback = this.id + ' ' + body;
const message = this.safeValue (response, 'message');
if (typeof message === 'string') {
this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback);
const status = this.safeString (response, 'status');
if (typeof status === 'string') {
this.throwExactlyMatchedException (this.exceptions['exact'], status, feedback);
}
this.throwBroadlyMatchedException (this.exceptions['broad'], body, feedback);
throw new ExchangeError (feedback);