我在交易技术.NET SDK中使用什么类/方法来指示我想在服务器端模式下运行?



应用程序会自动检测它所处的环境还是需要告诉它?

客户端和服务器端模式的 API 是相同的。 若要将应用程序初始化为服务器端模式,请按如下方式初始化 TTAPIOptions 实例:

// Add your app secret Key here. It looks like: 00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000
string appSecretKey = “Your App Key”;
//Set the environment the app needs to run in here
tt_net_sdk.ServiceEnvironment environment = tt_net_sdk.ServiceEnvironment.UatCert;
tt_net_sdk.TTAPIOptions apiConfig = new tt_net_sdk.TTAPIOptions(
tt_net_sdk.TTAPIOptions.SDKMode.Server,
environment,
appSecretKey,
5000);

相关内容

最新更新