piker/piker
Tyler Goodlet 5cefe8bcdb `deribit.feed`: fix "trade" event streaming
The main change needed to make `piker.data.feed._FeedsBus` work was
to correctly format the `'trade'` msgs with the (new schema) expected
`'ticks': list[dict]` field which,
- we compute the `piker` quote-msg-`dict` from the (now directly proxied through)
  `cryptofeed.types.Trade`'s fields inside the body of `stream_quotes()`.
- similarly, move the `'l1'` msg processing, **out of** the `asyncio`-side
  `_l1()` callback (defined as a closure in `.api.aio_price_feed_relay()`
  and passed to the `cryptofeed.FeedHandler`) and instead mod the
  callback to simply pass through the `.types.L1Book` ref directly to
  the `piker`/`trio` side task for conversion.

In support of all that,
- mask-to-drop the alt-branch to wait on a first rt event when the
  `cryptofeed.LastTradesResult.trades: list[Trade]` is empty; doesn't
  seem like this ever even happens?
- add a buncha typing, comments and doc-strs to the routines in
  `.deribit.api` including notes on where we can choose to mod the
  `.bs_fqme` for our eventually preferred `piker` style format.
- simplify some nested `@acm` enters to the new single `async with
  <tuple>)` style.
- be particularly pedantic about typing
  `tractor.to_asyncio.LinkedTaskChannel`
- bit of pep8 line-spacing fixes in `.venues`.
2024-11-22 14:58:30 -05:00
..
accounting Allow `MktPair.from/to_msg()` to still do `.dst: str` for fsp flumes 2023-12-06 17:09:52 -05:00
brokers `deribit.feed`: fix "trade" event streaming 2024-11-22 14:58:30 -05:00
clearing .clearing._ems: Don't require `first_quote['last']` 2024-11-13 13:50:43 +00:00
cli Updated tractor method name. 2024-08-23 18:06:05 +00:00
data `.data._sampling`: warn about subscriber-less msgs 2024-11-19 21:09:09 -05:00
fsp Make `fsp.cascade()` expect src/dst `Flume`s 2023-12-06 17:53:35 -05:00
service Drop `.cancel_actor()` from `maybe_spawn_daemon()` 2024-08-21 17:37:40 +00:00
storage Ignore non-`.parquet` (suffixed) paths for now during tsdb fs-indexing 2024-11-19 21:39:02 -05:00
testing Pass a config `tmp_dir: Path` to the runtime when testing 2023-03-09 15:37:43 -05:00
toolz Delegate `.toolz.open_crash_handler()` to `tractor.devx` 2024-01-16 10:26:38 -05:00
tsp Refine history gap/termination signalling 2024-11-19 16:58:06 -05:00
ui Port all `.ui*` submods to new `.ui.qt` imports 2024-05-01 14:33:10 -04:00
watchlists Add license headers to pertinent files 2020-11-06 12:23:14 -05:00
__init__.py Start `piker.service` sub-package 2023-03-09 15:37:42 -05:00
_cacheables.py Move `._cacheables.open_cached_client()` into `.brokers` pkg mod 2023-06-27 13:41:47 -04:00
calc.py Lul, adhere to returning `str`s in `humanize()` 2022-01-25 07:57:01 -05:00
config.py `.config`: don't hack the user config dir if user is 'root' and sudo was NOT used.. 2023-12-22 21:41:51 -05:00
log.py Add `.log.mk_repr()` to create `reprlib.Repr`s 2024-11-19 21:05:16 -05:00
types.py Impl a sane (with nesting) `.types.Struct.pformat()` 2024-01-17 15:50:27 -05:00