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


Python and QuickFIX
Updated: Views / Replies:12,225 / 39
Created: by Branzol Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 1  
 
Thread Tools Search this Thread
 

Python and QuickFIX

  #11 (permalink)
Trading Apprentice
Sao Paulo, Brazil
 
Futures Experience: Intermediate
Platform: Metastock
Favorite Futures: Forex
 
Posts: 4 since Apr 2015
Thanks: 3 given, 1 received

Thank you very much for your time Branzol, your code helped me alot, now is working!!!

Reply With Quote
The following user says Thank You to TraderFXUS for this post:
 
  #12 (permalink)
Trading Apprentice
London + England/UK
 
Futures Experience: Intermediate
Platform: NP3
Favorite Futures: gold
 
Posts: 9 since May 2015
Thanks: 1 given, 3 received

Quick Fix

hi, I have the acceptor.py working and initiator.py initiatorsettings.cfg working but only if I chnage settings = fix.SessionSettings("settings.cfg") to settings = fix.SessionSettings("initiatorsettings.cfg"). What is the settings.cfg? Any examples. How do I make use of input = raw_input()? How to send a test order ? thanks

Reply With Quote
 
  #13 (permalink)
Trading Apprentice
London + England/UK
 
Futures Experience: Intermediate
Platform: NP3
Favorite Futures: gold
 
Posts: 9 since May 2015
Thanks: 1 given, 3 received


apologies I got i...thanks

Reply With Quote
The following user says Thank You to pearljam100 for this post:
 
  #14 (permalink)
Trading Apprentice
London + England/UK
 
Futures Experience: Intermediate
Platform: NP3
Favorite Futures: gold
 
Posts: 9 since May 2015
Thanks: 1 given, 3 received

HI, if anyone can help please on this.

When I send a buy order, the ack I get back:
(Message 12 Rejected: Required tag missing:60)
<20150513-09:46:20.398, FIX.4.2:FIXSIM->BRANZOL, outgoing>
(8=FIX.4.29=10635=334=1249=FIXSIM52=20150513-09:46:20.39856=BRANZOL45=1258=Required tag missing371=60372=D373=110=253)

How can I set TransactTime for tag=60 in initiator.py and acceptor.py? If this is in place will Message no longer be rejected?

Also, any ideas on TargetCompID=BANZAI and SocketConnectHost=localhost
SocketAcceptPort=9877??

thanks

Reply With Quote
 
  #15 (permalink)
Trading Apprentice
London + England/UK
 
Futures Experience: Intermediate
Platform: NP3
Favorite Futures: gold
 
Posts: 9 since May 2015
Thanks: 1 given, 3 received

Too add.....when I do add tag 60 for Transactiontime I get the followin error:

