Modulus Financial Engineering HomeModulus Financial Engineering
NAQ Professional Data Feed API (Level I and Level II)

Retrieving Historic Data

Historic data can be retrieved by one of several data request methods:

GetSecHistoryByPeriods (Symbol, Minutes, Periods)
GetSecHistoryBySpan (Symbol, Minutes, StartTime, StartDate, EndTime, EndDate)
GetMinHistoryByPeriods (Symbol, Minutes, Periods)
GetMinHistoryBySpan (Symbol, Minutes, StartTime, StartDate, EndTime, EndDate)
GetDayHistoryByPeriods (Symbol, Days, Periods)
GetDayHistoryBySpan (Symbol, Days, StartDate, EndDate)
GetTickHistory (Symbol, TradeDate, Bate)

To get daily, weekly or monthly history for a certain number of periods from the last period (today), use the GetDayHistoryByPeriods method.

To get daily, weekly or monthly history for a specified time frame, use the GetDayHistoryBySpan method.

Note that the StartDate and EndDate are long data types, and the date format is YYYYMMDD, e.g.  GetDayHistoryBySpan("MSFT", 1, 20010102, 20010523)

The "Periods" argument is the compression for the bars to be returned. If you want daily data, use 1 for one day. If you want weekly data, use 7 for seven days, if you want monthly data, use 30, etc. The same rule applies for second and minute history.

To get all current tick history for a specific trading session, use the GetTickHistory method.

All data request methods listed above will fire a corresponding "OnProcess<time frame>History" event. For example:

NAQ1_ProcessDayHistory(BSTR Symbol, long TradeDate, double OpenPrice, double HighPrice, double LowPrice, double ClosePrice, long Volume, long OI)

NAQ1_ProcessMinuteHistory(BSTR Symbol, long TradeDate, long TradeTime, double OpenPrice, double HighPrice, double LowPrice, double ClosePrice, long Volume)

 

TickHistoryStart Fired once after GetTickHistory is requested.
ProcessTickHistory Returns tick history as requested by GetTickHistory.
TickHistoryEnd Fired once after ProcessTickHistory has completed sending tick history.
ProcessSecondHistory Returns second bar history as requested by GetSecHistoryBySpan.
ProcessMinuteHistory Returns minute bar history as requested by GetMinHistoryBySpan.
ProcessDayHistory Returns daily bar history as requested by GetDayHistoryBySpan.


 



Copyright © 2004 Modulus Financial Engineering.
Parts of this software are owned and copyright © 2004 by North American Quotations (FRI Corporation).
The NAQ ActiveX API is written by, owned by, and copyrighted by Modulus Financial Engineering, Inc. for North American Quotations.
Address all technical support questions to: support@modulusfe.com
Address all subscription billing questions to: sales@naq.com