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 have been using IQFeed now for a few years in MultiCharts and I have zero complaints. Very, very rare to have any data hiccups or anything at all go wrong." - Comment from Public Forum
"IQ feed works very well, does not have all of the normal interruptions I have grown used to on *******" - Comment from Mark
"I am enjoying the feed very much - so superior to the broker provided feed I was previously using." - Comment from George
"The service is great, I see a noticeable improvement in my volume profiles over [broker]'s data feed" - Comment from Larry
"I used to have *******, but they are way more money for the same thing. I have had no probs with data from DTN since switching over." - Comment from Public Forum Post
"Awesome response, as usual. It is a sincere and refreshing pleasure to do business with DTN, compared to your competition." - Comment from Ryan
"I just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
"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.
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
"I cannot believe what a difference it makes trading with ProphetX!" - Comment from Bruce in Los Angeles
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 21185 total posts (0.01%) in 2,222 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: Fri April 26, 2024 1:59 AM CFBB v1.2.0 10 ms.
© AderSoftware 2002-2003