refactor: save current workspace state including FinlyticAnalyzer fixes, FinlyticApp trade route alignment, and DTO audit documentation
This commit is contained in:
@@ -14,7 +14,7 @@ class TradeRepository {
|
||||
if (isin != null && isin.isNotEmpty) queryParams['isin'] = isin;
|
||||
if (status != null && status.isNotEmpty) queryParams['status'] = status;
|
||||
|
||||
final response = await apiClient.get('/api/v1/trades', queryParameters: queryParams);
|
||||
final response = await apiClient.get('/api/v1/user/trades', queryParameters: queryParams);
|
||||
|
||||
if (response.statusCode == 200 && response.data != null) {
|
||||
final List<dynamic> data = response.data;
|
||||
@@ -34,8 +34,9 @@ class TradeRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> closeTrade(String id) async {
|
||||
final response = await apiClient.post('/api/v1/user/trades/$id/close');
|
||||
Future<void> closeTrade(String id, {double? exitPrice}) async {
|
||||
final body = exitPrice != null ? {'userExitPrice': exitPrice} : null;
|
||||
final response = await apiClient.post('/api/v1/user/trades/$id/close', data: body);
|
||||
if (response.statusCode != 200) {
|
||||
throw Exception('Trade konnte nicht geschlossen werden');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user