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

[Bitstamp] Fix order completion detection & balance reading during open order. #903

Merged
merged 2 commits into from
Dec 18, 2017
Merged

[Bitstamp] Fix order completion detection & balance reading during open order. #903

merged 2 commits into from
Dec 18, 2017

Conversation

tiagosiebler
Copy link
Contributor

@tiagosiebler tiagosiebler commented Dec 17, 2017

The key fix is for issue #901. Zenbot places an order on bitstamp and doesn't realise it's completed when the order status comes back as "Finished". I've added some logic to change it to "done" when that happens.

When an order completed, the message from zenbot couldn't read the date returned from the API:
sell order completed at Invalid date:

Added a bit of logic to map datetime to date, so the engine.js logic can read it properly. Lastly, while an order is open/placed with bitstamp, the current logic read the current balance as 0 and the balance on hold was hardcoded as 0. I've mapped that correctly to x_balance and x_reserved from the bitstamp API response.

qbkjovfnek and others added 2 commits December 17, 2017 16:15
• Fix “sell order completed at Invalid date:” message on bitstamp order completion.
• Fix #901 preventing recognition of order completion on bitstamp.
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.

👍 let's see it in the wild

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants