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 started a trial a few weeks back before the market went wild. DTN.IQ didn’t miss anything and beat my other provider. I decided to stay with you because of the great service through all the volatility." - Comment from Mike
"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 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
"It’s so nice to be working with real professionals!" - Comment from Len
"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
"Version 4.0.0.2 has been working well for me and I appreciate that it is now a much tighter client to work with. I feel I can go to press with my own application and rely on a stable platform" - Comment from David in IA.
"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
"You have an excellent feed. Very few spikes for Spot Forex." - Comment from Public Forum Post
"I am very pleased with the DTNIQ system for quotes and news." - Comment from Larry
"Excellent datafeed !!!" - Comment from Arely
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 »IQFeed Developer »IQFeed Developer Support »IQFeed API documentation source?
Author Topic: IQFeed API documentation source? (4 messages, Page 1 of 1)

andrewNoah
-Interested User-
Posts: 1
Joined: Jun 8, 2020


Posted: Jun 8, 2020 08:13 AM          Msg. 1 of 4
Hello forum,

I am new to the IQFeed api.
I have been trying to find the proper documentation on how to usd the IQFeed API, but wasn't able to find one yet.
(The only source I got is the YouTube video from IQFeed, which doesn't show more in-depth information, and the pages shown in the video are not accessible now.)

1. Is there a relatively new and most up to date documentation to refer for developing with IQFeed API?

2. The main goal for me at the moment is to access the realtime Level 2 market depth data for Futures markets (i.e. CME Group) with Python programming language.

I have seen the IQFeed.CSharpApiClient for Python by mathpaquette on Github,
and was able to execute the sample python code which was uploaded in the repo: https://github.com/mathpaquette/IQFeed.CSharpApiClient/blob/master/docs/USING-WITH-PYTHON.md

However, I have no idea on where to start looking at to implement the Level 2 data streaming with this repo.

- Does anyone have a basic sample code for using the Streaming.Level2 api with IQFeed.CSharpApiClient?

- If not, can anyone guide me to some starting points on how to use the IQFeed.CSharpApiClient in python?

Currently, I am stuck at this level:

# Python v3.7.7
# Windows 10 x64
import sys
import clr

assembly_path = r"~my_path_to\IQFeed_CS"
sys.path.append(assembly_path)
clr.AddReference("IQFeed.CSharpApiClient")

from IQFeed.CSharpApiClient import IQFeedLauncher
from IQFeed.CSharpApiClient.Streaming.Level2 import Level2ClientFactory
from IQFeed.CSharpApiClient.Streaming import Level2
from IQFeed.CSharpApiClient.Streaming.Level2 import Messages
from IQFeed.CSharpApiClient.Streaming.Common import Messages


IQFeedLauncher.Start("my_id", "my_pw", "dev_id")

level2Client = Level2ClientFactory.CreateNew()

level2Client.Connect()

level2Client.ReqWatch("@BTC#")

...


Thank you in advance.

Sincerely,

Andrew.

DTN_Gary_Stephen
-Interested User-
Posts: 93
Joined: Jul 3, 2019


Posted: Jun 11, 2020 06:06 AM          Msg. 2 of 4
Andrew,

Hello, this is Gary Stephen from DTN IQFeed API Support.

The online documentation about the API is available at http://www.iqfeed.net/dev/index.cfm?login=login. You will need a username and password to access it, which you would have received when you purchased the IQFeed API product.

The code you give appears to import some necessary packages, connect to the API, and request a watch for a certain symbol.

IQFeedLauncher.Start("my_id", "my_pw", "dev_id") performs the act of connecting to the server, as per http://www.iqfeed.net/dev/api/docs//InitializingTheFeed.cfm. You would have to set these variables to your own login, password, and productid.

level2Client = Level2ClientFactory.CreateNew() creates a new instance.

level2Client.Connect() connects to the socket, as described in http://www.iqfeed.net/dev/api/docs/Introduction.cfm.

level2.Client.ReqWatch sends the command "w@BTC#" which is one of the commands outlined in http://www.iqfeed.net/dev/api/docs//Level2viaTCPIP.cfm. Each socket has its own set of commands.

In general, the best way to understand an existing IQFeed library is to realize which part does what. Hopefully this will help. I can answer any further questions you may have about it.

Sincerely,
Gary Stephen
DTN IQFeed Implementation Support Specialist

mathpaquette
-Interested User-
Posts: 20
Joined: May 18, 2018


Posted: Jun 12, 2020 05:11 AM          Msg. 3 of 4
Hello Andrew,

Feel free to create an issue https://github.com/mathpaquette/IQFeed.CSharpApiClient/issues if you need more support.

Thanks,
Math

mathpaquette
-Interested User-
Posts: 20
Joined: May 18, 2018


Posted: Jun 13, 2020 11:10 AM          Msg. 4 of 4
Hello Andrew,

Added 2 additional examples for Python and one is related to what you were asking for.
Please have a look to Streaming level 1 example.

https://github.com/mathpaquette/IQFeed.CSharpApiClient/blob/master/docs/USING-WITH-PYTHON.md#additional-examples

Regards,
Mathieu Paquette
Software consultant
 

 

Time: Thu July 2, 2020 11:03 AM CFBB v1.2.0 16 ms.
© AderSoftware 2002-2003