private void btn_HuoBiStart_Click(object sender, EventArgs e) { //初始化WebSocket HuobiWSApi.Init(); HuobiWSApi.OnMessage += HuobiWSApi_OnMessage; //查询数据库配置 Vmp_ConfigCollection configColl = new Vmp_ConfigCollection(); if (!configColl.ListByPlatformCode("HuoBi")) { return; } //订阅多个交易对深度 foreach (Vmp_Config item in configColl) { string topic = StringProcess.HuoBiString(item.CurrencyCode, item.ExCurrencyCode); HuobiWSApi.Subscribe(topic, item.PairId.ToString()); } }