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

+7 -3
View File
@@ -4,6 +4,7 @@
const Exchange = require ('./base/Exchange');
const { ExchangeError, OrderNotFound, ArgumentsRequired, InvalidOrder, DDoSProtection } = require ('./base/errors');
const { ROUND } = require ('./base/functions/number');
// ---------------------------------------------------------------------------
@@ -415,7 +416,7 @@ module.exports = class btcmarkets extends Exchange {
}
parseTrade (trade, market = undefined) {
const timestamp = this.safeTimestamp (trade, 'timestamp');
const timestamp = this.safeTimestamp (trade, 'date');
let symbol = undefined;
if (market !== undefined) {
symbol = market['symbol'];
@@ -467,8 +468,8 @@ module.exports = class btcmarkets extends Exchange {
});
request['currency'] = market['quote'];
request['instrument'] = market['base'];
request['price'] = parseInt (price * multiplier);
request['volume'] = parseInt (amount * multiplier);
request['price'] = parseInt (this.decimalToPrecision (price * multiplier, ROUND, 0));
request['volume'] = parseInt (this.decimalToPrecision (amount * multiplier, ROUND, 0));
request['orderSide'] = orderSide;
request['ordertype'] = this.capitalize (type);
request['clientRequestId'] = this.nonce ().toString ();
@@ -564,6 +565,7 @@ module.exports = class btcmarkets extends Exchange {
'currency': feeCurrencyCode,
'cost': feeCost,
},
'takerOrMaker': undefined,
};
}
@@ -611,9 +613,11 @@ module.exports = class btcmarkets extends Exchange {
lastTradeTimestamp = trades[numTrades - 1]['timestamp'];
}
const id = this.safeString (order, 'id');
const clientOrderId = this.safeString (order, 'clientRequestId');
return {
'info': order,
'id': id,
'clientOrderId': clientOrderId,
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'lastTradeTimestamp': lastTradeTimestamp,