Adapter initialization CQG

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

var messageAdapter = new CqgMessageAdapter(Connector.TransactionIdGenerator)
{
	UserName = "<User name>",
	Password = "<Password>".ToSecureString(),
	PrivateLabel = "WebAPITest",
	ClientId = "WebAPITest",
	Endpoint = "wss://demoapi.cqg.com:443",
	Portfolio = "<Portfolio>",
};

Connector.Adapter.InnerAdapters.Add(messageAdapter);

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

Connection settings window