Added reset_position to PositionService

This commit is contained in:
taha afzal committed 2022-05-09 14:40:44 -04:00
1 parent 74e950d459
commit 904ef92ece
11 files changed
+151 -11

No files matched your search

+15 -2
View File
@@ -27,6 +27,7 @@
#include "lib/orderman/order_factory/DynamicOrderRegistry.h"
#include "lib/plugin/SparkServices.h"
#include "lib/plugin/plugin.h"
#include "lib/utils/PBUtils.h"
#include "lib/utils/bts_chrono.h"
#include "lib/utils/thread_manager.h"
#include "lib/utils/type_name.h"
@@ -311,7 +312,8 @@ void OrderServiceServer::on_orders(
}
LOG(OrderMan, Info,
"Publishing orders to the service API. Created {}, Updated {}",
"OrderServiceServer::on_orders publishing orders to the service API. "
"created {}, updated {}",
created.size(), updated.size());
me->publish_orders(&created, &updated, nullptr);
@@ -333,7 +335,8 @@ void OrderServiceServer::on_fills(
} else
updated.push_back(f);
}
LOG(OrderMan, Info, "OrderServiceServer::on_fills created: {} updated: {}",
created.size(), updated.size());
me->publish_fills(&created, &updated, nullptr);
}
@@ -407,6 +410,16 @@ void OrderServiceServer::get_registered_dynamic_order_types(
r(response);
}
void OrderServiceServer::manually_bust_all_fills(
const api::orderman::ManualBustParameters &p,
const api::Response<api::orderman::Response> &r) {
LOG(OrderMan, Info, "Received manually_bust_all_fills: {}",
utils::pb::to_string(p));
me->service_bridge->manually_bust_all_fills(p);
api::orderman::Response response;
r(response);
}
void OrderServiceServer::on_order_op_result(
OrderOpResultEvent const &op_result) {
auto it = me->in_flight_order_ops.find(op_result.req_id);