oxford
-Interested User-
Posts: 12
Joined: Oct 4, 2013
|
Posted: Feb 4, 2014 08:11 AM
Msg. 1 of 8
Hi,
What is the best way to get OHLC data for current trading day?
Thanks!
|
oxford
-Interested User-
Posts: 12
Joined: Oct 4, 2013
|
Posted: Feb 4, 2014 08:14 AM
Msg. 2 of 8
Some background may be helpful:
Looking at IQWatchQuote I see ES opened at 1738.25, but the first tick I receive for today tradet has a last price of 1740.50.
Probably I'm misunderstanding something. Edited by oxford on Feb 4, 2014 at 08:36 AM
|
DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Feb 4, 2014 08:46 AM
Msg. 3 of 8
Where are you seeing that first trade? I see a trade at 18:00:00.005 at 1738.25. Are you looking at the first trade since midnight perhaps?
|
DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Feb 4, 2014 08:55 AM
Msg. 4 of 8
If you issue a watch on any symbol you can get the current OHLC from there. Details are available in the Level 1 documentation and sample apps.
Tim
|
oxford
-Interested User-
Posts: 12
Joined: Oct 4, 2013
|
Posted: Feb 4, 2014 08:57 AM
Msg. 5 of 8
Hi Tim,
Yes, this is the case. Can I get openning times from the feed?
Thanks.
|
DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Feb 4, 2014 09:34 AM
Msg. 6 of 8
I am sorry, but no, market schedules are not available in our feed currently, though it is something we would like to add in the future. Right now, the data specifications sheets available on the exchange websites would be the best source for this data. We'll be sure to let everyone know if we can get this added in a future release.
Tim
|
oxford
-Interested User-
Posts: 12
Joined: Oct 4, 2013
|
Posted: Feb 4, 2014 10:20 AM
Msg. 7 of 8
Hi Tim,
Can you point me to the right example? I'm trying to get the OHLC for the day only (so smaller interval). Using ReqHistoryDailyTimeframe I'm not able to receive the current day (last day = previous day).
Many thanks again.
|
DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Feb 4, 2014 10:30 AM
Msg. 8 of 8
http://www.iqfeed.net/dev/api/docs/Level1viaTCPIP.cfmYou will want to create a connection to the appropriate socket, set your protocol to 5.1, and then issue a watch. The watch will return a comma delimited field set that you can iterate through to get the data you need. Current fields being viewed can be requested to help with the order, or you can choose your own by setting up a dynamic fieldset, whichever you prefer. Once you have the data you want, you can unwatch your symbol. Or you can continue to watch and process the update messages. This functionality is also in the level one sample applications which are part of the API download if you want to see an actual implementation of how this can be done. Tim
|