Hi,
I'm new with iqfeed.
I want receive historical for MSFT in order to test the API.
When I get realtime data it's OK but with historical data not.
The error message is "unable to connect to Day history socket"
Thanks
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using DTNHISTORYLOOKUPLib;
using DTNIQFeedCOMLib;
using DTNNEWSLOOKUPLib;
using DTNOPTIONCHAINLOOKUPLib;
using DTNSYMBOLLOOKUPLib;
using IQ_APILib;
namespace MetaFinance
{
class Program
{
private object OnAbortedLoad;
static void Main(string[] args)
{
Program p = new Program();
Console.ReadLine();
}
Program()
{
Console.WriteLine("start");
HistoryLookup m_historyLookup = new HistoryLookup();
m_historyLookup.DayCompleted += new _IHistoryLookupEvents_DayCompletedEventHandler(m_historyLookup_DayCompleted);
m_historyLookup.AbortedLoad += new _IHistoryLookupEvents_AbortedLoadEventHandler(m_historyLookup_AbortedLoad);
m_historyLookup.RequestDayHistory("MSFT", 2);
//LevelOne oLevelOne = new LevelOne();
//oLevelOne.Fire_OnUpdateMsg += new _ILevelOneEvents_Fire_OnUpdateMsgEventHandler(oLevelOne_Fire_OnUpdateMsg);
//oLevelOne.ReqWatch("MSFT");
//oLevelOne.ReqWatch("GOOG");
//oLevelOne.ReqWatch("AAPL");
}
void m_historyLookup_AbortedLoad(string bsReason)
{
Console.WriteLine(bsReason);
}
private void m_historyLookup_DayCompleted(int noDays_, object objTime_, object objOpen_, object objClose_, object objHigh_, object objLow_, object objVolume_)
{
Console.WriteLine("Historical");
}
void oLevelOne_Fire_OnUpdateMsg(ref string pbstrUpdateMessages)
{
Console.WriteLine("RealTime");
}
}
}