Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

client/front-end: Export orders in csv file #1109

Merged
merged 4 commits into from
Jul 9, 2021

Conversation

martonp
Copy link
Contributor

@martonp martonp commented Jun 14, 2021

This PR adds a button on the orders page that allows the user to download their orders in CSV format.

Closes #382

Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

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

Working great for me.

I noticed that the time is local when viewing orders on the browser, but it UTC in the csv. I would prefer csv be the same time zone as the orders screen. But it's not a huge deal, and others may feel differently.

client/webserver/http.go Outdated Show resolved Hide resolved
client/webserver/http.go Outdated Show resolved Hide resolved
@martonp
Copy link
Contributor Author

martonp commented Jun 14, 2021

Local time sounds good to me.

@chappjc chappjc self-requested a review July 5, 2021 16:09
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

Looking pretty good. Two quick comments before I give it a test.

client/webserver/http.go Outdated Show resolved Hide resolved
dex/encode/encode.go Outdated Show resolved Hide resolved
Comment on lines 293 to 301
ordReader.OfferString(), // Offer
ordReader.Type.String(), // Type
ordReader.SideString(), // Side
ord.TimeInForce.String(), // Time in Force
ordReader.StatusString(), // Status
ordReader.SimpleRateString(), // Rate
ordReader.FilledPercent(), // Filled
ordReader.SettledPercent(), // Settled
ordReader.OfferString(), // Quantity
Copy link
Member

Choose a reason for hiding this comment

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

"Offer" and "Quantity" are both set to ordReader.OfferString(). Was "Quantity" supposed to be effectively precision8(ord.Qty)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just copied this from the previous PR, but I've made some changes to the columns now. Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, I don't know what was going on with the previous columns. I like this average rate you added, which makes sense when there are multiple matches that aren't necessarily same rate. Really nice.

@chappjc
Copy link
Member

chappjc commented Jul 9, 2021

We'll probably iterate on the csv format going forward, but this is working great and I have no complaints.

@chappjc chappjc merged commit 5134852 into decred:master Jul 9, 2021
@martonp martonp deleted the exportOrders branch December 20, 2022 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core: read out trade history in a portable format
3 participants