diff --git a/src/KArtSell.Modules.ModelOperations/ShadowRun/Services/KrxDataService.cs b/src/KArtSell.Modules.ModelOperations/ShadowRun/Services/KrxDataService.cs index 90db43bf..1bf60b4f 100644 --- a/src/KArtSell.Modules.ModelOperations/ShadowRun/Services/KrxDataService.cs +++ b/src/KArtSell.Modules.ModelOperations/ShadowRun/Services/KrxDataService.cs @@ -19,7 +19,7 @@ public sealed class KrxDataService : IKrxDataService private const int MaxRetries = 3; private const int InitialBackoffMs = 100; private const int MaxBackoffMs = 30000; - private const string KrxApiBaseUrl = "http://data-dbg.krx.co.kr"; // Stock price API (from pykrx-openapi) + private const string KrxApiBaseUrl = "https://data-dbg.krx.co.kr"; // Stock price API (HTTPS, from pykrx-openapi) private const string KrxApiEndpoint = "/svc/apis/sto/stk_bydd_trd"; // KOSPI daily trading endpoint private static readonly Action LogFetchingOhlcv = @@ -187,6 +187,8 @@ public sealed class KrxDataService : IKrxDataService { var request = new HttpRequestMessage(HttpMethod.Get, endpoint); request.Headers.Add("AUTH_KEY", apiKey); + request.Headers.Add("Accept", "application/json"); + request.Content = new StringContent("", System.Text.Encoding.UTF8, "application/json; charset=utf-8"); var response = await _httpClient.SendAsync(request, cancellationToken);