Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Finally a first rough draft of an automatic trading bot using multiple subsystems throughout the codebase 🏄🏼
Currently this example just loads an order client and live data feeds and then submits a trailing buy order that shouldn't clear:
below the last clearing price.
or less as low latency as they can be given we have no serious
clearing model (yet) inside.
TODO:
we need some wrapping to make the order control API(s) higher
level to ideally better encapsulate many of the runtime boot details:
open_ems()
hides all of:OMS seems to be a suit acro? https://www.investopedia.com/terms/o/oms.asp
maybe_open_pikerd()
which we should just be able to factorinside it right? don't think there will be any conflicts with
existing UI driven boot sequence?
possibly returns a "higher level API" which wraps a bunch of
lowlevel concurrency stuff and data feed(s) hookup:
a
OrderBook
or something?open_feed()
+Flume
loading and.mkt: MktPair
processing to enable some kinda
HighLevelOrderClient.order()
which automatically has theprice_round()
pre wrapped?
wrappers for rt tick processing and FSP flow access?
tick buffer as per Cross-actor, shm, (tick) ring buffer #107
.data.ticktools
for some starter utils that arelikely useful to wrap in and document usage..
a background task which constantly reads from the
brokerd
stream such that overruns never happen andsync-style code can easily read from some
Status
msgqueue using poll-style?
a DSL of sorts that makes using
async/await
stylecode to manage order req/resp processing more terse?
functionality to await statuses from
https://github.com/pikers/piker/pull/526/files#diff-0242f8b50a515bb4be7c360a7b54a860e50039117fe13c950bd75969dfdd3027R33
much easier to grok and write as part of a more
sophisticated algorithmic trading strategy..?
lib code to conduct backend roundtrip submit-cancel latency
measurement and expose it as a reliablity metric / FSP for
driving order routing B)