Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Fix market order actual price #847

Merged
merged 2 commits into from
Dec 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ module.exports = function container (get, set, clear) {
msg('order status: ' + order.status)
if (api_order.status === 'done') {
order.time = new Date(api_order.done_at).getTime()
order.price = api_order.price || order.price // Use actual price if possible. In market order the actual price (api_order.price) could be very different from trade price
executeOrder(order)
return syncBalance(function () {
cb(null, order)
Expand Down