pikers / piker

(e2e) foss trading for non-tinas
GNU Affero General Public License v3.0
103 stars 17 forks source link

`PpTable`s #361

Closed goodboy closed 2 years ago

goodboy commented 2 years ago

Reworks the piker.pp apis to include a new open_pps() context manager which delivers a PpTable, a type that allows real-time incremental management of position updates from backend transaction records.

This more or less deprecates the previous update_pps_conf() routine.


In follow up,

both moved to #345. ~- [ ] we should add support for immediate config file (ledger or pps.toml) writing likely via the trio async file IO apis which use a bg thread to avoid main thread latency.~ ~- [ ] probably adjust the PpTable.dump_active() output to be the open and closed Position object dicts and have a seperate method which generates the toml-ready "entries" dict for the pps.toml?~