-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic buy bot #526
Open
goodboy
wants to merge
10
commits into
data.ticktools
Choose a base branch
from
basic_buy_bot
base: data.ticktools
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Basic buy bot #526
+268
−4
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goodboy
requested review from
guilledk,
wygud,
iamzoltan,
jaredgoldman and
ebisu4
and removed request for
guilledk
June 27, 2023 18:05
goodboy
added
strats
the logic of "why* the trade
lurker_sponsored
Paid (or traded) for by your local anon fanbois
labels
Jun 27, 2023
Shows how to boot the piker runtime, submit an order to the ems, cancel said order right away. NOTE, this uses piker's built in paper engine but can be easily tweaked to use a live backend at the user's whim.
…0005% below last clear value
bleh, those last 2 commits needs to be squashed obviously 😂 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
lurker_sponsored
Paid (or traded) for by your local anon fanbois
strats
the logic of "why* the trade
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)