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

Derive TWAP order filled % #2640

Closed
shoom3301 opened this issue Jun 12, 2023 · 1 comment · Fixed by #2759, #2795 or #2764
Closed

Derive TWAP order filled % #2640

shoom3301 opened this issue Jun 12, 2023 · 1 comment · Fixed by #2759, #2795 or #2764
Labels

Comments

@shoom3301
Copy link
Collaborator

shoom3301 commented Jun 12, 2023

We must display the filled % of TWAP order in the orders table, receipt modal, etc.

How to calculate the percent:

  1. We know startTime of an order
  2. Calling TWAP.getTradeableOrder and manipulating startTime we can generate all parts of TWAP order
  3. Having all parts, we can generate their ids using computeOrderId
  4. Having parts orders ids, we can request all necessary data from order-book and calculate values

TODO

@shoom3301
Copy link
Collaborator Author

This task can be implemented on the frontend side only theoretically.
If a TWAP order has >5 parts, it will create a significant load on order-book API and frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment