-
Notifications
You must be signed in to change notification settings - Fork 206
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
cli test(perp): open a reverse position larger than the existing position #522
cli test(perp): open a reverse position larger than the existing position #522
Conversation
@@ -209,7 +209,30 @@ func (s *IntegrationTestSuite) TestOpenAndClosePositionCmd() { | |||
s.Require().Equal(sdk.MustNewDecFromStr("1000000"), queryResp.Position.Margin) | |||
s.Require().Equal(sdk.MustNewDecFromStr("999900"), queryResp.Position.OpenNotional) | |||
|
|||
// Close positions | |||
// C. Open a reverse position larger than the existing position | |||
args = []string{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes start here
…r-in-size-than-the-existing-one
…n-the-existing-one' of github.com-kai:NibiruChain/nibiru into 506-cli-test-open-a-reverse-position-bigger-in-size-than-the-existing-one
…r-in-size-than-the-existing-one
"sell", | ||
pairStr, | ||
"1", // Leverage | ||
"2000000", // 2 BTC (?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is correct, we use 10^6 that represents the real unit, all the others mean decimals. This is indeed 2 BTC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This argument is actually collateral amount, so it would be 2000000 unusd or uusdc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! sounds good, let update that in my new cli test pr
…r-in-size-than-the-existing-one
"sell", | ||
pairStr, | ||
"1", // Leverage | ||
"2000000", // 2 BTC (?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This argument is actually collateral amount, so it would be 2000000 unusd or uusdc.
No description provided.