const API_BASE = "/api";

export async function startStrategy(data) {
  const res = await fetch(`${API_BASE}/strategy/start`, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    credentials: "include",
    body: JSON.stringify(data),
  });
  return res.json();
}

export async function stopStrategy() {
  const res = await fetch(`${API_BASE}/strategy/stop`, {
    method: "POST",
    credentials: "include",
  });
  return res.json();
}

export async function getStrategyStatus() {
  const res = await fetch(`${API_BASE}/strategy/status`, {
    credentials: "include",
  });
  return res.json();
}
