ib: Oof, right need to create ledger entries too..

account_tests
Tyler Goodlet 2023-07-26 14:55:17 -04:00
parent 7802febd20
commit f1289ccce2
1 changed files with 2 additions and 3 deletions

View File

@ -857,10 +857,9 @@ async def emit_pp_update(
ledger: dict = ledgers[acctid] ledger: dict = ledgers[acctid]
# NOTE: don't override flex/previous entries with new API # NOTE: don't override flex/previous entries with new API
# ones, just update with new fields! # ones, just update with new fields or create new entry.
for tid, tdict in trades_by_id.items(): for tid, tdict in trades_by_id.items():
# ledger.setdefault(tid, {}).update(tdict) ledger.setdefault(tid, {}).update(tdict)
ledger[tid].update(tdict)
# generate pp msgs and cross check with ib's positions data, relay # generate pp msgs and cross check with ib's positions data, relay
# re-formatted pps as msgs to the ems. # re-formatted pps as msgs to the ems.