Fixed the reconcile issue where if the security existed in multiple accounts it was getting surpressed in one

This commit is contained in:
taha afzal committed 2022-07-11 13:27:10 -04:00
1 parent d98fb399a8
commit 846ecfa776
3 files changed
+20 -24

No files matched your search

+2 -1
View File
@@ -445,7 +445,8 @@ void OrderServiceServer::_on_exchange_position(
for (const auto &p : ev.position.total_exchange_positions) {
bts::api::orderman::RetrievedExchangePosition ret_pos = {};
std::string id = p.exchange_sec_desc + "_" +
bts::api::Venue_Name(ev.position.exchange);
bts::api::Venue_Name(ev.position.exchange) + "_" +
p.account_name;
ret_pos.set_record_id(id);
ret_pos.set_security_key(p.security == nullptr ? 0 : p.security->id());
ret_pos.set_security_resolved(p.security != nullptr);