The Jupiter Perps API should expose the closing fee for an open position.
According to the Jupiter Perps liquidation documentation, the closing fee is one of the required input values for calculating the liquidation price. Unlike the opening fee, the closing fee represents the cost of closing the current position and therefore affects the liquidation threshold.
Goal
Identify where the closing fee is stored or how it is calculated, and expose it through JupiterPerpsPosition.
Required changes
Determine whether closeFeeUsd is:
stored directly in the Position account,
stored in another account,
or must be calculated.
If the value can be obtained reliably, expose it as:
ΩUSDCAmountΩ closeFeeUsd
Decode or calculate the value as appropriate.
Validation
Verify the decoded/calculated value against the Jupiter web UI for one or more open positions.
Notes
The closing fee is expected to represent the cost of closing the current position and is one of the required inputs for calculating the liquidation price.
This value is intended to be used by a future implementation of liquidationPrice in JupiterPerpsPosition.
### Description
The Jupiter Perps API should expose the closing fee for an open position.
According to the Jupiter Perps liquidation documentation, the closing fee is one of the required input values for calculating the liquidation price. Unlike the opening fee, the closing fee represents the cost of closing the current position and therefore affects the liquidation threshold.
### Goal
Identify where the closing fee is stored or how it is calculated, and expose it through `JupiterPerpsPosition`.
### Required changes
* Determine whether `closeFeeUsd` is:
* stored directly in the Position account,
* stored in another account,
* or must be calculated.
* If the value can be obtained reliably, expose it as:
* `ΩUSDCAmountΩ closeFeeUsd`
* Decode or calculate the value as appropriate.
### Validation
Verify the decoded/calculated value against the Jupiter web UI for one or more open positions.
### Notes
The closing fee is expected to represent the cost of closing the current position and is one of the required inputs for calculating the liquidation price.
This value is intended to be used by a future implementation of `liquidationPrice` in `JupiterPerpsPosition`.
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 closing fee for an open position.
According to the Jupiter Perps liquidation documentation, the closing fee is one of the required input values for calculating the liquidation price. Unlike the opening fee, the closing fee represents the cost of closing the current position and therefore affects the liquidation threshold.
Goal
Identify where the closing fee is stored or how it is calculated, and expose it through
JupiterPerpsPosition.Required changes
Determine whether
closeFeeUsdis:If the value can be obtained reliably, expose it as:
ΩUSDCAmountΩ closeFeeUsdDecode or calculate the value as appropriate.
Validation
Verify the decoded/calculated value against the Jupiter web UI for one or more open positions.
Notes
The closing fee is expected to represent the cost of closing the current position and is one of the required inputs for calculating the liquidation price.
This value is intended to be used by a future implementation of
liquidationPriceinJupiterPerpsPosition.