IG Markets adapter initialization

The following code demonstrates how to initialize IgMessageAdapter and pass it to Connector.

var messageAdapter = new IgMessageAdapter(Connector.TransactionIdGenerator)
{
	ApiKey = "<API key>",
	UserName = "<User name>",
	Password = "<Password>".ToSecureString(),
	AccountId = "<Account ID>",
	Environment = IgEnvironments.Demo,
	EncryptPassword = true,
};

Connector.Adapter.InnerAdapters.Add(messageAdapter);

Replace the example values with credentials and endpoints issued for your account.

Connection settings window