ShareInvest.OpenDart.API 1.0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ShareInvest.OpenDart.API --version 1.0.0.1
NuGet\Install-Package ShareInvest.OpenDart.API -Version 1.0.0.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.OpenDart.API" Version="1.0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ShareInvest.OpenDart.API --version 1.0.0.1
#r "nuget: ShareInvest.OpenDart.API, 1.0.0.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.OpenDart.API as a Cake Addin
#addin nuget:?package=ShareInvest.OpenDart.API&version=1.0.0.1

// Install ShareInvest.OpenDart.API as a Cake Tool
#tool nuget:?package=ShareInvest.OpenDart.API&version=1.0.0.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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.1.1 150 6/23/2023
1.0.1.1 171 6/19/2023
1.0.0.1 133 6/19/2023
1.0.0 134 6/19/2023