IG-Group/ig-webapi-dotnet-sample

Publish the IG Client Library into Nuget please

Opened this issue · 1 comments

Publish the IG Client Library into Nuget please

yes please!

Ideal experience here ...

  • Create new dotnet6 console app
  • Add "IG" package to console app from nuget
  • Consume with something like ...
var config = new Config();

new ConfigurationBuilder()
  .SetBasePath(Directory.GetCurrentDirectory())
  .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
  .Build()
  .Bind(config);


string user = config.IG.UserName;
string password = config.IG.Password;
string apiToken = config.IG.ApiToken;

using var client = new IGClient(user, password, apiToken);
Action<TickData> listenFunction = (TickData tickData) => Console.Log(JsonConvert.SerializeObject(tickData));
client.ListenToMarket(listenFunction);

Look how simple that is ;)