diff --git a/src/client/spark/Modules/Market/MarketView/MarketViewColumnType.cs b/src/client/spark/Modules/Market/MarketView/MarketViewColumnType.cs index 5f70ed99c..a8b9472e8 100644 --- a/src/client/spark/Modules/Market/MarketView/MarketViewColumnType.cs +++ b/src/client/spark/Modules/Market/MarketView/MarketViewColumnType.cs @@ -36,6 +36,7 @@ namespace mbts.spark { Gamma, Vega, Theta, - Rho + Rho, + Currency } } diff --git a/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs b/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs index 0babeee67..4e211b4f7 100644 --- a/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs +++ b/src/client/spark/Modules/Market/MarketView/MarketViewRow.cs @@ -207,6 +207,7 @@ public SecurityMD security_md { get; } public SecurityImmutable security => security_md.security; public uint security_key => security_md.security.Id; + public string currency => security_md.security.Currency; public bool inside_bids => _inside_bids.value; public bool inside_asks => _inside_asks.value; diff --git a/src/client/spark/Modules/Market/MarketView/MarketViewSettings.cs b/src/client/spark/Modules/Market/MarketView/MarketViewSettings.cs index cfbe728cc..7bb7094ab 100644 --- a/src/client/spark/Modules/Market/MarketView/MarketViewSettings.cs +++ b/src/client/spark/Modules/Market/MarketView/MarketViewSettings.cs @@ -93,6 +93,7 @@ namespace bts.shell.market_view { static class DefaultColumns { public static GridColumnSettings security => _mk(Columns.Security, ColHeader.Security, ColWidth.Security, h_align: HorizontalAlignment.Left); + public static GridColumnSettings currency => _mk(Columns.Currency, ColHeader.Currency, ColWidth.Currency, h_align: HorizontalAlignment.Left, is_visible: false); public static GridColumnSettings volume => _mk(Columns.Volume, ColHeader.Volume, ColWidth.Volume, h_align: HorizontalAlignment.Left); public static GridColumnSettings last => _mk(Columns.Last, ColHeader.Last, ColWidth.Price, h_align: HorizontalAlignment.Left); public static GridColumnSettings last_from_spread => _mk(Columns.LastSpd, "S", ColWidth.Price, is_visible: false, h_align: HorizontalAlignment.Left); diff --git a/src/client/spark/Modules/Market/MarketView/MarketViewVM.cs b/src/client/spark/Modules/Market/MarketView/MarketViewVM.cs index d860e9cc6..226d4e515 100644 --- a/src/client/spark/Modules/Market/MarketView/MarketViewVM.cs +++ b/src/client/spark/Modules/Market/MarketView/MarketViewVM.cs @@ -98,6 +98,7 @@ namespace mbts.spark { _sec_meta_store = sec_meta_store; _settings_hub = settings_hub; security_filter = new RegexFilterVM(r => r.security.ToString(), nameof(Row.security)); + currency_filter =new RegexFilterVM(r => r.currency, nameof(Row.currency)); // rows _wrapped_rows = _rows.WrapSelector(r => r.security_md, s => { var r = new Row(_bus, s, _orders_model, _position_model); @@ -122,6 +123,7 @@ namespace mbts.spark { var price_converter = new TickDisplayConverter(); add_col(ColKey.Security, r => r.security.ToString(), nameof(Row.security), security_filter, FilterType.Regex, ColWidth.Security); + add_col(ColKey.Currency, r => r.currency, nameof(Row.currency), currency_filter, FilterType.Regex, ColWidth.Currency); add_col(ColKey.Volume, r => r.volume_text, nameof(Row.volume), volume_filter, FilterType.ULongMinMax, ColWidth.Volume); // last @@ -387,6 +389,7 @@ namespace mbts.spark { internal OrdersModel orders_model => _orders_model; public IDataGridColumnPersistentFilter security_filter { get; } + public IDataGridColumnPersistentFilter currency_filter { get; } public IDataGridColumnPersistentFilter bid_price_filter { get; } = new DoubleMinMax(r => r.bid_price, nameof(Row.bid_price)); public IDataGridColumnPersistentFilter bid_qty_filter { get; } = new DoubleMinMax(r => r.bid_qty_display, nameof(Row.bid_qty_display)); public IDataGridColumnPersistentFilter dbid_qty_filter { get; } = new DoubleMinMax(r => r.dbid_qty_display, nameof(Row.dbid_qty_display)); diff --git a/src/client/spark/view/Controls/DIYGrid/Columns/ColumnBase.cs b/src/client/spark/view/Controls/DIYGrid/Columns/ColumnBase.cs index 96c5ec0aa..75849d9b0 100644 --- a/src/client/spark/view/Controls/DIYGrid/Columns/ColumnBase.cs +++ b/src/client/spark/view/Controls/DIYGrid/Columns/ColumnBase.cs @@ -26,6 +26,7 @@ public const double Account = 62, CheckMark = 42, + Currency = 54, Exchange = 66, FillKey = 68, OrderKey = 78, @@ -107,6 +108,7 @@ AvgCost = "Avg Cost", AvgFilled = "Avg Filled", AttachedTargetOrderKey = "Attached Target Key", + Currency = "Currency", Exchange = "Exchange", Expiration = "Exp", FillKey = "Fill Key",