ranaroussi / qtpylib

QTPyLib, Pythonic Algorithmic Trading
http://qtpylib.io
Apache License 2.0
2.12k stars 508 forks source link

multiple exchange #14

Open fredvb opened 7 years ago

fredvb commented 7 years ago

How easy would it to support multiple exchanges / data sources ?

fredvb commented 7 years ago

Same goes with swapping the DB backend to store ticker data. Say I would like to implement a MongoDB version.

ranaroussi commented 7 years ago

At the moment, QTPyLib uses only Interactive Brokers for market data and order execution and it stores the tick/minute data in MySQL.

I do have thought on supporting / moving to MongoDB for storing tick data (most likely using Man AHL's Arctic), but I currently have no timeframe for that.

Everything related to market data retrieval and storage is happening on blotter.py, so if you're looking to fork the library and add these functionalities - that's where you should start.

fredvb commented 7 years ago

I was also thinking Arctic would be an ideal solution for storing tick/minute data.

In my case, the market data doesn't come from IB, so things would be a bit different, but a general interface would be nice. I'd also love to see order books be supported, but I'm not sure if QTPyLib supports this, but I bet it could be added if the data is available.

I also haven't yet decided on what backstepper+live trader system I'll pick out of the tons of other python based ones around. This project is pretty nice though.

ranaroussi commented 7 years ago

Part of the reason I've released QTPyLib as open source is so that anyone who needs a somewhat custom feature will be able to add it. Adding a different data source should be a simple task. I would like to see FIX support in QTPyLib, but I feel there are more urgent things to accomplish at the moment.

Orderbook support was added to version 1.4.98a which was released today :)