using System.Text.Json;
using QuantEngine.Core.Interfaces;
using QuantEngine.Application.Interfaces;

namespace QuantEngine.Application.Services;

public class DataCollectionService
{
    private readonly IKisApiClient _kisApiClient;
    private readonly ICollectionRepository _repository;
    private readonly ICollectionOrchestrator _orchestrator;

    public DataCollectionService(
        IKisApiClient kisApiClient,
        ICollectionRepository repository,
        ICollectionOrchestrator orchestrator)
    {
        _kisApiClient = kisApiClient;
        _repository = repository;
        _orchestrator = orchestrator;
    }

    public async Task<CollectionRunResult> RunCollectionAsync(
        string runId,
        string account,
        List<string> tickers)
    {
        return await _orchestrator.RunCollectionAsync(runId, account, tickers);
    }
}
