Skip to content
This repository has been 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

Conversation

MT00x
Copy link
Contributor

@MT00x MT00x commented Dec 12, 2017

In market order the actual price (api_order.price) should be very different from trade price
Use actual price if possible.
This should fix issue #800

In market order the actual price (api_order.price) should be very different from trade price
lib/engine.js Outdated
@@ -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 possibile. In market order the actual price (api_order.price) should be very different from trade price
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In market order the actual price (api_order.price) should be very different from trade price should be or could be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be*, and very often is :)

Fix comment
Copy link
Owner

@DeviaVir DeviaVir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 nice! I missed the typo there myself :)

@DeviaVir DeviaVir merged commit bba3b75 into DeviaVir:master Dec 12, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants