Python and QuickFIX - Matlab, R project and Python | futures.io
futures.io futures trading


Python and QuickFIX
Started:March 18th, 2015 (11:50 PM) by Branzol Views / Replies:8,305 / 34
Last Reply:November 21st, 2016 (01:06 PM) Attachments:1

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Reply
 1  
 
Thread Tools Search this Thread
 

Python and QuickFIX

Old   #31 (permalink)
Trading Apprentice
Princeton, NJ/USA
 
Futures Experience: Beginner
Platform: terminal
Favorite Futures: currency futures
 
Posts: 3 since Aug 2016
Thanks: 1 given, 0 received


Branzol View Post
I'll sit down in the am and help you with an acceptor code. Now it makes more sense. This code was written to originally talk to a fixsim.com acceptor and finally transferred to Nadexs acceptor.

Hey Branzol, I am currently working on building a simulator. I am completely new to quickfix and python so far i have created the executor.py script with setting the session creation. I would really appreciate if you could help me understand how to move forward with it. Thanks

Reply With Quote
 
Old   #32 (permalink)
Elite Member
Baltimore Maryland/United States
 
Futures Experience: Intermediate
Platform: Sierrachart/Custom Python Solution
Broker/Data: IB/Nadex/IQFeed/RealTick
Favorite Futures: NK, YM, CL, NG
 
Branzol's Avatar
 
Posts: 36 since May 2014
Thanks: 42 given, 54 received


mitrab View Post
Hey Branzol, I am currently working on building a simulator. I am completely new to quickfix and python so far i have created the executor.py script with setting the session creation. I would really appreciate if you could help me understand how to move forward with it. Thanks

Hi Mitrab, I apologize for the delay. I have not been on here in a few weeks. I'm making some assumptions here, so please correct me if I'm wrong. You've written an executor that you assume will work and need to test. You want to get the Acceptor portion of this working locally on your machine so you can test the executor at that point you would have a "simulator". Your not going to using some of the Quickfix Acceptor services that provide fake real-time data and order processing etc. Let me know and we can go from there.

Reply With Quote
The following user says Thank You to Branzol for this post:
 
Old   #33 (permalink)
Trading Apprentice
Princeton, NJ/USA
 
Futures Experience: Beginner
Platform: terminal
Favorite Futures: currency futures
 
Posts: 3 since Aug 2016
Thanks: 1 given, 0 received

Any help/advice would be much appreciated at this point.



Branzol View Post
Hi Mitrab, I apologize for the delay. I have not been on here in a few weeks. I'm making some assumptions here, so please correct me if I'm wrong. You've written an executor that you assume will work and need to test. You want to get the Acceptor portion of this working locally on your machine so you can test the executor at that point you would have a "simulator". Your not going to using some of the Quickfix Acceptor services that provide fake real-time data and order processing etc. Let me know and we can go from there.

Hey Branzol,

Ah, thank you so so so so much for your reply.

So far I have created a tradeclient.py file (initiator) and executor.py(acceptor) file.
While executing both of them through cmd, I get the following:

INITIATOR run CMD:

c:\pyfix\pyfixdemo\python>tradeclient.py
545
547
549
551
FIXT.1.1:CLIENT1->EXECUTOR
<20160915-19:41:54.205, FIXT.1.1:EXECUTOR->CLIENT1, event>
(Created session)
553
waiting for logon
waiting for logon
waiting for logon
waiting for logon
waiting for logon
waiting for logon
waiting for logon
waiting for logon

ACCEPTOR RUN CMD

c:\pyfix\pyfixdemo\python>executor.py
<20160915-19:27:52.167, FIXT.1.1:EXECUTOR->CLIENT1, event>
(Created session)

I am helpless and stuck as to how to proceed.

My first step would be to make them a happy couple ( initiator and executor to talk to each other)

I would appreciate any help! Thank you so much in advance!
Mitra

Reply With Quote
 
Old   #34 (permalink)
Trading Apprentice
Princeton, NJ/USA
 
Futures Experience: Beginner
Platform: terminal
Favorite Futures: currency futures
 
Posts: 3 since Aug 2016
Thanks: 1 given, 0 received

Me again!

Hello Branzol,

I was able to get started with initiator (session creation, logon, sending messages)
However I am still not able to make the initiator and acceptor to talk to each other. Were you able to establish that?
Thanks
Mitra

Reply With Quote
 
Old   #35 (permalink)
Trading Apprentice
London, United Kingdom
 
Futures Experience: None
Platform: Nija Trader
Favorite Futures: Emini ES
 
Posts: 1 since Nov 2016
Thanks: 0 given, 0 received

Futures Edge on FIO

Which products do you trade?

 

Branzol View Post
The commands you find in any of the Quickfix implementations will work. You just have to format them for use in Python. Below you'll find a very, I repeat very rough implementation of an initiator and Acceptor. The Acceptor is just the example executor code from the Quickfix website. The executor was written for 4/4.1/4.2 FIX so I had to switch the initiator to 4.2 for now as I don't have the time this morning to switch out the syntax to 5.0SP2.

Steps are as follows:
  1. Unzip the folder.
  2. Run acceptor.py with no arguments after it.
  3. Run initiator.py with the argument initiatorsettings.cfg
  4. If you check the logs you will see there are communicating and connecting. The Acceptor also will show the messages flowing in.

Please note currently it's throwing a message about the order being in the wrong format. I'm sure that is due to the previous order was in FIX 5.0SP2 format and it needs to be converted to FIX 4.2 or the executor needs to be formatted for FIX 5.0. I can take a look at that but it's not going to be until tomorrow evening. I just wanted to give you enough code to play around with today and somewhat see how this all functions.

Is there anything your really struggling to understand when it comes to Quickfix and FIX?

I would like to thank your for the given examples because it was very hard for me to build a QuickFix client/server enviroment apart from the Fixmulator/Banzai GUI programs.
I would like to point out that:

- I have received an error regarding the settings.cfg loading ---> i had to modify the path in initiator.py to make it working
- "Runtime error: Unable to create, bind, or listen to port 9911" --> i commented out the HttpAcceptPort=9911 row in the initiatorsettings.cfg

Does the provided initiator have other functions apart the Logon message?

Thank you very much

Reply With Quote

Reply



futures.io > > > > Python and QuickFIX

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

2016 True Edge Awards: Voting is open until Jan 21!

Now
 

Bookmap New Indicator Panel, Cumulative Delta, Order Flow demo

Jan 17

An Afternoon with FIO member Massive I

Elite only

Leo Murphy: Making sense of Technical Analysis and Random Walk

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
CQG API and Python Branzol Elite Automated Trading 2 December 6th, 2016 09:37 PM
IB with Python jamesico Matlab, R project and Python 2 September 9th, 2014 08:19 AM
Tradier with R and or Python Keith Leesus Matlab, R project and Python 2 September 5th, 2014 01:23 AM
Python Help Wanted $ wlblount Hire a Consultant or Programmer 0 December 25th, 2013 10:14 AM
QuickFIX "layer" for Ninja? heech NinjaTrader Programming 11 April 8th, 2010 09:44 PM


All times are GMT -4. The time now is 08:56 AM.

no new posts
Page generated 2017-01-16 in 0.25 seconds with 20 queries on phoenix via your IP 50.16.5.192