f5d4f58610
Rename `open_pps()` -> `open_account()` for obvious reasons as well as expect a bit tighter integration with `SymbologyCache` and consequently `LedgerTransaction` in order to drop `Transaction.sym: MktPair` dependence when compiling / allocating new `Position`s from a ledger. Also we drop a bunch of prior attrs and do some cleaning, - `Position.first_clear_dt` we no longer sort during insert. - `._clears` now replaces by `._events` table. - drop the now masked `.ensure_state()` method (eventually moved to `.calc` submod for maybe-later-use). - drop `.sym=` from all remaining txns init calls. - clean out the `Position.add_clear()` method and only add the provided txn directly to the `._events` table. Improve some `Account` docs and interface: - fill out the main type descr. - add the backend broker modules as `Account.mod` allowing to drop `.brokername` as input and instead wrap as a `@property`. - make `.update_from_trans()` now a new `.update_from_ledger()` and expect either of a `TransactionLedger` (user-dict) or a dict of txns; in the latter case if we have not been also passed a symcache as input then runtime error since the symcache is necessary to allocate positions. - also, delegate to `TransactionLedger.iter_txns()` instead of a manual datetime sorted iter-loop. - drop all the clears datetime don't-insert-if-earlier-then-first logic. - rename `.to_toml()` -> `.prep_toml()`. - drop old `PpTable` alias. - rename `load_pps_from_ledger()` -> `load_account_from_ledger()` and make it only deliver the account instance and also move out all the `polars.DataFrame` related stuff (to `.calc`). And tweak some account clears table formatting, - store datetimes as TOML native equivs. - drop `be_price` fixing. - obvsly drop `.ensure_state()` call to pps. |
||
---|---|---|
.github/workflows | ||
config | ||
dockering | ||
docs | ||
examples | ||
piker | ||
scripts | ||
snippets | ||
tests | ||
.gitignore | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
develop.nix | ||
notes_to_self.rst | ||
pytest.ini | ||
requirements-test.txt | ||
requirements.txt | ||
setup.py |
README.rst
piker
trading gear for hackers.
piker
is a broker agnostic, next-gen FOSS toolset for real-time computational trading targeted at hardcore Linux users .
we use as much bleeding edge tech as possible including (but not limited to):
- latest python for glue
- trio & tractor for our distributed, multi-core, real-time streaming structured concurrency runtime B)
- Qt for pristine high performance UIs
- pyqtgraph for real-time charting
polars
numpy
andnumba
for fast numerics- apache arrow and parquet for time series history management persistence and sharing
- (prototyped) techtonicdb for L2 book storage
focus and features:
- 100% federated: your code, your hardware, your data feeds, your broker fills.
- zero web: low latency, native software that doesn't try to re-invent the OS
- maximal privacy: prevent brokers and mms from knowing your planz; smack their spreads with dark volume.
- zero clutter: modal, context oriented UIs that echew minimalism, reduce thought noise and encourage un-emotion.
- first class parallelism: built from the ground up on next-gen structured concurrency primitives.
- traders first: broker/exchange/asset-class agnostic
- systems grounded: real-time financial signal processing that will make any queuing or DSP eng juice their shorts.
- non-tina UX: sleek, powerful keyboard driven interaction with expected use in tiling wms
- data collaboration: every process and protocol is multi-host scalable.
- fight club ready: zero interest in adoption by suits; no corporate friendly license, ever.
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; join the cause.
sane install with poetry
TODO!
rigorous install on nixos
using poetry2nix
TODO!
hacky install on nixos
NixOS is our core devs' distro of choice for which we offer a stringently defined development shell envoirment that can be loaded with:
nix-shell develop.nix
this will setup the required python environment to run piker, make sure to run:
pip install -r requirements.txt -e .
once after loading the shell
install wild-west style via pip
piker
is currently under heavy pre-alpha development and as such should be cloned from this repo and hacked on directly.
for a development install:
git clone git@github.com:pikers/piker.git
cd piker
virtualenv env
source ./env/bin/activate
pip install -r requirements.txt -e .
check out our charts
bet you weren't expecting this from the foss:
piker -l info -b kraken -b binance chart btcusdt.binance --pdb
this runs the main chart (currently with 1m sampled OHLC) in in debug mode and you can practice paper trading using the following micro-manual:
order_mode
(edge triggered activation by any of the following keys,
mouse-click
on y-level to submit at that price ):f
/ctl-f
to stage buyd
/ctl-d
to stage sella
to stage alert
search_mode
(ctl-l
orctl-space
to open,ctl-c
orctl-space
to close ) :- begin typing to have symbol search automatically lookup symbols from all loaded backend (broker) providers
- arrow keys and mouse click to navigate selection
- vi-like
ctl-[hjkl]
for navigation
you can also configure your position allocation limits from the sidepane.
run in distributed mode
start the service manager and data feed daemon in the background and connect to it:
pikerd -l info --pdb
connect your chart:
piker -l info -b kraken -b binance chart xmrusdt.binance --pdb
enjoy persistent real-time data feeds tied to daemon lifetime. the next time you spawn a chart it will load much faster since the data feed has been cached and is now always running live in the background until you kill pikerd
.
if anyone asks you what this project is about
you don't talk about it.
how do i get involved?
enter the matrix.
how come there ain't that many docs
suck it up, learn the code; no one is trying to sell you on anything. also, we need lotsa help so if you want to start somewhere and can't necessarily write serious code, this might be the place for you!