The Jupiter Perps API should expose the USD size of a position.
The position account contains a sizeUsd field located immediately after price and before collateralUsd. This value should be decoded and exposed through the public API.
Required changes
Add a new field to JupiterPerpsPosition:
ΩUSDCAmountΩ sizeUsd
Decode the sizeUsd field from the Jupiter Perps position account.
Return the decoded value as part of JupiterPerpsPosition.
Validation
Verify the decoded value against the Jupiter web UI for one or more open positions to ensure the decoded value is correct.
Notes
The value represents the position size in USD and is not the collateral.
This field is expected to become one of the required building blocks for a future implementation of liquidation price calculations.
### Description
The Jupiter Perps API should expose the USD size of a position.
The position account contains a `sizeUsd` field located immediately after `price` and before `collateralUsd`. This value should be decoded and exposed through the public API.
### Required changes
* Add a new field to `JupiterPerpsPosition`:
* `ΩUSDCAmountΩ sizeUsd`
* Decode the `sizeUsd` field from the Jupiter Perps position account.
* Return the decoded value as part of `JupiterPerpsPosition`.
### Validation
Verify the decoded value against the Jupiter web UI for one or more open positions to ensure the decoded value is correct.
### Notes
The value represents the position size in USD and is **not** the collateral.
This field is expected to become one of the required building blocks for a future implementation of liquidation price calculations.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
The Jupiter Perps API should expose the USD size of a position.
The position account contains a
sizeUsdfield located immediately afterpriceand beforecollateralUsd. This value should be decoded and exposed through the public API.Required changes
Add a new field to
JupiterPerpsPosition:ΩUSDCAmountΩ sizeUsdDecode the
sizeUsdfield from the Jupiter Perps position account.Return the decoded value as part of
JupiterPerpsPosition.Validation
Verify the decoded value against the Jupiter web UI for one or more open positions to ensure the decoded value is correct.
Notes
The value represents the position size in USD and is not the collateral.
This field is expected to become one of the required building blocks for a future implementation of liquidation price calculations.