Show margin and premium in control positions; align exchange price digits.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -185,6 +185,8 @@ async def fleet_status(_tok: Annotated[str, Depends(require_fleet_token)]) -> di
|
||||
"avg_px": pos.get("perp_entry_px"),
|
||||
"mark_px": pos.get("perp_mark_px"),
|
||||
"upl": pos.get("perp_upl"),
|
||||
"margin": pos.get("perp_margin"),
|
||||
"premium": None,
|
||||
}
|
||||
)
|
||||
if pos.get("option_side") or pos.get("option_inst_id"):
|
||||
@@ -197,6 +199,8 @@ async def fleet_status(_tok: Annotated[str, Depends(require_fleet_token)]) -> di
|
||||
"avg_px": pos.get("option_entry_px"),
|
||||
"mark_px": pos.get("option_mark_px"),
|
||||
"upl": pos.get("option_upl"),
|
||||
"margin": None,
|
||||
"premium": pos.get("initial_premium"),
|
||||
}
|
||||
)
|
||||
|
||||
@@ -262,6 +266,7 @@ async def fleet_status(_tok: Annotated[str, Depends(require_fleet_token)]) -> di
|
||||
"group_id": pos.get("group_id"),
|
||||
"open_at_ms": pos.get("open_at_ms"),
|
||||
"initial_premium": pos.get("initial_premium"),
|
||||
"perp_margin": pos.get("perp_margin"),
|
||||
"exit_target_usdt": pos.get("exit_target_usdt"),
|
||||
"net_pnl": pos.get("net_pnl"),
|
||||
"perp_upl": pos.get("perp_upl"),
|
||||
|
||||
Reference in New Issue
Block a user