using System.Net.Http.Json;
using Managing.Common;
using Managing.Infrastructure.Evm.Models.Gmx.v2;

namespace Managing.Infrastructure.Evm.Services.Gmx;

public class OracleKeeperService()
{
    private readonly HttpClient _httpClient = new HttpClient();
    private readonly string _baseUrl = Constants.GMX.Config.OracleKeeperUrl;

    public async Task<List<GmxTicker>> GetTickers()
    {
        var response = await _httpClient.GetFromJsonAsync<List<GmxTicker>>(_baseUrl + "/prices/tickers");
        return response;
    }
}