piker/piker
Tyler Goodlet aaf2dbcd79 Cast to `float` as needed from order-mode and ems
Since we're not quite yet using automatic typed msging from
`tractor`/`msgspec` (i.e. still manually decoding order ctl msgs from
built-in types..`dict`s still not `msgspec.Struct`) this adds the
appropriate typecasting ops to ensure the required precision is attained
prior to processing and/or submission to a brokerd backend service.

For the `.clearing._ems`,
- flip all `trigger_price` previously presumed to be `float` to just
  the field-identical `price: Decimal` and ensure we cast to `float`
  for any `trigger_price` usage, like before passing to `mk_check()`.

For `.ui.order_mode.OrderMode`,
- add a new `.curr_mkt: MktPair` convenience property to get the
  chart-active value.
- ensure we always use the `.curr_mkt.quantize() -> Decimal` before
  setting any IPC-msg's `.price` field!
- always cast `float(Order.price)` before use in setting line-levels.
- don't bother setting `Order.symbol` to a (now fully removed) `Symbol`
  instance since it's not really required-for-use anywhere; leaving it
  a `str` (per the type-annot) is fine for now?
2026-01-06 21:43:59 -05:00
..
accounting `polars.cumsum()` is now `.cum_sum()` 2026-01-06 16:10:36 -05:00
brokers `.binance.feed`: moar type fixes, drop `rapidfuzz` 2025-02-13 12:35:41 -05:00
clearing Cast to `float` as needed from order-mode and ems 2026-01-06 21:43:59 -05:00
cli Drop old/masked ahab-docker daemon starting 2026-01-06 19:33:23 -05:00
data Report with `{fqme!r}` in feed allocator for type clarity 2026-01-06 19:33:23 -05:00
fsp Make `fsp.cascade()` expect src/dst `Flume`s 2023-12-06 17:53:35 -05:00
service Ignore `ContextCancelled`s from non-mngr requests 2024-01-04 10:06:42 -05:00
storage `.storage.cli`: collect gap-markup-aids into `tf2aids: dict` prior to pause for introspection 2025-02-19 17:01:24 -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 Bump to (latest) `polars`, the `0.20.6x` series B) 2026-01-06 16:10:36 -05:00
ui Cast to `float` as needed from order-mode and ems 2026-01-06 21:43:59 -05: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.get_app_dir()`: link to `click`'s orig impl on GH 2026-01-06 19:33:23 -05:00
log.py Group bcast errors as `Sampler.bcast_errors` 2025-02-21 16:24:54 -05:00
types.py Impl a sane (with nesting) `.types.Struct.pformat()` 2024-01-17 15:50:27 -05:00