Merged in trim_account_name_fix (pull request #105)
Trimmed account name from fill record.
This commit is contained in:
commit
bfef852de7
1 file changed
+5
-3
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <unordered_map>
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
|
||||
namespace bts {
|
||||
namespace orderman {
|
||||
@@ -123,10 +124,11 @@ void OrderManager::on_fill_recovery(
|
||||
update.events->size());
|
||||
me->state = State::WAIT_ORDERS;
|
||||
|
||||
for (auto const &ev : *(update.events))
|
||||
me->services_data.limiter.add(*ev.security, ev.fill.account(),
|
||||
ev.fill.side(),
|
||||
for (auto const &ev : *(update.events)) {
|
||||
auto trimmed_account_name = boost::algorithm::trim_copy(ev.fill.account());
|
||||
me->services_data.limiter.add(*ev.security, trimmed_account_name,ev.fill.side(),
|
||||
Quantity(ev.fill.last_shares()));
|
||||
}
|
||||
|
||||
me->stored_order_sub = subscribe<StoredOrderEvent>(
|
||||
[this](auto const &orders) { this->on_order_recovery(orders); });
|
||||
|
||||
Reference in new issue
Block a user