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)




"I've been using IQFeed 4 in a multi-threaded situation for the last week or two on 2600 symbols or so with 100 simultaneous daily charts, and I have had 100% responsiveness." - Comment from Scott
"Everything is working great ! Very impressive client. The news refreshes better and is more pertinent than the ******* feed I paid $ 100/month for. I Also like the charts a lot." - Comment from Leon
"I have to tell you though that using the IQFeed API is about the easiest and cleanest I have seen for some time." - Comment from Jim
"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.
"I ran your IQFeed DDE vs. my broker vs. a level II window for some slow-moving options. I would see the level II quote change, then your feed update instantaneously. My broker's DDE, however, would take as much as 30 seconds to update. I am not chasing milliseconds, but half a minute is unacceptable." - Comment from Rob
"Everything is working great with the API. I love it." - Comment from Calvin
"I was with ******* for 4 years at $230 a month, this is a huge savings for me, GOD BLESS YOU PEOPLE," - Comment from T.S. via Email
"If you want customer service that answers the phone, your best bet is IQFeed. I cannot stop praising them or their technical support. They are always there for you, and they are quick. I have used ****** too but the best value is IQFeed." - Comment from Public Forum
"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.
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: Wed May 1, 2024 3:01 PM CFBB v1.2.0 11 ms.
© AderSoftware 2002-2003