ShareInvest.OpenDart.API
1.0.0.1
There is a newer version of this package available.
See the version list below for details.
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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 Team does not provide support for this client. Please contact its maintainers for support.
The package is .
· How to initailize in WPF
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
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
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];
}
}
}
☞ is also available in AnyCPU.
Product | Versions 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.
-
net7.0
- Newtonsoft.Json (>= 13.0.1)
- RestSharp (>= 110.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.