improvement (cli): Add spot & option to sec type choices

This commit is contained in:
John Colvin committed 2023-04-14 17:07:25 +00:00
1 parent 74be3ec9b9
commit c2eaf00aaa
1 file changed
+6 -1
@@ -7,14 +7,19 @@ namespace bts::cmds::md {
EnumOptionNames<api::SecurityType> SecurityTypeOption::names() {
return {
NAME_PAIR(api::SECURITYTYPE_FUTURE), NAME_PAIR(api::SECURITYTYPE_SPREAD),
NAME_PAIR(api::SECURITYTYPE_STOCK), NAME_PAIR(api::SECURITYTYPE_FUTURE),
NAME_PAIR(api::SECURITYTYPE_OPTION), NAME_PAIR(api::SECURITYTYPE_SPREAD),
NAME_PAIR(api::SECURITYTYPE_SYNTHETIC)};
}
std::string SecurityTypeOption::name(api::SecurityType venue) {
switch (venue) {
case api::SECURITYTYPE_STOCK:
return "spot";
case api::SECURITYTYPE_FUTURE:
return "future";
case api::SECURITYTYPE_OPTION:
return "option";
case api::SECURITYTYPE_SPREAD:
return "spread";
case api::SECURITYTYPE_SYNTHETIC: