how_to_show_ur_pp: fixes for end-2-end order/position display #60
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "how_to_show_ur_pp"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Since apparently we can’t (yet) rely on our fqme (fully-qualified-market-endpoint)as consistent, e2e uniquely matchable keys for various
brokerd->emsd->chartdevent relaying, namely bc (at least from the.brokers.ibbackend..) the venue-token-part can change depending on,piker’s txn-ledger processing (again normally sorted by record time stamp) the last venue is likely not the primary; the fqme might not match that of the data feed’sMktPair.fqme.This problems becomes most obvious with our chart-trading UX where position markers/annotations might not be displayed on the correct live time-series view due to such a mismatch of
MktPair.fqme->BrokerPosition.fmqe.So instead (at least for now) just always relay through the broker’s own unique-mkt-ID schema (what we dub the
bs_mktid: backend-sys market ID) on a new (5b91b089)BrokerdPosition.bs_mktidfield to guarantee consistency at least on a per-broker reporting basis.Obviously ensure we always set it for
.ibemitted pp msgs (58654915) and ensure the.ui.order_modeprioritize the mkt-match on.bs_mktid(388a9a4d).Related/surrounding broker txn ledger improvements
(
b6d70d50,7b68444c) track and ignore any txn entries with invalid time-stamps (again such as can be recorded by the.ibbackend..) by refining the.accounting.calc.iter_by_dt()impl with a handy_invalid: listpassed to the embeddeddyn_parse_to_dt()closure which allows us to either,debug: boolparam is set OR,log.error()such txns to console.d67ace75avoid overridingAccount.pps: dictentries by again using abs_mktidto uniquely keyPositionentries in.accounting._pos.open_account()as delivered byAccount.pps.0e9b50de_ems: tolerate and warn on already popped execs,c609858fui._remote_ctl: shield remote rect removalsf5850fe5draft a ems/txn-ledger test which needs to eventually have checks on an example ledger file ensuring a position cleared over multiple venues (and thus currently mapping over multiple.fqmekeys in its txn set) renders to a single, unified and correct position measure/report.To start this is just a shell for the test, there's no checking logic yet.. put it as `test_accounting.test_ib_account_with_duplicated_mktids()`. The test is composed for now to be completely runtime-free using only the offline txn-ledger / symcache / account loading APIs, ideally we fill in the activated symbology-data-runtime cases once we figure a sane way to handle incremental symcache updates for backends like IB.. To actually fill the test out with real checks we still need to, - extract the problem account file from my ib.algopape into the test harness data. - pick some contracts with multiple fqmes despite a single bs_mktid and ensure they're aggregated as a single `Position` as well as, * ideally de-duplicating txns from the account file section for the mkt.. * warning appropriately about greater-then-one fqme for the bs_mktid and providing a way for the ledger re-writing to choose the appropriate `<venue>` as the "primary" when the data-symbology-runtime is up and possibly use it to incrementally update the IB symcache and store offline for next use?7c11bdb859to58654915ac