Click or drag to resize

Adapter initialization Oanda

The code below demonstrates how to initialize the OandaMessageAdapter and send it to Connector.

C#
Connector Connector = new Connector();                
...                
var messageAdapter = new OandaMessageAdapter(Connector.TransactionIdGenerator)
{
    Token = "<Your Token>".To<SecureString>(),
    Server = OandaServers.Practice, // Demo
    //Server = OandaServers.Real,   // Real
};

Connector.Adapter.InnerAdapters.Add(messageAdapter);
...
See Also