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

Bug: Margin info and buying power #1230

Merged
merged 1 commit into from
Aug 4, 2022
Merged

Bug: Margin info and buying power #1230

merged 1 commit into from
Aug 4, 2022

Conversation

Tburm
Copy link
Contributor

@Tburm Tburm commented Aug 4, 2022

Fixing a bug with buying power and available margin. It is using the maxLeverage value which depends on the open position. Instead, we should be using marketInfo.maxLeverage which is a static value for each market.

Description

  • Replicate logic from max order size button for buying power
  • Use marketInfo max leverage value to calculate changes in available margin after a trade

@vercel
Copy link

vercel bot commented Aug 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
kwenta ✅ Ready (Inspect) Visit Preview Aug 4, 2022 at 6:54PM (UTC)

@vercel vercel bot temporarily deployed to Preview August 4, 2022 18:54 Inactive
@Tburm Tburm requested a review from platschi August 4, 2022 18:58
@platschi platschi merged commit 61d360a into dev Aug 4, 2022
@platschi platschi deleted the bug/buying-power branch August 18, 2022 20:21
@KngZhi KngZhi mentioned this pull request Oct 5, 2022
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.

2 participants