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

Using the PerpAccount class #41

Open
mcshel opened this issue Dec 5, 2021 · 1 comment
Open

Using the PerpAccount class #41

mcshel opened this issue Dec 5, 2021 · 1 comment

Comments

@mcshel
Copy link

mcshel commented Dec 5, 2021

Hi,

I am trying to use getAverageOpenPrice() function of the PerpAccount class, but I am missing some documentation / examples. What exactly is the events argument? Is there perhaps some other way of getting the "Avg Entry Price" that is displayed on the Web UI of the exchange?

Thanks for your help in advance!

@mschneider
Copy link
Contributor

Events should contain trade history filtered for the current market. See usage here: https://github.com/blockworks-foundation/mango-ui-v3/blob/2d824c22138e30be6d9600ec52392d58bb5cc774/hooks/usePerpPositions.tsx#L43

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

No branches or pull requests

2 participants