Change most sub-modules to use `get_logger(name=__name__)` for per-leaf-module `log` instances vs previous subpkg-level/shared refs. Primary changes, - import `get_[console_]logger()` from top-level `piker.log` across leaf mods. - change any `<subsys>._util.log` logger-instances as well (though this approach should no longer be used since it masks the endpoint module's emissions. Also, - add a defaulted `loglevel: str` param to all `open_trade_dialog()` endpoints, anticipating it being passed in by `.clearing`-engine. - call `get_console_log(level=loglevel, name=__name__)` in each trade dialog ep to enable per-`brokerd`-backend console writing. - drop `get_logger` from `.brokers.__all__` exports - fix type annotations: `str|None` vs `str | None` - add TODOs for, * comments in `._util` about multi-subsys logging * `.accounting.__init__` about console log setup (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code |
||
|---|---|---|
| .. | ||
| README.rst | ||
| __init__.py | ||
| _allocate.py | ||
| _ledger.py | ||
| _mktinfo.py | ||
| _pos.py | ||
| calc.py | ||
| cli.py | ||
README.rst
.accounting
A subsystem for transaction processing, storage and historical measurement.
.pnl
BEP, the break even price: the price at which liquidating a remaining position results in a zero PnL since the position was "opened" in the destination asset.
PPU: price-per-unit: the "average cost" (in cumulative mean terms) of the "entry" transactions which "make a position larger"; taking a profit relative to this price means that you will "make more profit then made prior" since the position was opened.