feat(trades): add live execution cockpit, closing cockpit, calculation cards and precision trade settings

This commit is contained in:
2026-08-15 19:30:25 +02:00
parent 882d24a316
commit 34fa774cbf
31 changed files with 4235 additions and 630 deletions
@@ -1,12 +1,24 @@
/// Typed DTO for requesting a trade exit/close.
class CloseTradeRequestDto {
final double userExitPrice;
final DateTime? userExitTimestamp;
final double exitFee;
final String closeReason;
const CloseTradeRequestDto({required this.userExitPrice});
const CloseTradeRequestDto({
required this.userExitPrice,
this.userExitTimestamp,
this.exitFee = 1.0,
this.closeReason = 'ManualClosure',
});
Map<String, dynamic> toJson() {
return {
'userExitPrice': userExitPrice,
if (userExitTimestamp != null) 'userExitTimestamp': userExitTimestamp!.toUtc().toIso8601String(),
'exitFee': exitFee,
'closeReason': closeReason,
};
}
}