4e6d1b8bd1
`pg.PlotCurveItem.setData()` is normally used for real-time updates to curves and takes in a whole new array of data to graphics. It makes sense to stick with this interface especially if the current datum graphic will originally be drawn from tick quotes and later filled in when bars data is available (eg. IB has this option in TWS charts for volume). Additionally, having a data feed api where the push process/task can write to shared memory and the UI task(s) can read from that space is ideal. It allows for indicator and algo calculations to be run in parallel (via actors) with initial price draw instructions such that plotting of downstream metrics can be "pipelined" into the chart UI's render loop. This essentially makes the chart UI async programmable from multiple remote processes (or at least that's the goal). Some details: - Only store a single ref to the source array data on the `LinkedSplitCharts`. There should only be one reference since the main relation is **that** x-time aligned sequence. - Add `LinkedSplitCharts.update_from_quote()` which takes in a quote dict and updates the OHLC array from it's contents. - Add `ChartPlotWidget.update_from_array()` method to trigger graphics updates per chart with consideration for overlay curves. |
||
---|---|---|
piker | ||
tests | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
MANIFEST.in | ||
Pipfile | ||
Pipfile.lock | ||
README.rst | ||
setup.py |
README.rst
piker
Trading gear for hackers.
piker
is an attempt at a pro-grade, broker agnostic, next-gen FOSS toolset for real-time trading and financial analysis targetted at hardcore Linux users.
It tries to use as much bleeding edge tech as possible including (but not limited to):
- Python 3.7+ for glue and business logic
- trio for async
- tractor as the underlying actor model
- marketstore for historical and real-time tick data persistence and sharing
- techtonicdb for L2 book storage
- Qt for pristine high performance UIs
Focus and Features:
- 100% federated: running your code on your hardware with your broker's data feeds, privately, is the point (this is not a web-based I don't know how to run my own system project).
- Asset class, broker, exchange agnostic.
- Built on a highly reliable structured concurrent actor model with built in async streaming and scalability protocols allowing for a distributed architecture from the ground up.
- Privacy: your orders, indicators, algos are all run client side and are shared only with the (groups of) traders you specify.
- Production grade, highly attractive native UIs that feel and fit like a proper pair of skinny jeans; only meant to be used with a proper tiling window manager (no, we are not ignorant enough to roll our own).
- Sophisticated charting capable of processing large data sets in real-time while sanely displaying complex models and strategy systems.
- Built-in support for hipstery indicators and studies that you probably haven't heard of but that the authors know generate alpha when paired with the right strategies.
- Emphasis on collaboration through sharing of data, ideas, and processing power. We will not host your code in the cloud nor ask you to participate in any lame "alpha competitions".
- Adoption is very low priority, especially if you're not an experienced trader; the system is not built for sale it is built for people.
- No, we will never have a "corporation friendly license"; if you intend to use this code base we must know about it.
Fitting with these tenets, we're always open to new framework suggestions and ideas.
Building the best looking, most reliable, keyboard friendly trading platform is the dream. Feel free to pipe in with your ideas and quiffs.
Install
piker
is currently under heavy pre-alpha development and as such should be cloned from this repo and hacked on directly.
A couple bleeding edge components are being used atm pertaining to async ports of libraries for use with trio.
Before installing make sure you have pipenv and have installed python3.7
as well as kivy source build dependencies since currently there's reliance on an async development branch.
kivy dependencies
On Archlinux you need the following dependencies:
pacman -S python-docutils gstreamer sdl2_ttf sdl2_mixer sdl2_image xclip
To manually install the async branch of kivy
from github do (though this should be done as part of the pipenv install
below):
pipenv install -e 'git+git://github.com/matham/kivy.git@async-loop#egg=kivy'
For a development install:
git clone git@github.com:pikers/piker.git
cd piker
pipenv install --pre -e .
pipenv shell
Broker Support
For live data feeds the only fully functional broker at the moment is Questrade. Eventual support is in the works for IB, TD Ameritrade and IEX. If you want your broker supported and they have an API let us know.
Play with some UIs
To start the real-time index monitor with the questrade backend:
piker -l info monitor indexes
If you want to see super granular price changes, increase the broker quote query rate
with -r
:
piker monitor indexes -r 10
It is also possible to run the broker data feed micro service as a daemon:
pikerd -l info
Then start the client app as normal:
piker monitor indexes