Library to connect to FIX servers, and make our own
Project description
# slowbreak
Library to connect to FIX servers, and make our own. We use slowbreak to connect to ROFEX and BYMA markets in Argentina. It was originally designed to work with FIX5.0sp2 but now is adapted to be also used with FIX 4.2+ It works with python 2.7 and python 3.5+ (tested with python 2.7 and 3.6)
See the slowbreak/example folder for examples on how to use it. You can also check the slowbreak/test folder to see details on how to use the API.
You can also see the slowbreak tutorials in this playlist: https://www.youtube.com/watch?v=LKkyr2j9dOA&list=PLTQoyI2lMoFOpQ0j1EmIwv6A_GVcP4CdK
Developed by Aureliano Calvo for Eco Valores S.A.
Distributed under MIT license (see LICENSE file for details)
## Why is this named as slowbreak?
Less is named after more. We chosen this name as a reference to QuickFix, as we intend to fix several shortcomings we found when trying to use it in python.
## Guiding principles
### Pure python
We will try to keep as pure-python as possible with this library. In the case we find we need to have a non-pure python implementation for performance reasons, we will provide both the python implementation and the native one.
### FIX messages are lists of (number, value) pairs
FIX messages are just a list of pairs (number, value). The value is just a string. In this library we do not attempt to:
Give names to tag numbers.
Know the actual type of a field.
Why? Because they vary between implementations. We try to find the waist of the protocol. We believe that all the implementations treat messages as a list of pairs. This allows us to have really generic code in a lot of parts and avoid the XML fiasco that happens when you need a small change of types or names in QuickFix.
### Certificate authorities are insecure
While we support connecting via SSL to servers, we intentionally not use the PKI infrastructure. Why? Because when you trust 100 CAs if anyone of those betrays you then you are screwed. And algorithmic trading handles tons of cash. So there is a lot of incentive to do unproper things. Instead we propose to use the hash of the server certificate as a way to identify it, using a mechanism similar to the one used in ssh.
### All messages are equivalent
We do no distinction between administrative messages and application messages. Any application may handle any message. This allows us to have the session handling as just another FIX application.
### FIX applications are stacked like network protocols
This gives us the posibility to have different aspects of the algorithmic trading separated. We have the SessionApp, which is usually the base of the stack in production, that handles sequence numbers, logons, heartbeats, etc. On top of that you may implement something that controls that the orders you put in the market are not too big, also as an FixApplication. And on top of that you can implement the logic of your trading strategy.
### We do not tell you how to trade
As we develop the library, we will be adding more functionallity. For instance, we intend to provide:
Applications to limit the position of your algorithm
Applications to limit the rate of messages sent to the server
What we will not provide is production-ready strategies for algorithmic trading.
### Testing is important
That’s why we provide from the start the ability to unit test your strategies, without connecting to any market, and the ability to make your own server to do end to end testing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file slowbreak-0.0.16-py3-none-any.whl
.
File metadata
- Download URL: slowbreak-0.0.16-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96c3edd897f195321e74e52b5a404679bf2eab609193e59b3e790f0242c9af09 |
|
MD5 | ded89cdf6235162b27079506449a266a |
|
BLAKE2b-256 | 078633d6518eeb8a50ebbfcafb400fdc24713a9d7a6faac9e9c1d7e9936c2d3a |