June 9th, 2011, 1:11 am
Ok, through trial and error, I figured out how to use the classes defined in the code I referenced earlier.I can use the "subscribe" method fine:In [126]: test.request('Subscribe',{'Security':['IBM Equity','T Equity'],'Fields':['ticker','px last']},testCB)In [127]: test.flush()(24, ((u'IBM', 164.34), (u'T', 30.34))) {}But I am having trouble with "GetHistoricalData." For example, these commands work fine for getting all historical data:In [128]: test.request('GetHistoricalData',{'Security':'kkr Equity','Fields':['px last']},testCB)In [129]: test.flush()(25, (((<PyTime:7/14/2010 12:00:00 AM>, 10.5),), ((<PyTime:7/15/2010 12:00:00 AM>, 10.199999999999999),), ((<PyTime:7/16/2010 12:00:00 AM>, 9.6899999999999995), ...... (rest of output snipped)But this code, doesn't work. I must not be formatting the dates correctly, but I can't figure out what's the problem. I've tried "StartDate" instead of "FromDate" as well as using PyTime for the date as well as "YYYYMMDD" format as well as "MM/DD/YYYY" I get the same error below for all.