piker/README.rst

180 lines
6.1 KiB
ReStructuredText
Raw Permalink Normal View History

2018-01-20 18:19:15 +00:00
piker
2018-02-15 18:33:53 +00:00
-----
trading gear for hackers
2018-01-27 06:52:24 +00:00
2020-11-06 17:46:04 +00:00
|gh_actions|
2018-04-11 04:10:45 +00:00
2020-11-06 17:46:04 +00:00
.. |gh_actions| image:: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fpikers%2Fpiker%2Fbadge&style=popout-square
:target: https://actions-badge.atrox.dev/piker/pikers/goto
2019-02-26 06:14:58 +00:00
``piker`` is a broker agnostic, next-gen FOSS toolset and runtime for
real-time computational trading targeted at `hardcore Linux users
<comp_trader>`_ .
2019-02-26 06:14:58 +00:00
we use much bleeding edge tech including (but not limited to):
2020-11-06 17:46:04 +00:00
- latest python for glue_
- uv_ for packaging and distribution
- trio_ & tractor_ for our distributed `structured concurrency`_ runtime
- Qt_ for pristine low latency UIs
- pyqtgraph_ (which we've extended) for real-time charting and graphics
- ``polars`` ``numpy`` and ``numba`` for redic `fast numerics`_
- `apache arrow and parquet`_ for time-series storage
potential projects we might integrate with soon,
- (already prototyped in ) techtonicdb_ for L2 book storage
.. _comp_trader: https://jfaleiro.wordpress.com/2019/10/09/computational-trader/
.. _glue: https://numpy.org/doc/stable/user/c-info.python-as-glue.html#using-python-as-glue
.. _uv: https://docs.astral.sh/uv/
2019-03-22 02:46:20 +00:00
.. _trio: https://github.com/python-trio/trio
.. _tractor: https://github.com/goodboy/tractor
2020-09-02 16:45:24 +00:00
.. _structured concurrency: https://trio.discourse.group/
2020-05-12 02:43:30 +00:00
.. _Qt: https://www.qt.io/
2020-09-02 16:45:24 +00:00
.. _pyqtgraph: https://github.com/pyqtgraph/pyqtgraph
.. _apache arrow and parquet: https://arrow.apache.org/faq/
2020-07-08 19:42:51 +00:00
.. _fast numerics: https://zerowithdot.com/python-numpy-and-pandas-performance/
.. _techtonicdb: https://github.com/0b01/tectonicdb
2019-03-22 02:46:20 +00:00
2020-05-12 02:43:30 +00:00
focus and feats:
****************
fitting with these tenets, we're always open to new
framework/lib/service interop suggestions and ideas!
2021-03-31 18:23:45 +00:00
- **100% federated**:
your code, your hardware, your data feeds, your broker fills.
2020-09-02 16:36:24 +00:00
- **zero web**:
low latency as a prime objective, native UIs and modern IPC
protocols without trying to re-invent the "OS-as-an-app"..
2018-01-27 06:52:24 +00:00
- **maximal privacy**:
prevent brokers and mms from knowing your planz; smack their
spreads with dark volume from a VPN tunnel.
2019-02-26 06:14:58 +00:00
- **zero clutter**:
modal, context oriented UIs that echew minimalism, reduce thought
noise and encourage un-emotion.
2018-01-27 06:52:24 +00:00
- **first class parallelism**:
built from the ground up on a next-gen structured concurrency
supervision sys.
2018-02-12 15:55:04 +00:00
- **traders first**:
broker/exchange/venue/asset-class/money-sys agnostic
- **systems grounded**:
real-time financial signal processing (fsp) that will make any
queuing or DSP eng juice their shorts.
2023-02-11 18:45:29 +00:00
- **non-tina UX**:
sleek, powerful keyboard driven interaction with expected use in
tiling wms (or maybe even a DDE).
2020-11-06 17:46:04 +00:00
- **data collab at scale**:
every actor-process and protocol is multi-host aware.
2021-03-31 18:23:45 +00:00
- **fight club ready**:
zero interest in adoption by suits; no corporate friendly license,
ever.
2018-04-18 18:03:59 +00:00
building the hottest looking, fastest, most reliable, keyboard
friendly FOSS trading platform is the dream; join the cause.
a sane install with `uv`
************************
bc why install with `python` when you can faster with `rust` ::
uv lock
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 default.nix
start a chart
*************
run a realtime OHLCV chart stand-alone::
piker -l info chart btcusdt.spot.binance xmrusdt.spot.kraken
this runs a chart UI (with 1m sampled OHLCV) and shows 2 spot markets from 2 diff cexes
overlayed on the same graph. Use of `piker` without first starting
a daemon (`pikerd` - see below) means there is an implicit spawning of the
multi-actor-runtime (implemented as a `tractor` app).
2018-04-18 18:03:59 +00:00
For additional subsystem feats available through our chart UI see the
various sub-readmes:
2018-04-18 18:03:59 +00:00
- order control using a mouse-n-keyboard UX B)
- cross venue market-pair (what most call "symbol") search, select, overlay Bo
- financial-signal-processing (`piker.fsp`) write-n-reload to sub-chart BO
- src-asset derivatives scan for anal, like the infamous "max pain" XO
spawn a daemon standalone
*************************
we call the root actor-process the ``pikerd``. it can be (and is
recommended normally to be) started separately from the ``piker
chart`` program::
2021-04-10 18:22:49 +00:00
pikerd -l info --pdb
2021-04-10 18:22:49 +00:00
the daemon does nothing until a ``piker``-client (like ``piker
chart``) connects and requests some particular sub-system. for
a connecting chart ``pikerd`` will spawn and manage at least,
- a data-feed daemon: ``datad`` which does all the work of comms with
the backend provider (in this case the ``binance`` cex).
- a paper-trading engine instance, ``paperboi.binance``, (if no live
account has been configured) which allows for auto/manual order
control against the live quote stream.
2021-04-10 18:22:49 +00:00
*using* an actor-service (aka micro-daemon) manager which dynamically
supervises various sub-subsystems-as-services throughout the ``piker``
runtime-stack.
2021-04-10 18:22:49 +00:00
now you can (implicitly) connect your chart::
2021-04-10 18:22:49 +00:00
piker chart btcusdt.spot.binance
2021-04-10 18:22:49 +00:00
since ``pikerd`` was started separately you can now enjoy a persistent
real-time data stream tied to the daemon-tree's lifetime. i.e. the next
time you spawn a chart it will obviously not only load much faster
(since the underlying ``datad.binance`` is left running with its
in-memory IPC data structures) but also the data-feed and any order
mgmt states should be persistent until you finally cancel ``pikerd``.
2021-04-10 18:22:49 +00:00
2020-11-06 17:46:04 +00:00
if anyone asks you what this project is about
2020-09-02 16:36:24 +00:00
*********************************************
you don't talk about it; just use it.
2018-04-18 18:03:59 +00:00
2021-03-31 18:23:45 +00:00
2020-11-06 17:46:04 +00:00
how do i get involved?
2020-09-02 16:36:24 +00:00
**********************
2020-11-06 17:46:04 +00:00
enter the matrix.
2021-03-31 18:23:45 +00:00
how come there ain't that many docs
***********************************
i mean we want/need them but building the core right has been higher
prio then marketting (and likely will stay that way Bp).
soo, suck it up bc,
- no one is trying to sell you on anything
- learning the code base is prolly way more valuable
- the UI/UXs are intended to be "intuitive" for any hacker..
we obviously need tonz help so if you want to start somewhere and
can't necessarily write "advanced" concurrent python/rust code, this
helping document literally anything might be the place for you!