import { apiClient } from './client'
import { BacktestRequest, BacktestResponse } from '../types'

export const backtestingApi = {
  runBacktest: async (backtest: BacktestRequest): Promise<BacktestResponse> => {
    const response = await apiClient.post('/api/backtesting/run', backtest)
    return response.data
  },

  getBacktestResults: async (backtestId: string): Promise<any> => {
    const response = await apiClient.get(`/api/backtesting/results/${backtestId}`)
    return response.data
  },
}
