Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ported MtApi5 to .Net Core #203

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
7 changes: 4 additions & 3 deletions MTApiService/MTApiService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@
<AssemblyOriginatorKeyFile>MtApiKey.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.5\lib\net40-full\log4net.dll</HintPath>
<Private>True</Private>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net40\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down
2 changes: 1 addition & 1 deletion MTApiService/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ILMerge" version="2.13.0307" targetFramework="net40" />
<package id="log4net" version="2.0.10" targetFramework="net40" />
<package id="log4net" version="2.0.12" targetFramework="net40" />
<package id="MSBuild.ILMerge.Task" version="1.0.5" targetFramework="net40" />
</packages>
25 changes: 23 additions & 2 deletions MetaTraderApi_2017.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApiClientUI", "TestClients\TestApiClientUI\TestApiClientUI.csproj", "{663CC515-EAAE-47D4-8933-5008C2DA1160}"
EndProject
Expand Down Expand Up @@ -47,6 +47,8 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MtApiBootstrapper", "MtApiB
{78B94552-DB17-40EC-B7C6-23D32DB85DC1} = {78B94552-DB17-40EC-B7C6-23D32DB85DC1}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MtApiServiceNetCore", "MtApiServiceNetCore\MtApiServiceNetCore.csproj", "{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -232,6 +234,22 @@ Global
{8E63046B-56E5-4623-8808-558AD72A8F2B}.Release|x64.ActiveCfg = Release|x86
{8E63046B-56E5-4623-8808-558AD72A8F2B}.Release|x86.ActiveCfg = Release|x86
{8E63046B-56E5-4623-8808-558AD72A8F2B}.Release|x86.Build.0 = Release|x86
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|Win32.ActiveCfg = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|Win32.Build.0 = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|x64.ActiveCfg = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|x64.Build.0 = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|x86.ActiveCfg = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Debug|x86.Build.0 = Debug|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|Any CPU.Build.0 = Release|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|Win32.ActiveCfg = Release|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|Win32.Build.0 = Release|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|x64.ActiveCfg = Release|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|x64.Build.0 = Release|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|x86.ActiveCfg = Release|Any CPU
{7CAFAAE2-0C15-479A-B16D-C2FCE0A48E11}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -241,4 +259,7 @@ Global
{38B9C657-BC2F-44F0-8824-54B31F2A64F5} = {B91FF338-E05D-4EF1-948B-A2376DB37ECA}
{EB7C228D-9494-4985-845E-B8312450DF3D} = {B91FF338-E05D-4EF1-948B-A2376DB37ECA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {23C8878C-16A5-47DF-9A57-73CCF847780D}
EndGlobalSection
EndGlobal
18 changes: 18 additions & 0 deletions MtApi5/IMqlRates.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// ReSharper disable InconsistentNaming
using System;

namespace MtApi5
{
public interface IMqlRates
{
double close { get; set; }
double high { get; set; }
double low { get; set; }
long mt_time { get; set; }
double open { get; set; }
long real_volume { get; set; }
int spread { get; set; }
long tick_volume { get; set; }
DateTime time { get; }
}
}
27 changes: 27 additions & 0 deletions MtApi5/IMqlTradeRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// ReSharper disable InconsistentNaming
using System;

namespace MtApi5
{
public interface IMqlTradeRequest
{
ENUM_TRADE_REQUEST_ACTIONS Action { get; set; }
string Comment { get; set; }
ulong Deviation { get; set; }
DateTime Expiration { get; set; }
ulong Magic { get; set; }
int MtExpiration { get; }
ulong Order { get; set; }
ulong Position { get; set; }
ulong PositionBy { get; set; }
double Price { get; set; }
double Sl { get; set; }
double Stoplimit { get; set; }
string Symbol { get; set; }
double Tp { get; set; }
ENUM_ORDER_TYPE Type { get; set; }
ENUM_ORDER_TYPE_FILLING Type_filling { get; set; }
ENUM_ORDER_TYPE_TIME Type_time { get; set; }
double Volume { get; set; }
}
}
17 changes: 17 additions & 0 deletions MtApi5/IMqlTradeResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// ReSharper disable InconsistentNaming

namespace MtApi5
{
public interface IMqlTradeResult
{
double Ask { get; }
double Bid { get; }
string Comment { get; }
ulong Deal { get; }
ulong Order { get; }
double Price { get; }
uint Request_id { get; }
uint Retcode { get; }
double Volume { get; }
}
}
25 changes: 25 additions & 0 deletions MtApi5/IMqlTradeTransaction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;

namespace MtApi5
{
public interface IMqlTradeTransaction
{
ulong Deal { get; set; }
ENUM_DEAL_TYPE DealType { get; set; }
int MtTimeExpiration { get; }
ulong Order { get; set; }
ENUM_ORDER_STATE OrderState { get; set; }
ENUM_ORDER_TYPE OrderType { get; set; }
ulong Position { get; set; }
ulong PositionBy { get; set; }
double Price { get; set; }
double PriceSl { get; set; }
double PriceTp { get; set; }
double PriceTrigger { get; set; }
string Symbol { get; set; }
DateTime TimeExpiration { get; set; }
ENUM_ORDER_TYPE_TIME TimeType { get; set; }
ENUM_TRADE_TRANSACTION_TYPE Type { get; set; }
double Volume { get; set; }
}
}
15 changes: 15 additions & 0 deletions MtApi5/IMt5Quote.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;

namespace MtApi5
{
public interface IMt5Quote
{
double Ask { get; }
double Bid { get; }
int ExpertHandle { get; set; }
string Instrument { get; }
double Last { get; set; }
DateTime Time { get; set; }
ulong Volume { get; set; }
}
}
Loading