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


Python and QuickFIX
Started: by Branzol Views / Replies:9,615 / 36
Last Reply: 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

  #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

Futures Edge on FIO
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: Esignal/Java Solution
Broker/Data: IB/Esignal
Favorite Futures: Asian Stocks / Indexes
 
Branzol's Avatar
 
Posts: 38 since May 2014
Thanks: 43 given, 54 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)

PTMC Protrader Platform First Look w/Sergey Sokolov

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only

FIO Video Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

April

Process above all else w/Anthony Crudele @ Futures Radio Show

Elite only

Machine Learning - Quantitative Trading w/Martin Froehler @ Quantiacs

Elite only

Market Dynamics w/Peter Davies @ Jigsaw Trading

Elite only

Ask Me Anything w/Patrick Rooney @ Trading Technologies

Apr 18

Ask Me Anything w/FuturesTrader71

Apr 19

Machine Learning w/Kris Longmore

Elite only

Market Analysis w/Dave Forss

Apr 25

Introducing iSystems with Stage 5 Trading

Apr 27
     

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 06:47 PM.

no new posts
Page generated 2017-03-26 in 0.13 seconds with 20 queries on phoenix via your IP 54.211.11.57