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 am a hedge fund manager here. It’s funny, I have a Bloomberg terminal and a Bridge feed, but I still like having my DTN feed!" - Comment from Feras
"Thanks for the great product and support. During this week of high volume trading, my QuoteTracker + IQ Feed setup never missed a beat. Also, thanks for your swiftness in responding to data issues. I was on ******* for a few years before I made the switch over early this year, and wish I had done it a long time ago." - Comment from Ken
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"Thank you so much - awesome feed, awesome service!" - Comment from Greg via Email
"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.
"DTN has never given me problems. It is incredibly stable. In fact I've occasionally lost the data feed from Interactive Brokers, but still been able to trade because I'm getting good data from DTN." - Comment from Leighton
"I will tell others who want to go into trading that DTN ProphetX is an invaluable tool, I don't think anyone can trade without it..." - Comment from Luther
"My broker in Davenport suggested I give you a try as he uses your service and says its the best." - Comment from Bill via RT Chat
"I just wanted to say how happy I am with your service. I was able to download the API docs last week and I was able to replicate Interactive Brokers historical bar queries and realtime bar queries over the weekend. That was about one of the fastest integrations that I've ever done and it works perfectly!!!!" - Comment from Jason via Email
"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
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
Viewing User Profile for: tester1
About Contact
Joined: Mar 28, 2018 01:55 PM
Last Post: Apr 4, 2018 06:58 PM
Last Visit: May 11, 2018 02:32 PM
Website:  
Location:
Occupation:
Interests:
Avatar:
Email: chetan.saranmehra@gmail.com
AIM:
ICQ:
MSN IM:
Yahoo IM:
Post Statistics
tester1 has contributed to 2 posts out of 21191 total posts (0.01%) in 2,228 days (0.00 posts per day).

20 Most recent posts:
IQFeed Developer Support » Not getting historical Tick data Apr 4, 2018 06:58 PM (Total replies: 2)

Thanks I will check it out.

IQFeed Developer Support » Not getting historical Tick data Apr 3, 2018 12:29 PM (Total replies: 2)

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


Time: Thu May 2, 2024 9:49 AM CFBB v1.2.0 7 ms.
© AderSoftware 2002-2003