SPARK-373: order state enums to Title Case
This commit is contained in:
1 parent
e0c31e8749
commit
55f67cd54b
2 files changed
+2
-1
No files matched your search
@@ -36,6 +36,7 @@ namespace mbts.spark {
|
||||
public static string display_name(this IMessage order) => camel_to_title_case(order.Descriptor.Name);
|
||||
public static string order_type_display_name(CustomOrderDefinition.CustomOneofCase order_type) => order_type_display_name(order_type.ToString());
|
||||
public static string order_type_display_name(string algo_name) => camel_to_title_case(Regex.Replace(algo_name, "Order", string.Empty, RegexOptions.IgnoreCase));
|
||||
public static string order_state_display_name(bts.api.orderman2.OrderStatus s) => camel_to_title_case(s.ToString());
|
||||
public static long filled(OrderBookEntry order) => order.Fills.Sum(fill => fill.Size);
|
||||
public static double fill_ratio(OrderBookEntry order) {
|
||||
var size = order.order().Size;
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace mbts.spark
|
||||
}
|
||||
|
||||
public string status {
|
||||
get => _order.State.Status.ToString();
|
||||
get => OrderUtils.order_state_display_name(_order.State.Status);
|
||||
set => ignore();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user