(8=FIX.4.29=13135=D34=249=BRANZOL52=20150513-14:54:22.60756=FIXSIM11=121=338=10040=244=1054=155=VOD.L60=20150513-14:54:2275=2015051310=220)
Traceback (most recent call last):
File "acceptor.py", line 49, in fromApp
executionReport.setField( fix.ExecID(self.genExecID()) )
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 36322, in __init__
quickfix.StringField.__init__(self, 17, data)
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 677, in __init__
this = _quickfix.new_StringField(*args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'new_StringField'.
Possible C/C++ prototypes are:
FIX::StringField::StringField(int,std::string const &)
FIX::StringField::StringField(int)

Is it the way I installed quickfix? Really stuck on ths.....

Reply With Quote
 
  #16 (permalink)
Trading Apprentice
London + England/UK
 
Futures Experience: Intermediate
Platform: NP3
Favorite Futures: gold
 
Posts: 9 since May 2015
Thanks: 1 given, 3 received

in initiator.py, same on 60

Successful Logon to session 'FIX.4.2:BRANZOL->FIXSIM'.
1
Putin Order
Creating the following order:
Traceback (most recent call last):
File "initiator.py", line 104, in <module>
main(args.file_name)
File "initiator.py", line 88, in main
application.put_order(input )
File "initiator.py", line 69, in put_order
trade.setField (fix.TransactTime ((datetime.now ().strftime ("%Y%m%d-%H:%M:%S.%f"))[:-3])) # 60
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 38254, in __init__
quickfix.UtcTimeStampField.__init__(self, 60, data)
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 795, in __init__
this = _quickfix.new_UtcTimeStampField(*args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'new_UtcTimeStampField'.
Possible C/C++ prototypes are:
FIX::UtcTimeStampField::UtcTimeStampField(int,UtcTimeStamp const &,bool)
FIX::UtcTimeStampField::UtcTimeStampField(int,UtcTimeStamp const &)
FIX::UtcTimeStampField::UtcTimeStampField(int,bool)
FIX::UtcTimeStampField::UtcTimeStampField(int)


thanks for any help

Reply With Quote
 
  #17 (permalink)
Elite Member
Baltimore Maryland/United States
 
Futures Experience: Advanced
Platform: Custom
Broker/Data: IB
Favorite Futures: Asian Stocks / Indexes
 
Branzol's Avatar
 
Posts: 39 since May 2014
Thanks: 43 given, 60 received


pearljam100 View Post
in initiator.py, same on 60

Successful Logon to session 'FIX.4.2:BRANZOL->FIXSIM'.
1
Putin Order
Creating the following order:
Traceback (most recent call last):
File "initiator.py", line 104, in <module>
main(args.file_name)
File "initiator.py", line 88, in main
application.put_order(input )
File "initiator.py", line 69, in put_order
trade.setField (fix.TransactTime ((datetime.now ().strftime ("%Y%m%d-%H:%M:%S.%f"))[:-3])) # 60
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 38254, in __init__
quickfix.UtcTimeStampField.__init__(self, 60, data)
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 795, in __init__
this = _quickfix.new_UtcTimeStampField(*args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'new_UtcTimeStampField'.
Possible C/C++ prototypes are:
FIX::UtcTimeStampField::UtcTimeStampField(int,UtcTimeStamp const &,bool)
FIX::UtcTimeStampField::UtcTimeStampField(int,UtcTimeStamp const &)
FIX::UtcTimeStampField::UtcTimeStampField(int,bool)
FIX::UtcTimeStampField::UtcTimeStampField(int)


thanks for any help

Did you find your answer, for some reason I wasn't getting updates on this thread anymore to my phone or I would have replied sooner. As it seems you were answering a lot of your own questions. Sorry about that. That error looks as if your not entering the order sequence properly for the FIX Format and the timestamp is in the wrong sequence or missing entirely.


Last edited by Branzol; May 22nd, 2015 at 06:16 PM. Reason: Added additional info
Reply With Quote
 
  #18 (permalink)
Trading Apprentice
London
 
Futures Experience: Advanced
Platform: MetaTrader,Integral,Currenex,Broadway
Favorite Futures: EUR/USD
 
Posts: 2 since May 2015
Thanks: 0 given, 0 received


pearljam100 View Post
in initiator.py, same on 60

Successful Logon to session 'FIX.4.2:BRANZOL->FIXSIM'.
1
Putin Order
Creating the following order:
Traceback (most recent call last):
File "initiator.py", line 104, in <module>
main(args.file_name)
File "initiator.py", line 88, in main
application.put_order(input )
File "initiator.py", line 69, in put_order
trade.setField (fix.TransactTime ((datetime.now ().strftime ("%Y%m%d-%H:%M:%S.%f"))[:-3])) # 60
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 38254, in __init__
quickfix.UtcTimeStampField.__init__(self, 60, data)
File "C:\Users\jsainz\AppData\Local\Continuum\Anaconda\lib\site-packages\quickfix.py", line 795, in __init__
this = _quickfix.new_UtcTimeStampField(*args)
NotImplementedError: Wrong number or type of arguments for overloaded function 'new_UtcTimeStampField'.
Possible C/C++ prototypes are:
FIX::UtcTimeStampField::UtcTimeStampField(int,UtcTimeStamp const &,bool)
FIX::UtcTimeStampField::UtcTimeStampField(int,UtcTimeStamp const &)
FIX::UtcTimeStampField::UtcTimeStampField(int,bool)
FIX::UtcTimeStampField::UtcTimeStampField(int)


thanks for any help

Hi there, I've run into the same issue, did you happen to find a solution?

Reply With Quote
 
  #19 (permalink)
Trading Apprentice
London
 
Futures Experience: Advanced
Platform: MetaTrader,Integral,Currenex,Broadway
Favorite Futures: EUR/USD
 
Posts: 2 since May 2015
Thanks: 0 given, 0 received


fixquery View Post
Hi there, I've run into the same issue, did you happen to find a solution?

Read somewhere UtcTimeStampField isn't supported in Python. I got round this by replacing

 
Code
trade.setField (fix.TransactTime ((datetime.now ().strftime ("%Y%m%d-%H:%M:%S.%f"))[:-3])) # 60
with:

 
Code
trade.setField(fix.StringField(60,(datetime.utcnow ().strftime ("%Y%m%d-%H:%M:%S.%f"))[:-3]))

Reply With Quote
 
  #20 (permalink)
Trading Apprentice
London + England/UK
 
Futures Experience: Intermediate
Platform: NP3
Favorite Futures: gold
 
Posts: 9 since May 2015
Thanks: 1 given, 3 received



fixquery View Post
Read somewhere UtcTimeStampField isn't supported in Python. I got round this by replacing

 
Code
trade.setField (fix.TransactTime ((datetime.now ().strftime ("%Y%m%d-%H:%M:%S.%f"))[:-3])) # 60
with:

 
Code
trade.setField(fix.StringField(60,(datetime.utcnow ().strftime ("%Y%m%d-%H:%M:%S.%f"))[:-3]))

Thanks for the reply, I will give it a try and see what happens

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)
 

Opening Breakouts and Reversals w/Al Brooks

Elite only
 

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

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


All times are GMT -4. The time now is 03:07 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-10-17 in 0.08 seconds with 19 queries on phoenix via your IP 107.22.126.144