Add collateralUsd to JupiterPerpsPosition #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
Extend
JupiterPerpsPositionwith the position collateral value in USD.Jupiter Perps
Positionaccounts contain acollateralUsdfield. This field represents the position collateral size after fees, denominated in USD atomic value.Suggested API change:
Notes:
ΩUSDCAmountΩbefore implementing this.collateralUsdis not the same as collateral token amount.collateralCustodytells which custody/token is used for collateral, but this issue is only about the USD collateral value.Implementation:
collateralUsdfrom the Jupiter Perps Position account.entryPrice,direction, andtradedTokenMintunchanged.Non-goals:
Acceptance criteria:
JupiterPerpsPositioncontains acollateralUsdfield.collateralUsdis decoded from the Position account.