Skip to content

fix: hide repair trades from position chart markers - #1311

Merged
miohtama merged 1 commit into
masterfrom
fix/hyper-ai-position-chart-trade-value
Jul 13, 2026
Merged

fix: hide repair trades from position chart markers#1311
miohtama merged 1 commit into
masterfrom
fix/hyper-ai-position-chart-trade-value

Conversation

@miohtama

Copy link
Copy Markdown
Contributor

Why

Position charts could show repair counter-trades as normal increase/decrease markers. In Hyper AI this surfaced as a tooltip for trade #849 showing an Increase position marker with $0.00 trade value, even though the live payload identifies the trade as trade_type: repair for repairing another trade.

Lessons learnt

Filtering only trades with repaired_at removes original repaired trades, but it does not remove repair counter-trades. Chart marker generation needs to exclude trade_type === repair as well. Vault-style trades may also need reserve fields for a meaningful USD display value.

Summary

  • Exclude repair trades from position chart marker generation.
  • Use reserve notional as the marker USD value fallback for vault-style trades.
  • Add regression coverage for both repair markers and vault reserve-value display.

@miohtama
miohtama merged commit ea26132 into master Jul 13, 2026
5 checks passed
@miohtama
miohtama deleted the fix/hyper-ai-position-chart-trade-value branch July 13, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant