Decode or derive the traded token mint for a Jupiter Perps position.
Return it as part of JupiterPerpsPosition.
Keep existing decoding of entryPrice and direction unchanged.
Non-goals:
No display/token names
No collateral amount
No liquidation price
No trading or transaction signing
No UI-specific mapping
Acceptance criteria:
JupiterPerpsPosition contains the traded token mint address.
getPosition(...) returns the traded token mint.
getOpenPositions(...) returns positions with traded token mint populated.
Existing entryPrice and direction behavior still works.
Project compiles.
### Description:
Extend `JupiterPerpsPosition` with the mint address of the token traded by the position.
The API should not return a display name such as `SOL`, `BTC`, or `ETH`. A UI or client can map the mint address to a display name later.
### Suggested API change:
```java
public record JupiterPerpsPosition(
ΩJupiterPerpsPositionAccountΩ positionAccount,
ΩUSDCPriceΩ entryPrice,
JupiterPerpsPositionDirection direction,
ΩSPLMintAddressΩ tradedTokenMint
) {
}
```
### Implementation:
* Decode or derive the traded token mint for a Jupiter Perps position.
* Return it as part of `JupiterPerpsPosition`.
* Keep existing decoding of `entryPrice` and `direction` unchanged.
### Non-goals:
* No display/token names
* No collateral amount
* No liquidation price
* No trading or transaction signing
* No UI-specific mapping
### Acceptance criteria:
* `JupiterPerpsPosition` contains the traded token mint address.
* `getPosition(...)` returns the traded token mint.
* `getOpenPositions(...)` returns positions with traded token mint populated.
* Existing `entryPrice` and `direction` behavior still works.
* Project compiles.
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:
Extend
JupiterPerpsPositionwith the mint address of the token traded by the position.The API should not return a display name such as
SOL,BTC, orETH. A UI or client can map the mint address to a display name later.Suggested API change:
Implementation:
JupiterPerpsPosition.entryPriceanddirectionunchanged.Non-goals:
Acceptance criteria:
JupiterPerpsPositioncontains the traded token mint address.getPosition(...)returns the traded token mint.getOpenPositions(...)returns positions with traded token mint populated.entryPriceanddirectionbehavior still works.