Commit Graph

1515 Commits (2312b6aeb2afb7d3d83fa0efa4091d9019b69471)

Author SHA1 Message Date
Tyler Goodlet 444421bddf Make our default label opaque (since it's normally just text) 2021-09-06 09:28:10 -04:00
Tyler Goodlet 565380368a Increase cursor debounce delay slightly? 2021-09-06 09:28:10 -04:00
Tyler Goodlet f06e05c9cb Switch mode to touch `.pp` 2021-09-06 09:28:10 -04:00
Tyler Goodlet 71eef1b7fd Add `.view` property, throttle to 50Hz by default 2021-09-06 09:28:10 -04:00
Tyler Goodlet 20a8045127 Add a left-side-of-marker orientation 2021-09-06 09:28:10 -04:00
Tyler Goodlet 74d6dd5957 Move position tracking to new module
It was becoming too much with all the labels and markers and lines..
Might as well package it all together instead of cramming it in the
order mode loop, chief.

The techincal summary,
- move `_lines.position_line()` -> `PositionInfo.position_line()`.
- slap a `.pp` on the order mode instance which *is* a `PositionInfo`
- drop the position info info label for now (let's see what users want
  eventually but for now let's keep it super minimal).
- add a `LevelMarker` type to replace the old `LevelLine` internal
  marker system (includes ability to change the style and level on the
  fly).
- change `_annotate.mk_marker()` -> `mk_maker_path()` and expect caller
  to wrap in a `QGraphicsPathItem` if needed.
2021-09-06 09:28:10 -04:00
Tyler Goodlet afcb323c49 Use `QGraphicsPathItem` for marker, add line hide method 2021-09-06 09:28:10 -04:00
Tyler Goodlet 45d6682ae0 Update entry count on position msgs, draft a composite position info type 2021-09-06 09:28:10 -04:00
Tyler Goodlet ff6ac6ba4f Add label location description param for graphics path anchor 2021-09-06 09:28:10 -04:00
Tyler Goodlet d21112dcd7 Drop the open ctx mng; add wip pp label 2021-09-06 09:28:10 -04:00
Tyler Goodlet 69091a894f Move marker label anchor to anchors mod 2021-09-06 09:28:10 -04:00
Tyler Goodlet e58a980786 Move all anchor funcs to new mod 2021-09-06 09:28:10 -04:00
Tyler Goodlet 94d3f67707 Move marker level-line-positioning anchor to new module 2021-09-06 09:28:10 -04:00
Tyler Goodlet 3aab6d67e9 Use label anchor 2021-09-06 09:28:10 -04:00
Tyler Goodlet 791fd23524 Remove `LevelLine.add_label()`, add dynamic pp marker label 2021-09-06 09:28:10 -04:00
Tyler Goodlet 62517c1662 Add user defined anchor support to label; reorg mod 2021-09-06 09:28:10 -04:00
goodboy 86cb8421d9
Merge pull request #218 from pikers/paper_pp_tracking
Paper pp tracking
2021-09-06 09:27:38 -04:00
Tyler Goodlet 0dc18598fb Add a client side order dialog type for tracking flows in the UI 2021-09-05 13:59:40 -04:00
Tyler Goodlet bd754b740d Only re-calc avg pp price on pp size increases 2021-09-05 13:59:40 -04:00
Tyler Goodlet 62dd327ef3 Drop `_graphics` subpkg; flat is better then nested 2021-09-05 13:59:40 -04:00
Tyler Goodlet 449c4210e4 Add per session paper position tracking
Generate and maintain position messages in the paper engine for each
`pikerd` session. We no longer tear down the engine on each client
disconnect. Ensure -ve size on sells to make the math work.
2021-09-05 13:59:40 -04:00
Tyler Goodlet 908678da84 Add more futes, add in order status comments 2021-09-05 13:59:40 -04:00
Tyler Goodlet 1c59a01a78 Make subplot proportion slightly larger 2021-09-05 13:59:40 -04:00
Tyler Goodlet fd5c72f97d WIP position market offscreen nav 2021-09-05 13:59:40 -04:00
goodboy ad174c5c21
Merge pull request #204 from pikers/ib_adhoc_derivs
Ib adhoc derivs search
2021-09-02 12:57:12 -04:00
Tyler Goodlet d3838c2a8b Use built-in type generics 2021-09-02 12:55:10 -04:00
goodboy 07e35d3ff5
Merge pull request #217 from pikers/hot_fix_cache_event_is_none
Only set event if entry still exists
2021-09-02 12:52:27 -04:00
Tyler Goodlet eb5762d912 Add adhoc-symbols search for ib
This gives us fast search over a known set of symbols you can't search
for with the api such as futures and commodities contracts.

Toss in a new client method to lookup contract details
`Client.con_deats()` and avoid calling it for now from `.search_stock()`
for speed; it seems originally we were doing the 2nd lookup due to weird
suffixes in the `.primaryExchange` which we can just discard.
2021-09-02 10:55:37 -04:00
Tyler Goodlet 2227721dac Only set event if entry still exists 2021-09-02 10:52:21 -04:00
Tyler Goodlet 3dad779c90 Add commented catch to skip backpressure errors wen debugging 2021-09-01 10:26:49 -04:00
Tyler Goodlet d940957455 Support account passthrough in `.submit_limit()` 2021-09-01 10:26:49 -04:00
Tyler Goodlet ffbfd187ad Raise cache miss on a disconnected ib client 2021-09-01 10:26:49 -04:00
Tyler Goodlet c6aa867c9b Add more futes, add in order status comments 2021-09-01 10:26:49 -04:00
goodboy 37d94fbb28
Merge pull request #212 from pikers/feed_caching
Feed caching
2021-09-01 10:25:49 -04:00
Tyler Goodlet 4527d4a677 Allocate an event per context 2021-09-01 10:17:03 -04:00
Tyler Goodlet 26cb7aa660 Drop tractor stream shielding use 2021-09-01 09:03:55 -04:00
Tyler Goodlet 2df16e11ed Re-implement client caching using `maybe_open_ctx` 2021-09-01 09:01:25 -04:00
Tyler Goodlet c3682348fe Use the actor's service nursery instead
In order to ensure the lifetime of the feed can in fact be kept open
until the last consumer task has completed we need to maintain
a lifetime which is hierarchically greater then all consumer tasks.

This solution is somewhat hacky but seems to work well: we just use the
`tractor` actor's "service nursery" (the one normally used to invoke rpc
tasks) to launch the task which will start and keep open the target
cached async context manager. To make this more "proper" we may want to
offer a "root nursery" in all piker actors that is exposed through some
singleton api or even introduce a public api for it into `tractor`
directly.
2021-08-31 12:46:47 -04:00
Tyler Goodlet 1184a4d88e Cache sample step streams per actor 2021-08-31 09:28:22 -04:00
Tyler Goodlet bbcce0cab6 Facepalm^2: pass through kwargs 2021-08-30 18:04:19 -04:00
Tyler Goodlet cae7f486e4 Revert "Lol, don't use `maybe_open_feed()` for now, it's totally borked..."
Think this was fixed by passing through `**kwargs` in
`maybe_open_feed()`, the shielding for fsp respawns wasn't being
properly passed through..

This reverts commit 2f1455d423.
2021-08-30 17:55:10 -04:00
Tyler Goodlet ff322ae7be Re-impl ctx-mng caching using `trio.Nursery.start()`
Maybe i've finally learned my lesson that exit stacks and per task ctx
manager caching is just not trionic.. Use the approach we've taken for
the daemon service manager as well: create a process global nursery for
each unique ctx manager we wish to cache and simply tear it down when
the number of consumers goes to zero.

This seems to resolve all prior issues and gets us error-free cached
feeds!
2021-08-30 17:54:43 -04:00
Tyler Goodlet 2f1455d423 Lol, don't use `maybe_open_feed()` for now, it's totally borked... 2021-08-26 17:04:59 -04:00
Tyler Goodlet 2a9d24ccac Remove dead OHLC index consumers from subs list on error 2021-08-26 17:04:59 -04:00
Tyler Goodlet fe0d66e847 Drop removed module import 2021-08-26 17:04:59 -04:00
Tyler Goodlet 1e42f58478 Add pause/resume feed api, delegate to msg stream for broadcast api 2021-08-26 17:04:59 -04:00
Tyler Goodlet 2f5abaa47a Add njs token bucket gist url 2021-08-26 17:04:59 -04:00
Tyler Goodlet c8e320849a Add super basic support for data feed "pausing" 2021-08-26 17:04:59 -04:00
Tyler Goodlet 0c9516051b TO SQUASH cached ctx. 2021-08-26 17:04:59 -04:00
Tyler Goodlet 71b50fdae8 Use broadcast chan for order client and avoid chan repacking 2021-08-26 17:04:59 -04:00