Big refactoring
Deploy / lint (push) Failing after 21s
Deploy / test (push) Has been skipped
Deploy / deploy (push) Has been skipped

This commit is contained in:
Dennis Thiessen
2026-03-03 15:20:18 +01:00
parent 181cfe6588
commit 0a011d4ce9
55 changed files with 6898 additions and 544 deletions
+16 -2
View File
@@ -1,6 +1,20 @@
import apiClient from './client';
import type { TradeSetup } from '../lib/types';
export function list() {
return apiClient.get<TradeSetup[]>('trades').then((r) => r.data);
export interface TradeListParams {
direction?: 'long' | 'short';
min_confidence?: number;
recommended_action?: 'LONG_HIGH' | 'LONG_MODERATE' | 'SHORT_HIGH' | 'SHORT_MODERATE' | 'NEUTRAL';
}
export function list(params?: TradeListParams) {
return apiClient.get<TradeSetup[]>('trades', { params }).then((r) => r.data);
}
export function bySymbol(symbol: string) {
return apiClient.get<TradeSetup[]>(`trades/${symbol.toUpperCase()}`).then((r) => r.data);
}
export function history(symbol: string) {
return apiClient.get<TradeSetup[]>(`trades/${symbol.toUpperCase()}/history`).then((r) => r.data);
}