ShareInvest.OpenAPI.Core 1.0.4.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ShareInvest.OpenAPI.Core --version 1.0.4.1
NuGet\Install-Package ShareInvest.OpenAPI.Core -Version 1.0.4.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShareInvest.OpenAPI.Core" Version="1.0.4.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ShareInvest.OpenAPI.Core --version 1.0.4.1
#r "nuget: ShareInvest.OpenAPI.Core, 1.0.4.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ShareInvest.OpenAPI.Core as a Cake Addin
#addin nuget:?package=ShareInvest.OpenAPI.Core&version=1.0.4.1

// Install ShareInvest.OpenAPI.Core as a Cake Tool
#tool nuget:?package=ShareInvest.OpenAPI.Core&version=1.0.4.1

The NuGet package is NuGet.

· How to initailize in WPF Windows Platform Language IDE

public partial class Test : Window
{
    public Test()
    {
        nint handle = new WindowInteropHelper(Application.Current.MainWindow).EnsureHandle();

        InitializeComponent();

        axAPI = new ShareInvest.AxKHCoreAPI(handle);
    }
    readonly ShareInvest.AxKHCoreAPI axAPI;
}

· How to use CommRqData in Platform

public partial class Test : Window
{
    public Test()
    {
        ...
        
        axAPI.OnReceiveTrData += (object sender, _DKHOpenAPIEvents_OnReceiveTrDataEvent e) =>
        {
            var tr = axAPI.GetTrData(e.sTrCode);

            var data = new Dictionary<string, string>();

            for (int i = 0; i < tr.SingleData?.Length; i++)
            {
                data[tr.SingleData[i]] =
                
                    axAPI.GetCommData(e.sTrCode, e.sRQName, 0, tr.SingleData[i]).Trim();
            }
            for (int cnt = 0; cnt < axAPI.GetRepeatCnt(e.sTrCode, e.sRecordName); cnt++)
            {
                for (int i = 0; i < tr.MultiData?.Length; i++)
                {
                    data[tr.MultiData[i]] =
                    
                        axAPI.GetCommData(e.sTrCode, e.sRQName, cnt, tr.MultiData[i]).Trim();
                }
            }
        };
    }
    void CommRqData()
    {
        /// <param name="sTrCode">주식기본정보요청</param>
        var tr = axAPI.GetTrData("opt10001");

        for (int i = 0; i < tr.Input?.Length; i++)
        {
            /// <param name="sValue">삼성전자</param>
            axAPI.SetInputValue(tr.Input[i], "005930");
        }
        /// <param name="sScreenNo">화면번호</param>
        int errCode = axAPI.CommRqData(tr.Name, tr.Code, 0, "8080");

        string errMsg = Market.Error[errCode];
    }
    readonly ShareInvest.AxKHCoreAPI axAPI;
}

· How to use CommKwRqData in IDE

public partial class Test : Window
{
    public Test()
    {
        ...
        
        axAPI.OnReceiveTrData += (object sender, _DKHOpenAPIEvents_OnReceiveTrDataEvent e) =>
        {
            ... 
            
            /*
                코스피, 코스닥 전종목에 대한 정보와 실시간 수신등록
                
                요청시 등록한 화면번호를 재사용하거나 200개이상 사용시 실시간 수신해제
            */
            var json = JsonConvert.SerializeObject(data, Formatting.Indented);
        }
    }
    void CommKwRqData()
    {
        /// <param name="sTrCode">관심종목정보요청</param>
        var tr = axAPI.GetTrData("OPTKWFID");
        
        ...
        
        var codeList = new List<string>(axAPI.GetCodeListByMarket(MarketCode.코스피));

        codeList.AddRange(axAPI.GetCodeListByMarket(MarketCode.코스닥));

        foreach (var i in OPTKWFID.GetCodeInventory(codeList))
        {
            var s = new OPTKWFID
                    {
                        RQName = tr.Name
                    };
            int errCode =
            
                axAPI.CommKwRqData(i.Item1, i.Item2, s.PrevNext, s.RQName, s.ScreenNo);

            string errMsg = Guide.Error[errCode];
        }
    }
}

OPENAPI CORE is also available in AnyCPU.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ShareInvest.OpenAPI.Core:

Package Downloads
ShareInvest.OpenAPI.Control

library for controlling information received from Kiwoom OpenAPI

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.5.1 159 6/23/2023
1.0.5.1 125 6/22/2023
1.0.4.1 129 6/11/2023
1.0.3.1 135 6/11/2023
1.0.2.1 129 6/10/2023
1.0.1.1 131 6/10/2023
1.0.0.1 122 6/10/2023
1.0.0 125 6/10/2023