Skip to content

Commit

Permalink
bitfinex2 py edits
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor authored Feb 28, 2019
1 parent 457100e commit 90945e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/bitfinex2.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,16 +410,19 @@ module.exports = class bitfinex2 extends bitfinex {
const tradeLength = trade.length;
const isPrivate = (tradeLength > 5);
const id = trade[0].toString ();
let amount = trade[isPrivate ? 4 : 2];
const amountIndex = isPrivate ? 4 : 2;
let amount = trade[amountIndex];
let cost = undefined;
const price = trade[isPrivate ? 5 : 3];
const priceIndex = isPrivate ? 5 : 3;
const price = trade[priceIndex];
let side = undefined;
let orderId = undefined;
let takerOrMaker = undefined;
let type = undefined;
let fee = undefined;
let symbol = undefined;
const timestamp = trade[isPrivate ? 2 : 1];
const timestampIndex= isPrivate ? 2 : 1;
const timestamp = trade[timestampIndex];
if (isPrivate) {
const marketId = trade[1];
if (marketId !== undefined) {
Expand Down

0 comments on commit 90945e4

Please sign in to comment.