Limiter does not use StaticLimiter anymore because Deribit and Options are included in Risk enforcement now
This commit is contained in:
1 parent
2121ce2841
commit
e14b1e0b07
1 file changed
-8
@@ -52,7 +52,6 @@ struct StaticLimiter {
|
||||
struct Limiter::PImpl {
|
||||
std::map<uint32_t, api::Security const *> sec_map;
|
||||
std::unique_ptr<LimitStore> limit_store;
|
||||
StaticLimiter s_limiter = {};
|
||||
PImpl()
|
||||
: sec_map(), limit_store(std::make_unique<LimitStore>(
|
||||
bts::api::admin::AdminData(), sec_map)) {}
|
||||
@@ -151,10 +150,6 @@ Limiter::LimiterQueryResult Limiter::can_send_new_order(
|
||||
api::Security const &security,
|
||||
api::Side side,
|
||||
Quantity quantity) {
|
||||
if (me->s_limiter.use_static) {
|
||||
return me->s_limiter.can_send_new_order(
|
||||
account_id, security, side, quantity);
|
||||
}
|
||||
LimiterQueryResult rv = me->limit_store->can_send_new_order(
|
||||
account_id, security, side, quantity);
|
||||
if (rv.result == Limiter::NO_SUCH_SECURITY) {
|
||||
@@ -170,9 +165,6 @@ Limiter::LimiterQueryResult Limiter::can_update_order(
|
||||
api::Side side,
|
||||
Quantity from,
|
||||
Quantity to) {
|
||||
if (me->s_limiter.use_static) {
|
||||
return me->s_limiter.can_send_new_order(account_id, security, side, to);
|
||||
}
|
||||
LimiterQueryResult rv;
|
||||
if (from == to)
|
||||
rv.result = Limiter::OK;
|
||||
|
||||
Reference in new issue
Block a user