67 lines
1.5 KiB
Protocol Buffer
67 lines
1.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
package optiver.exchange.risk_limits;
|
|
|
|
message RollingWindowLimit {
|
|
int32 limit = 1;
|
|
int32 window_in_seconds = 2;
|
|
}
|
|
|
|
message UserRiskLimits {
|
|
int64 max_outstanding_quantity = 1;
|
|
RollingWindowLimit message_rate_rolling_limit = 2;
|
|
}
|
|
|
|
message InstrumentRiskLimits {
|
|
int64 max_outstanding_quantity = 1;
|
|
double max_outstanding_amount = 2;
|
|
RollingWindowLimit order_quantity_rolling_limit = 3;
|
|
RollingWindowLimit order_amount_rolling_limit = 4;
|
|
}
|
|
|
|
// ------------------------------------------------------------
|
|
// Requests accepted by this service
|
|
// ------------------------------------------------------------
|
|
|
|
message GetUserRiskLimitsRequest {
|
|
int64 request_id = 1;
|
|
}
|
|
|
|
message GetUserRiskLimitsResponse {
|
|
int64 request_id = 1;
|
|
string error_message = 2;
|
|
|
|
UserRiskLimits user_risk_limits = 3;
|
|
}
|
|
|
|
message SetUserRiskLimitsRequest {
|
|
int64 request_id = 1;
|
|
UserRiskLimits user_risk_limits = 2;
|
|
}
|
|
|
|
message SetUserRiskLimitsResponse {
|
|
int64 request_id = 1;
|
|
string error_message = 2;
|
|
}
|
|
|
|
message GetInstrumentRiskLimitsRequest {
|
|
int64 request_id = 1;
|
|
}
|
|
|
|
message GetInstrumentRiskLimitsResponse {
|
|
int64 request_id = 1;
|
|
string error_message = 2;
|
|
|
|
map<string, InstrumentRiskLimits> risk_limits_by_instrument = 3;
|
|
}
|
|
|
|
message SetInstrumentRiskLimitsRequest {
|
|
int64 request_id = 1;
|
|
string instrument_symbol = 2;
|
|
InstrumentRiskLimits instrument_risk_limits = 3;
|
|
}
|
|
|
|
message SetInstrumentRiskLimitsResponse {
|
|
int64 request_id = 1;
|
|
string error_message = 2;
|
|
}
|