[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Real-time datafeeds in Python



PureBytes Links

Trading Reference Links

Hi Joel,

probably the easiest way to interface with IB (don't know about MyTrack)
would be via IB's C++ API directly from Python using wrapper classes as
indicated.

This is much preferable to using Jython. Python (and its VM) being written
in C, naturally the connection to the C and C++ world is the most
straightforward. You will then continue to have access to all Python
libraries including wxPython and others. There are quite a few Python libs
that have not been ported to Java because Java already has the respective
capabilities, such as a good graphics library.

Therefore, Jython is good if and when you want to mainly live in Java land.
If you plan on using Swing or Eclipse in your coding, and Python only as a
secondary language, then the use of Jython would be indicated. The great
thing about Jython is that you can use all of the *Java* libs from Python,
not vice versa.

Another way to link to Java from Python would be via Java's JNI plus Python
wrappers, but as IB offers a C++ API, why bother?

Best regards,

Michael Suesserott


----- Original Message ----- 
From: "Joel Reymont" <joelr@xxxxxxxx>
To: "MichaelSuesserott" <MikeSuesserott@xxxxxxxxxxx>; "Omega List"
<omega-list@xxxxxxxxxx>
Sent: Tuesday, May 04, 2004 15:03
Subject: Re: Real-time datafeeds in Python


> Hi Michael!
>
> >To access a given API from Python, you can write simple Python wrappers
> around C++ or Java classes and functions that can then be called or
> instantiated from within Python.
>
> The part I have not been able to figure out is how to call Java from
> within Python. I think this would require embedding the Java VM among
> other things. It does not seem this approach would be very effective in
> interfacing with MyTrack or IB for example (Java SDKs).
>
> Another approach could be to make sub-servers/adapters for each data
> provider. These could be written in any language and send quotes to the
> market data server written in Python. The MDS could then store the quotes
> and notify subscribers over the network.
>
> An more straightforward approach would be to write the market server
> (data + execution) in Java and the rest of the system in Python. But then
> why not just write the whole thing in Java and use Jython to enable
> Python as the trading systems development language? Following this
> approach all the libraries, etc. would be written in Java but this would
> be transparent to you as you would code your systems in Python.
>
> I'm not sure what the best approach is and would appreciate as many
> opinions as possible.
>
>     Thanks, Joel
>
>
>