Skip to content

Commit

Permalink
price undefined on market orders
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiei committed Feb 4, 2022
1 parent 847cfa1 commit 166bea2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/bybit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,10 @@ module.exports = class bybit extends Exchange {
const timestamp = this.parse8601 (this.safeString (order, 'created_at'));
const id = this.safeString2 (order, 'order_id', 'stop_order_id');
const type = this.safeStringLower (order, 'order_type');
const price = this.safeString (order, 'price');
let price = undefined;
if (type !== 'market') {
price = this.safeString (order, 'price');
}
const average = this.safeString (order, 'average_price');
const amount = this.safeString (order, 'qty');
const cost = this.safeString (order, 'cum_exec_value');
Expand Down

0 comments on commit 166bea2

Please sign in to comment.