Skip to content

Commit

Permalink
[#71] Fix for price at "orders/open" operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomanuel committed May 7, 2021
1 parent b07a313 commit 09289c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/do-orders-open.gs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ function BinDoOrdersOpen() {
}

function parse(data, {headers: show_headers}) {
const bu = BinUtils();
const header = ["Date", "Pair", "Market", "Type", "Side", "Price", "Amount", "Executed", "Total"];
const parsed = data.reduce(function(rows, order) {
const symbol = order.symbol;
const price = BinUtils().parsePrice(order.price);
const price = parseFloat(order.price) ? bu.parsePrice(order.price) : bu.parsePrice(order.stopPrice);
const amount = parseFloat(order.origQty);
const row = [
new Date(parseInt(order.time)),
Expand Down

0 comments on commit 09289c2

Please sign in to comment.