Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cancelled partial trades display incorrect values #114

Open
AleksSv opened this issue Sep 21, 2019 · 1 comment
Open

Cancelled partial trades display incorrect values #114

AleksSv opened this issue Sep 21, 2019 · 1 comment

Comments

@AleksSv
Copy link

AleksSv commented Sep 21, 2019

For cancelled trades, you automatically set
amount = total / price;

However, this is invalid as some trades can be partially complete, such as 5% or 90% before they are cancelled. If this case happens, then the amount and total are set as if it was 100% completed.

In the makes array, there can be a trades array. You can get a total filled_amount and want_amount by summing up these variables for each element in the trades array.

@AleksSv
Copy link
Author

AleksSv commented Sep 21, 2019

Actually, I just realized that even canceled trades that are 0% complete still display the amount as if they were 100% complete. A 0% complete cancelled trade should be akin to a failed trade

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant