Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"There is no doubt that IQFeed is the best data provider. I am very satisfied with your services. And IQFeed is the only one that I would recommend to my friends. Now, most of them are using your product in China." - Comment from Zhezhe
"I just wanted to let u know that your data feed/service is by far the best!!! Your unfiltered tick data is excellent for reading order flow and none of your competitors delivers this quality of data!" - Comment from Peter via Email
"I am very pleased with the DTNIQ system for quotes and news." - Comment from Larry
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
"IQ feed is brilliant. The support is mind-bending. What service!" - Comment from Public Forum Post
"Everything is working amazing now. I'm already impressed with the true-tick feed of IQFeed and it's ability to support my 480 symbol layout." - Comment from Tyler via Email
"I've never had DTN go out on me since switching. ******* would go down a couple times every month when I was using them." - Comment from Bryce in AL.
"I am keeping IQFeed, much better reliabilty than *******. I may refer a few other people in the office to switch as well." - Comment from Don
"After all the anxiety I had with my previous data provider it is a relief not to have to worry about data speed and integrity." - Comment from Eamonn
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »Not getting historical Tick data
Author Topic: Not getting historical Tick data (3 messages, Page 1 of 1)

tester1
-Interested User-
Posts: 2
Joined: Mar 28, 2018


Posted: Apr 3, 2018 12:29 PM          Msg. 1 of 3
Hi I am new to IQfeed and DTN. I am using the Developer license. I am generally interested getting historical data for testing purposes. I am using Python on Windows 8.1. I found a small script on the forum that I adapted to download 1 min data and it works just fine. I have just downloaded a stocks in the S&P500. However I am struggling with tick data downloads. I have tried HTT and HTX but no joy at all.

I have failed to get anything from the example scripts as well.

The edited script that I am using is below. I would appreciate any guidance on this as well as anything relate to python that I need or I may be missing. For Python 2.7 I am using Anaconda (64 bit)

*************************************************************************

import sys
import socket
import string

startdate= '20180101 093000'
enddate = '20180326 160000'

def readHisSock(sock, recv_buffer = 4096):
buffer = ""
data = ""
while 1:
data = sock.recv(recv_buffer)
buffer += data
if "!ENDMSG!" in buffer: break
return buffer[:-12] #removes endmsg line

host = "127.0.0.1" #localhost
syms = ['GE', 'AAPL']
dir = "C:\Users\My Documents\LiClipse Workspace\IQfeed_data_download"

port = 9100 #history socket

for sym in syms:
f = open(sym + ".csv", "w")
message = "HTT," + sym + "20180101 093000, 20180326 160000,,093000,160000,,,,1\n"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
s.sendall(message)
d = readHisSock(s) #d is a string
s.close

d = "".join(d.split("\r")) #server sends multiple endlines
d = d.replace(",\n","\n")[:-1] #server has comma delimiter at end of each record

f.write(d)
f.close()



Edited by tester1 on Apr 3, 2018 at 12:29 PM

DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006


Posted: Apr 3, 2018 03:02 PM          Msg. 2 of 3
Hello,

I sent you an email with some issues I noticed on the request itself that you can look at. Enabling logging in the diagnostics app and comparing what you think you are sending to what we are actually receiving would be a good way to catch some of these.

This page defines the HTT request and its results.

http://www.iqfeed.net/dev/api/docs/HistoricalviaTCPIP.cfm

Let us know if the issues persist.

Tim

tester1
-Interested User-
Posts: 2
Joined: Mar 28, 2018


Posted: Apr 4, 2018 06:58 PM          Msg. 3 of 3
Thanks I will check it out.
 

 

Time: Thu April 25, 2024 11:43 PM CFBB v1.2.0 8 ms.
© AderSoftware 2002-2003