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

Create a Graphql API to combine fees and margins estimation APIs #1901

Closed
edd opened this issue Jul 8, 2020 · 1 comment · Fixed by #2321
Closed

Create a Graphql API to combine fees and margins estimation APIs #1901

edd opened this issue Jul 8, 2020 · 1 comment · Fixed by #2321
Labels
fees Al tasks related to the Fees engine risk-engine

Comments

@edd
Copy link
Contributor

edd commented Jul 8, 2020

The API implemented in #1898 provides clients with an overview of the fees, but not the margin requirements. After vegaprotocol/specs#311 is written, we'll have a way to get an estimate for the margin for an order. The fees API should be able to include this to provide a complete cost estimate to the client, given an order.

Note: this is written from the perspective of a REST or GraphQL client. Margin and Fees in the core are quite separate, and it is fine if the GRPC endpoints reflect this. However for REST & GraphQL we want a single endpoint that, given an order, can return a breakdown of the estimated cost.

Given we already have the fees breakdown on the market object, we can calculate the fees part ourself. So the bulk of this task is actually working out how to get the margin estimate out to the client.

Needs: #1898

@edd edd added the fees Al tasks related to the Fees engine label Jul 8, 2020
@jeremyletang jeremyletang changed the title Extend Fees API to include margin cost Create a Graphql API to combine fees and margins estimation APIs Sep 25, 2020
@jeremyletang
Copy link
Member

This depends on #2299 to be done first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fees Al tasks related to the Fees engine risk-engine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants