SPARK-1195 - GLBX spreas are now formatted by their Security Description

This commit is contained in:
Jake Norbut committed 2018-06-04 10:41:59 -05:00
1 parent c3fdf8cb4f
commit f69ec8d32b
1 file changed
+4 -5
@@ -36,11 +36,10 @@ namespace bts.api {
switch (security.ContractCase) {
case ContractOneofCase.Future: return format_future(security.Symbol, security.Future);
case ContractOneofCase.Spread:
if (security.HasGlbx && security.Glbx.SecurityDesc.Contains(":")) {
try {
if (GlbxSecurityFormatter.FormatSpread(security, out string result))
return result;
} catch { }
if (security.HasGlbx) {
// In case we ever bring it back, pretty printed spread names can be found here:
// GlbxSecurityFormatter.FormatSpread(security, out string result)
return security.Glbx.SecurityDesc;
}
return string.Join("", _format_future_legs(SecurityHelper.get_flat_future_legs(security.Spread.Legs)));
case ContractOneofCase.Synthetic: return security.Synthetic.Name;