#![cfg_attr(rustfmt, rustfmt::skip)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AdvSide<'a> {
Buy,
Sell,
Cross,
Trade,
Unrecognized(&'a str),
}
impl<'a> AdvSide<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"B" => Self::Buy,
"S" => Self::Sell,
"X" => Self::Cross,
"T" => Self::Trade,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Buy => "B",
Self::Sell => "S",
Self::Cross => "X",
Self::Trade => "T",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for AdvSide<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AdvTransType<'a> {
New,
Cancel,
Replace,
Unrecognized(&'a str),
}
impl<'a> AdvTransType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"N" => Self::New,
"C" => Self::Cancel,
"R" => Self::Replace,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "N",
Self::Cancel => "C",
Self::Replace => "R",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for AdvTransType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CommType<'a> {
PerUnit,
Percent,
Absolute,
PercentageWaivedCashDiscount,
PercentageWaivedEnhancedUnits,
PointsPerBondOrContract,
Unrecognized(&'a str),
}
impl<'a> CommType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::PerUnit,
"2" => Self::Percent,
"3" => Self::Absolute,
"4" => Self::PercentageWaivedCashDiscount,
"5" => Self::PercentageWaivedEnhancedUnits,
"6" => Self::PointsPerBondOrContract,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::PerUnit => "1",
Self::Percent => "2",
Self::Absolute => "3",
Self::PercentageWaivedCashDiscount => "4",
Self::PercentageWaivedEnhancedUnits => "5",
Self::PointsPerBondOrContract => "6",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for CommType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ExecInst<'a> {
NotHeld,
Work,
GoAlong,
OverTheDay,
Held,
ParticipateDoNotInitiate,
StrictScale,
TryToScale,
StayOnBidSide,
StayOnOfferSide,
NoCross,
OkToCross,
CallFirst,
PercentOfVolume,
DoNotIncrease,
DoNotReduce,
AllOrNone,
ReinstateOnSystemFailure,
InstitutionsOnly,
ReinstateOnTradingHalt,
CancelOnTradingHalt,
LastPeg,
MidPricePeg,
NonNegotiable,
OpeningPeg,
MarketPeg,
CancelOnSystemFailure,
PrimaryPeg,
Suspend,
CustomerDisplayInstruction,
Netting,
PegToVwap,
TradeAlong,
TryToStop,
CancelIfNotBest,
TrailingStopPeg,
StrictLimit,
IgnorePriceValidityChecks,
PegToLimitPrice,
WorkToTargetStrategy,
Unrecognized(&'a str),
}
impl<'a> ExecInst<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::NotHeld,
"2" => Self::Work,
"3" => Self::GoAlong,
"4" => Self::OverTheDay,
"5" => Self::Held,
"6" => Self::ParticipateDoNotInitiate,
"7" => Self::StrictScale,
"8" => Self::TryToScale,
"9" => Self::StayOnBidSide,
"0" => Self::StayOnOfferSide,
"A" => Self::NoCross,
"B" => Self::OkToCross,
"C" => Self::CallFirst,
"D" => Self::PercentOfVolume,
"E" => Self::DoNotIncrease,
"F" => Self::DoNotReduce,
"G" => Self::AllOrNone,
"H" => Self::ReinstateOnSystemFailure,
"I" => Self::InstitutionsOnly,
"J" => Self::ReinstateOnTradingHalt,
"K" => Self::CancelOnTradingHalt,
"L" => Self::LastPeg,
"M" => Self::MidPricePeg,
"N" => Self::NonNegotiable,
"O" => Self::OpeningPeg,
"P" => Self::MarketPeg,
"Q" => Self::CancelOnSystemFailure,
"R" => Self::PrimaryPeg,
"S" => Self::Suspend,
"U" => Self::CustomerDisplayInstruction,
"V" => Self::Netting,
"W" => Self::PegToVwap,
"X" => Self::TradeAlong,
"Y" => Self::TryToStop,
"Z" => Self::CancelIfNotBest,
"a" => Self::TrailingStopPeg,
"b" => Self::StrictLimit,
"c" => Self::IgnorePriceValidityChecks,
"d" => Self::PegToLimitPrice,
"e" => Self::WorkToTargetStrategy,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::NotHeld => "1",
Self::Work => "2",
Self::GoAlong => "3",
Self::OverTheDay => "4",
Self::Held => "5",
Self::ParticipateDoNotInitiate => "6",
Self::StrictScale => "7",
Self::TryToScale => "8",
Self::StayOnBidSide => "9",
Self::StayOnOfferSide => "0",
Self::NoCross => "A",
Self::OkToCross => "B",
Self::CallFirst => "C",
Self::PercentOfVolume => "D",
Self::DoNotIncrease => "E",
Self::DoNotReduce => "F",
Self::AllOrNone => "G",
Self::ReinstateOnSystemFailure => "H",
Self::InstitutionsOnly => "I",
Self::ReinstateOnTradingHalt => "J",
Self::CancelOnTradingHalt => "K",
Self::LastPeg => "L",
Self::MidPricePeg => "M",
Self::NonNegotiable => "N",
Self::OpeningPeg => "O",
Self::MarketPeg => "P",
Self::CancelOnSystemFailure => "Q",
Self::PrimaryPeg => "R",
Self::Suspend => "S",
Self::CustomerDisplayInstruction => "U",
Self::Netting => "V",
Self::PegToVwap => "W",
Self::TradeAlong => "X",
Self::TryToStop => "Y",
Self::CancelIfNotBest => "Z",
Self::TrailingStopPeg => "a",
Self::StrictLimit => "b",
Self::IgnorePriceValidityChecks => "c",
Self::PegToLimitPrice => "d",
Self::WorkToTargetStrategy => "e",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for ExecInst<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum HandlInst<'a> {
AutomatedExecutionNoIntervention,
AutomatedExecutionInterventionOk,
ManualOrder,
Unrecognized(&'a str),
}
impl<'a> HandlInst<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::AutomatedExecutionNoIntervention,
"2" => Self::AutomatedExecutionInterventionOk,
"3" => Self::ManualOrder,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::AutomatedExecutionNoIntervention => "1",
Self::AutomatedExecutionInterventionOk => "2",
Self::ManualOrder => "3",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for HandlInst<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SecurityIDSource<'a> {
Cusip,
Sedol,
Quik,
IsinNumber,
RicCode,
IsoCurrencyCode,
IsoCountryCode,
ExchangeSymbol,
ConsolidatedTapeAssociation,
BloombergSymbol,
Wertpapier,
Dutch,
Valoren,
Sicovam,
Belgian,
Common,
ClearingHouse,
IsdaFpMlSpecification,
OptionPriceReportingAuthority,
Unrecognized(&'a str),
}
impl<'a> SecurityIDSource<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Cusip,
"2" => Self::Sedol,
"3" => Self::Quik,
"4" => Self::IsinNumber,
"5" => Self::RicCode,
"6" => Self::IsoCurrencyCode,
"7" => Self::IsoCountryCode,
"8" => Self::ExchangeSymbol,
"9" => Self::ConsolidatedTapeAssociation,
"A" => Self::BloombergSymbol,
"B" => Self::Wertpapier,
"C" => Self::Dutch,
"D" => Self::Valoren,
"E" => Self::Sicovam,
"F" => Self::Belgian,
"G" => Self::Common,
"H" => Self::ClearingHouse,
"I" => Self::IsdaFpMlSpecification,
"J" => Self::OptionPriceReportingAuthority,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Cusip => "1",
Self::Sedol => "2",
Self::Quik => "3",
Self::IsinNumber => "4",
Self::RicCode => "5",
Self::IsoCurrencyCode => "6",
Self::IsoCountryCode => "7",
Self::ExchangeSymbol => "8",
Self::ConsolidatedTapeAssociation => "9",
Self::BloombergSymbol => "A",
Self::Wertpapier => "B",
Self::Dutch => "C",
Self::Valoren => "D",
Self::Sicovam => "E",
Self::Belgian => "F",
Self::Common => "G",
Self::ClearingHouse => "H",
Self::IsdaFpMlSpecification => "I",
Self::OptionPriceReportingAuthority => "J",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SecurityIDSource<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum IOIQltyInd<'a> {
Low,
Medium,
High,
Unrecognized(&'a str),
}
impl<'a> IOIQltyInd<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"L" => Self::Low,
"M" => Self::Medium,
"H" => Self::High,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Low => "L",
Self::Medium => "M",
Self::High => "H",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for IOIQltyInd<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum IOIQty<'a> {
Small,
Medium,
Large,
Unrecognized(&'a str),
}
impl<'a> IOIQty<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"S" => Self::Small,
"M" => Self::Medium,
"L" => Self::Large,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Small => "S",
Self::Medium => "M",
Self::Large => "L",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for IOIQty<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum IOITransType<'a> {
New,
Cancel,
Replace,
Unrecognized(&'a str),
}
impl<'a> IOITransType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"N" => Self::New,
"C" => Self::Cancel,
"R" => Self::Replace,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "N",
Self::Cancel => "C",
Self::Replace => "R",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for IOITransType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum LastCapacity<'a> {
Agent,
CrossAsAgent,
CrossAsPrincipal,
Principal,
Unrecognized(&'a str),
}
impl<'a> LastCapacity<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Agent,
"2" => Self::CrossAsAgent,
"3" => Self::CrossAsPrincipal,
"4" => Self::Principal,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Agent => "1",
Self::CrossAsAgent => "2",
Self::CrossAsPrincipal => "3",
Self::Principal => "4",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for LastCapacity<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MsgType<'a> {
Heartbeat,
TestRequest,
ResendRequest,
Reject,
SequenceReset,
Logout,
Ioi,
Advertisement,
ExecutionReport,
OrderCancelReject,
Logon,
News,
Email,
NewOrderSingle,
NewOrderList,
OrderCancelRequest,
OrderCancelReplaceRequest,
OrderStatusRequest,
AllocationInstruction,
ListCancelRequest,
ListExecute,
ListStatusRequest,
ListStatus,
AllocationInstructionAck,
DontKnowTrade,
QuoteRequest,
Quote,
SettlementInstructions,
MarketDataRequest,
MarketDataSnapshotFullRefresh,
MarketDataIncrementalRefresh,
MarketDataRequestReject,
QuoteCancel,
QuoteStatusRequest,
MassQuoteAcknowledgement,
SecurityDefinitionRequest,
SecurityDefinition,
SecurityStatusRequest,
SecurityStatus,
TradingSessionStatusRequest,
TradingSessionStatus,
MassQuote,
BusinessMessageReject,
BidRequest,
BidResponse,
ListStrikePrice,
XmlNonFix,
RegistrationInstructions,
RegistrationInstructionsResponse,
OrderMassCancelRequest,
OrderMassCancelReport,
NewOrderCross,
CrossOrderCancelReplaceRequest,
CrossOrderCancelRequest,
SecurityTypeRequest,
SecurityTypes,
SecurityListRequest,
SecurityList,
DerivativeSecurityListRequest,
DerivativeSecurityList,
NewOrderMultileg,
MultilegOrderCancelReplace,
TradeCaptureReportRequest,
TradeCaptureReport,
OrderMassStatusRequest,
QuoteRequestReject,
RfqRequest,
QuoteStatusReport,
QuoteResponse,
Confirmation,
PositionMaintenanceRequest,
PositionMaintenanceReport,
RequestForPositions,
RequestForPositionsAck,
PositionReport,
TradeCaptureReportRequestAck,
TradeCaptureReportAck,
AllocationReport,
AllocationReportAck,
ConfirmationAck,
SettlementInstructionRequest,
AssignmentReport,
CollateralRequest,
CollateralAssignment,
CollateralResponse,
CollateralReport,
CollateralInquiry,
NetworkCounterpartySystemStatusRequest,
NetworkCounterpartySystemStatusResponse,
UserRequest,
UserResponse,
CollateralInquiryAck,
ConfirmationRequest,
Unrecognized(&'a str),
}
impl<'a> MsgType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Heartbeat,
"1" => Self::TestRequest,
"2" => Self::ResendRequest,
"3" => Self::Reject,
"4" => Self::SequenceReset,
"5" => Self::Logout,
"6" => Self::Ioi,
"7" => Self::Advertisement,
"8" => Self::ExecutionReport,
"9" => Self::OrderCancelReject,
"A" => Self::Logon,
"B" => Self::News,
"C" => Self::Email,
"D" => Self::NewOrderSingle,
"E" => Self::NewOrderList,
"F" => Self::OrderCancelRequest,
"G" => Self::OrderCancelReplaceRequest,
"H" => Self::OrderStatusRequest,
"J" => Self::AllocationInstruction,
"K" => Self::ListCancelRequest,
"L" => Self::ListExecute,
"M" => Self::ListStatusRequest,
"N" => Self::ListStatus,
"P" => Self::AllocationInstructionAck,
"Q" => Self::DontKnowTrade,
"R" => Self::QuoteRequest,
"S" => Self::Quote,
"T" => Self::SettlementInstructions,
"V" => Self::MarketDataRequest,
"W" => Self::MarketDataSnapshotFullRefresh,
"X" => Self::MarketDataIncrementalRefresh,
"Y" => Self::MarketDataRequestReject,
"Z" => Self::QuoteCancel,
"a" => Self::QuoteStatusRequest,
"b" => Self::MassQuoteAcknowledgement,
"c" => Self::SecurityDefinitionRequest,
"d" => Self::SecurityDefinition,
"e" => Self::SecurityStatusRequest,
"f" => Self::SecurityStatus,
"g" => Self::TradingSessionStatusRequest,
"h" => Self::TradingSessionStatus,
"i" => Self::MassQuote,
"j" => Self::BusinessMessageReject,
"k" => Self::BidRequest,
"l" => Self::BidResponse,
"m" => Self::ListStrikePrice,
"n" => Self::XmlNonFix,
"o" => Self::RegistrationInstructions,
"p" => Self::RegistrationInstructionsResponse,
"q" => Self::OrderMassCancelRequest,
"r" => Self::OrderMassCancelReport,
"s" => Self::NewOrderCross,
"t" => Self::CrossOrderCancelReplaceRequest,
"u" => Self::CrossOrderCancelRequest,
"v" => Self::SecurityTypeRequest,
"w" => Self::SecurityTypes,
"x" => Self::SecurityListRequest,
"y" => Self::SecurityList,
"z" => Self::DerivativeSecurityListRequest,
"AA" => Self::DerivativeSecurityList,
"AB" => Self::NewOrderMultileg,
"AC" => Self::MultilegOrderCancelReplace,
"AD" => Self::TradeCaptureReportRequest,
"AE" => Self::TradeCaptureReport,
"AF" => Self::OrderMassStatusRequest,
"AG" => Self::QuoteRequestReject,
"AH" => Self::RfqRequest,
"AI" => Self::QuoteStatusReport,
"AJ" => Self::QuoteResponse,
"AK" => Self::Confirmation,
"AL" => Self::PositionMaintenanceRequest,
"AM" => Self::PositionMaintenanceReport,
"AN" => Self::RequestForPositions,
"AO" => Self::RequestForPositionsAck,
"AP" => Self::PositionReport,
"AQ" => Self::TradeCaptureReportRequestAck,
"AR" => Self::TradeCaptureReportAck,
"AS" => Self::AllocationReport,
"AT" => Self::AllocationReportAck,
"AU" => Self::ConfirmationAck,
"AV" => Self::SettlementInstructionRequest,
"AW" => Self::AssignmentReport,
"AX" => Self::CollateralRequest,
"AY" => Self::CollateralAssignment,
"AZ" => Self::CollateralResponse,
"BA" => Self::CollateralReport,
"BB" => Self::CollateralInquiry,
"BC" => Self::NetworkCounterpartySystemStatusRequest,
"BD" => Self::NetworkCounterpartySystemStatusResponse,
"BE" => Self::UserRequest,
"BF" => Self::UserResponse,
"BG" => Self::CollateralInquiryAck,
"BH" => Self::ConfirmationRequest,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Heartbeat => "0",
Self::TestRequest => "1",
Self::ResendRequest => "2",
Self::Reject => "3",
Self::SequenceReset => "4",
Self::Logout => "5",
Self::Ioi => "6",
Self::Advertisement => "7",
Self::ExecutionReport => "8",
Self::OrderCancelReject => "9",
Self::Logon => "A",
Self::News => "B",
Self::Email => "C",
Self::NewOrderSingle => "D",
Self::NewOrderList => "E",
Self::OrderCancelRequest => "F",
Self::OrderCancelReplaceRequest => "G",
Self::OrderStatusRequest => "H",
Self::AllocationInstruction => "J",
Self::ListCancelRequest => "K",
Self::ListExecute => "L",
Self::ListStatusRequest => "M",
Self::ListStatus => "N",
Self::AllocationInstructionAck => "P",
Self::DontKnowTrade => "Q",
Self::QuoteRequest => "R",
Self::Quote => "S",
Self::SettlementInstructions => "T",
Self::MarketDataRequest => "V",
Self::MarketDataSnapshotFullRefresh => "W",
Self::MarketDataIncrementalRefresh => "X",
Self::MarketDataRequestReject => "Y",
Self::QuoteCancel => "Z",
Self::QuoteStatusRequest => "a",
Self::MassQuoteAcknowledgement => "b",
Self::SecurityDefinitionRequest => "c",
Self::SecurityDefinition => "d",
Self::SecurityStatusRequest => "e",
Self::SecurityStatus => "f",
Self::TradingSessionStatusRequest => "g",
Self::TradingSessionStatus => "h",
Self::MassQuote => "i",
Self::BusinessMessageReject => "j",
Self::BidRequest => "k",
Self::BidResponse => "l",
Self::ListStrikePrice => "m",
Self::XmlNonFix => "n",
Self::RegistrationInstructions => "o",
Self::RegistrationInstructionsResponse => "p",
Self::OrderMassCancelRequest => "q",
Self::OrderMassCancelReport => "r",
Self::NewOrderCross => "s",
Self::CrossOrderCancelReplaceRequest => "t",
Self::CrossOrderCancelRequest => "u",
Self::SecurityTypeRequest => "v",
Self::SecurityTypes => "w",
Self::SecurityListRequest => "x",
Self::SecurityList => "y",
Self::DerivativeSecurityListRequest => "z",
Self::DerivativeSecurityList => "AA",
Self::NewOrderMultileg => "AB",
Self::MultilegOrderCancelReplace => "AC",
Self::TradeCaptureReportRequest => "AD",
Self::TradeCaptureReport => "AE",
Self::OrderMassStatusRequest => "AF",
Self::QuoteRequestReject => "AG",
Self::RfqRequest => "AH",
Self::QuoteStatusReport => "AI",
Self::QuoteResponse => "AJ",
Self::Confirmation => "AK",
Self::PositionMaintenanceRequest => "AL",
Self::PositionMaintenanceReport => "AM",
Self::RequestForPositions => "AN",
Self::RequestForPositionsAck => "AO",
Self::PositionReport => "AP",
Self::TradeCaptureReportRequestAck => "AQ",
Self::TradeCaptureReportAck => "AR",
Self::AllocationReport => "AS",
Self::AllocationReportAck => "AT",
Self::ConfirmationAck => "AU",
Self::SettlementInstructionRequest => "AV",
Self::AssignmentReport => "AW",
Self::CollateralRequest => "AX",
Self::CollateralAssignment => "AY",
Self::CollateralResponse => "AZ",
Self::CollateralReport => "BA",
Self::CollateralInquiry => "BB",
Self::NetworkCounterpartySystemStatusRequest => "BC",
Self::NetworkCounterpartySystemStatusResponse => "BD",
Self::UserRequest => "BE",
Self::UserResponse => "BF",
Self::CollateralInquiryAck => "BG",
Self::ConfirmationRequest => "BH",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MsgType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OrdStatus<'a> {
New,
PartiallyFilled,
Filled,
DoneForDay,
Canceled,
PendingCancel,
Stopped,
Rejected,
Suspended,
PendingNew,
Calculated,
Expired,
AcceptedForBidding,
PendingReplace,
Unrecognized(&'a str),
}
impl<'a> OrdStatus<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::New,
"1" => Self::PartiallyFilled,
"2" => Self::Filled,
"3" => Self::DoneForDay,
"4" => Self::Canceled,
"6" => Self::PendingCancel,
"7" => Self::Stopped,
"8" => Self::Rejected,
"9" => Self::Suspended,
"A" => Self::PendingNew,
"B" => Self::Calculated,
"C" => Self::Expired,
"D" => Self::AcceptedForBidding,
"E" => Self::PendingReplace,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "0",
Self::PartiallyFilled => "1",
Self::Filled => "2",
Self::DoneForDay => "3",
Self::Canceled => "4",
Self::PendingCancel => "6",
Self::Stopped => "7",
Self::Rejected => "8",
Self::Suspended => "9",
Self::PendingNew => "A",
Self::Calculated => "B",
Self::Expired => "C",
Self::AcceptedForBidding => "D",
Self::PendingReplace => "E",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for OrdStatus<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OrdType<'a> {
Market,
Limit,
Stop,
StopLimit,
WithOrWithout,
LimitOrBetter,
LimitWithOrWithout,
OnBasis,
PreviouslyQuoted,
PreviouslyIndicated,
ForexSwap,
Funari,
MarketIfTouched,
MarketWithLeftOverAsLimit,
PreviousFundValuationPoint,
NextFundValuationPoint,
Pegged,
Unrecognized(&'a str),
}
impl<'a> OrdType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Market,
"2" => Self::Limit,
"3" => Self::Stop,
"4" => Self::StopLimit,
"6" => Self::WithOrWithout,
"7" => Self::LimitOrBetter,
"8" => Self::LimitWithOrWithout,
"9" => Self::OnBasis,
"D" => Self::PreviouslyQuoted,
"E" => Self::PreviouslyIndicated,
"G" => Self::ForexSwap,
"I" => Self::Funari,
"J" => Self::MarketIfTouched,
"K" => Self::MarketWithLeftOverAsLimit,
"L" => Self::PreviousFundValuationPoint,
"M" => Self::NextFundValuationPoint,
"P" => Self::Pegged,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Market => "1",
Self::Limit => "2",
Self::Stop => "3",
Self::StopLimit => "4",
Self::WithOrWithout => "6",
Self::LimitOrBetter => "7",
Self::LimitWithOrWithout => "8",
Self::OnBasis => "9",
Self::PreviouslyQuoted => "D",
Self::PreviouslyIndicated => "E",
Self::ForexSwap => "G",
Self::Funari => "I",
Self::MarketIfTouched => "J",
Self::MarketWithLeftOverAsLimit => "K",
Self::PreviousFundValuationPoint => "L",
Self::NextFundValuationPoint => "M",
Self::Pegged => "P",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for OrdType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum Side<'a> {
Buy,
Sell,
BuyMinus,
SellPlus,
SellShort,
SellShortExempt,
Undisclosed,
Cross,
CrossShort,
CrossShortExempt,
AsDefined,
Opposite,
Subscribe,
Redeem,
Lend,
Borrow,
Unrecognized(&'a str),
}
impl<'a> Side<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Buy,
"2" => Self::Sell,
"3" => Self::BuyMinus,
"4" => Self::SellPlus,
"5" => Self::SellShort,
"6" => Self::SellShortExempt,
"7" => Self::Undisclosed,
"8" => Self::Cross,
"9" => Self::CrossShort,
"A" => Self::CrossShortExempt,
"B" => Self::AsDefined,
"C" => Self::Opposite,
"D" => Self::Subscribe,
"E" => Self::Redeem,
"F" => Self::Lend,
"G" => Self::Borrow,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Buy => "1",
Self::Sell => "2",
Self::BuyMinus => "3",
Self::SellPlus => "4",
Self::SellShort => "5",
Self::SellShortExempt => "6",
Self::Undisclosed => "7",
Self::Cross => "8",
Self::CrossShort => "9",
Self::CrossShortExempt => "A",
Self::AsDefined => "B",
Self::Opposite => "C",
Self::Subscribe => "D",
Self::Redeem => "E",
Self::Lend => "F",
Self::Borrow => "G",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for Side<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TimeInForce<'a> {
Day,
GoodTillCancel,
AtTheOpening,
ImmediateOrCancel,
FillOrKill,
GoodTillCrossing,
GoodTillDate,
AtTheClose,
Unrecognized(&'a str),
}
impl<'a> TimeInForce<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Day,
"1" => Self::GoodTillCancel,
"2" => Self::AtTheOpening,
"3" => Self::ImmediateOrCancel,
"4" => Self::FillOrKill,
"5" => Self::GoodTillCrossing,
"6" => Self::GoodTillDate,
"7" => Self::AtTheClose,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Day => "0",
Self::GoodTillCancel => "1",
Self::AtTheOpening => "2",
Self::ImmediateOrCancel => "3",
Self::FillOrKill => "4",
Self::GoodTillCrossing => "5",
Self::GoodTillDate => "6",
Self::AtTheClose => "7",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for TimeInForce<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum Urgency<'a> {
Normal,
Flash,
Background,
Unrecognized(&'a str),
}
impl<'a> Urgency<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Normal,
"1" => Self::Flash,
"2" => Self::Background,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Normal => "0",
Self::Flash => "1",
Self::Background => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for Urgency<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlType<'a> {
Regular,
Cash,
NextDay,
TPlus2,
TPlus3,
TPlus4,
Future,
WhenAndIfIssued,
SellersOption,
TPlus5,
Unrecognized(&'a str),
}
impl<'a> SettlType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Regular,
"1" => Self::Cash,
"2" => Self::NextDay,
"3" => Self::TPlus2,
"4" => Self::TPlus3,
"5" => Self::TPlus4,
"6" => Self::Future,
"7" => Self::WhenAndIfIssued,
"8" => Self::SellersOption,
"9" => Self::TPlus5,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Regular => "0",
Self::Cash => "1",
Self::NextDay => "2",
Self::TPlus2 => "3",
Self::TPlus3 => "4",
Self::TPlus4 => "5",
Self::Future => "6",
Self::WhenAndIfIssued => "7",
Self::SellersOption => "8",
Self::TPlus5 => "9",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SettlType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocTransType<'a> {
New,
Replace,
Cancel,
Unrecognized(&'a str),
}
impl<'a> AllocTransType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::New,
"1" => Self::Replace,
"2" => Self::Cancel,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "0",
Self::Replace => "1",
Self::Cancel => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for AllocTransType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PositionEffect<'a> {
Open,
Close,
Rolled,
Fifo,
Unrecognized(&'a str),
}
impl<'a> PositionEffect<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"O" => Self::Open,
"C" => Self::Close,
"R" => Self::Rolled,
"F" => Self::Fifo,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Open => "O",
Self::Close => "C",
Self::Rolled => "R",
Self::Fifo => "F",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for PositionEffect<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ProcessCode<'a> {
Regular,
SoftDollar,
StepIn,
StepOut,
SoftDollarStepIn,
SoftDollarStepOut,
PlanSponsor,
Unrecognized(&'a str),
}
impl<'a> ProcessCode<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Regular,
"1" => Self::SoftDollar,
"2" => Self::StepIn,
"3" => Self::StepOut,
"4" => Self::SoftDollarStepIn,
"5" => Self::SoftDollarStepOut,
"6" => Self::PlanSponsor,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Regular => "0",
Self::SoftDollar => "1",
Self::StepIn => "2",
Self::StepOut => "3",
Self::SoftDollarStepIn => "4",
Self::SoftDollarStepOut => "5",
Self::PlanSponsor => "6",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for ProcessCode<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocStatus {
Accepted,
BlockLevelReject,
AccountLevelReject,
Received,
Incomplete,
RejectedByIntermediary,
Unrecognized(i64),
}
impl AllocStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Accepted,
1 => Self::BlockLevelReject,
2 => Self::AccountLevelReject,
3 => Self::Received,
4 => Self::Incomplete,
5 => Self::RejectedByIntermediary,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Accepted => 0,
Self::BlockLevelReject => 1,
Self::AccountLevelReject => 2,
Self::Received => 3,
Self::Incomplete => 4,
Self::RejectedByIntermediary => 5,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocRejCode {
UnknownAccount,
IncorrectQuantity,
IncorrectAveragegPrice,
UnknownExecutingBrokerMnemonic,
CommissionDifference,
UnknownOrderId,
UnknownListId,
OtherSeeText,
IncorrectAllocatedQuantity,
CalculationDifference,
UnknownOrStaleExecId,
MismatchedData,
UnknownClOrdId,
WarehouseRequestRejected,
Unrecognized(i64),
}
impl AllocRejCode {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::UnknownAccount,
1 => Self::IncorrectQuantity,
2 => Self::IncorrectAveragegPrice,
3 => Self::UnknownExecutingBrokerMnemonic,
4 => Self::CommissionDifference,
5 => Self::UnknownOrderId,
6 => Self::UnknownListId,
7 => Self::OtherSeeText,
8 => Self::IncorrectAllocatedQuantity,
9 => Self::CalculationDifference,
10 => Self::UnknownOrStaleExecId,
11 => Self::MismatchedData,
12 => Self::UnknownClOrdId,
13 => Self::WarehouseRequestRejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::UnknownAccount => 0,
Self::IncorrectQuantity => 1,
Self::IncorrectAveragegPrice => 2,
Self::UnknownExecutingBrokerMnemonic => 3,
Self::CommissionDifference => 4,
Self::UnknownOrderId => 5,
Self::UnknownListId => 6,
Self::OtherSeeText => 7,
Self::IncorrectAllocatedQuantity => 8,
Self::CalculationDifference => 9,
Self::UnknownOrStaleExecId => 10,
Self::MismatchedData => 11,
Self::UnknownClOrdId => 12,
Self::WarehouseRequestRejected => 13,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum EmailType<'a> {
New,
Reply,
AdminReply,
Unrecognized(&'a str),
}
impl<'a> EmailType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::New,
"1" => Self::Reply,
"2" => Self::AdminReply,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "0",
Self::Reply => "1",
Self::AdminReply => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for EmailType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum EncryptMethod {
None,
Pkcs,
Des,
Pkcsdes,
Pgpdes,
Pgpdesmd5,
Pem,
Unrecognized(i64),
}
impl EncryptMethod {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::None,
1 => Self::Pkcs,
2 => Self::Des,
3 => Self::Pkcsdes,
4 => Self::Pgpdes,
5 => Self::Pgpdesmd5,
6 => Self::Pem,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::None => 0,
Self::Pkcs => 1,
Self::Des => 2,
Self::Pkcsdes => 3,
Self::Pgpdes => 4,
Self::Pgpdesmd5 => 5,
Self::Pem => 6,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CxlRejReason {
TooLateToCancel,
UnknownOrder,
BrokerCredit,
OrderAlreadyInPendingStatus,
UnableToProcessOrderMassCancelRequest,
OrigOrdModTime,
DuplicateClOrdId,
Other,
Unrecognized(i64),
}
impl CxlRejReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::TooLateToCancel,
1 => Self::UnknownOrder,
2 => Self::BrokerCredit,
3 => Self::OrderAlreadyInPendingStatus,
4 => Self::UnableToProcessOrderMassCancelRequest,
5 => Self::OrigOrdModTime,
6 => Self::DuplicateClOrdId,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::TooLateToCancel => 0,
Self::UnknownOrder => 1,
Self::BrokerCredit => 2,
Self::OrderAlreadyInPendingStatus => 3,
Self::UnableToProcessOrderMassCancelRequest => 4,
Self::OrigOrdModTime => 5,
Self::DuplicateClOrdId => 6,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OrdRejReason {
BrokerCredit,
UnknownSymbol,
ExchangeClosed,
OrderExceedsLimit,
TooLateToEnter,
UnknownOrder,
DuplicateOrder,
DuplicateOfAVerballyCommunicatedOrder,
StaleOrder,
TradeAlongRequired,
InvalidInvestorId,
UnsupportedOrderCharacteristic,
IncorrectQuantity,
IncorrectAllocatedQuantity,
UnknownAccount,
Other,
Unrecognized(i64),
}
impl OrdRejReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::BrokerCredit,
1 => Self::UnknownSymbol,
2 => Self::ExchangeClosed,
3 => Self::OrderExceedsLimit,
4 => Self::TooLateToEnter,
5 => Self::UnknownOrder,
6 => Self::DuplicateOrder,
7 => Self::DuplicateOfAVerballyCommunicatedOrder,
8 => Self::StaleOrder,
9 => Self::TradeAlongRequired,
10 => Self::InvalidInvestorId,
11 => Self::UnsupportedOrderCharacteristic,
13 => Self::IncorrectQuantity,
14 => Self::IncorrectAllocatedQuantity,
15 => Self::UnknownAccount,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::BrokerCredit => 0,
Self::UnknownSymbol => 1,
Self::ExchangeClosed => 2,
Self::OrderExceedsLimit => 3,
Self::TooLateToEnter => 4,
Self::UnknownOrder => 5,
Self::DuplicateOrder => 6,
Self::DuplicateOfAVerballyCommunicatedOrder => 7,
Self::StaleOrder => 8,
Self::TradeAlongRequired => 9,
Self::InvalidInvestorId => 10,
Self::UnsupportedOrderCharacteristic => 11,
Self::IncorrectQuantity => 13,
Self::IncorrectAllocatedQuantity => 14,
Self::UnknownAccount => 15,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum IOIQualifier<'a> {
AllOrNone,
MarketOnClose,
AtTheClose,
Vwap,
InTouchWith,
Limit,
MoreBehind,
AtTheOpen,
TakingAPosition,
AtTheMarket,
ReadyToTrade,
PortfolioShown,
ThroughTheDay,
Versus,
Indication,
CrossingOpportunity,
AtTheMidpoint,
PreOpen,
Unrecognized(&'a str),
}
impl<'a> IOIQualifier<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::AllOrNone,
"B" => Self::MarketOnClose,
"C" => Self::AtTheClose,
"D" => Self::Vwap,
"I" => Self::InTouchWith,
"L" => Self::Limit,
"M" => Self::MoreBehind,
"O" => Self::AtTheOpen,
"P" => Self::TakingAPosition,
"Q" => Self::AtTheMarket,
"R" => Self::ReadyToTrade,
"S" => Self::PortfolioShown,
"T" => Self::ThroughTheDay,
"V" => Self::Versus,
"W" => Self::Indication,
"X" => Self::CrossingOpportunity,
"Y" => Self::AtTheMidpoint,
"Z" => Self::PreOpen,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::AllOrNone => "A",
Self::MarketOnClose => "B",
Self::AtTheClose => "C",
Self::Vwap => "D",
Self::InTouchWith => "I",
Self::Limit => "L",
Self::MoreBehind => "M",
Self::AtTheOpen => "O",
Self::TakingAPosition => "P",
Self::AtTheMarket => "Q",
Self::ReadyToTrade => "R",
Self::PortfolioShown => "S",
Self::ThroughTheDay => "T",
Self::Versus => "V",
Self::Indication => "W",
Self::CrossingOpportunity => "X",
Self::AtTheMidpoint => "Y",
Self::PreOpen => "Z",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for IOIQualifier<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DKReason<'a> {
UnknownSymbol,
WrongSide,
QuantityExceedsOrder,
NoMatchingOrder,
PriceExceedsLimit,
CalculationDifference,
Other,
Unrecognized(&'a str),
}
impl<'a> DKReason<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::UnknownSymbol,
"B" => Self::WrongSide,
"C" => Self::QuantityExceedsOrder,
"D" => Self::NoMatchingOrder,
"E" => Self::PriceExceedsLimit,
"F" => Self::CalculationDifference,
"Z" => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::UnknownSymbol => "A",
Self::WrongSide => "B",
Self::QuantityExceedsOrder => "C",
Self::NoMatchingOrder => "D",
Self::PriceExceedsLimit => "E",
Self::CalculationDifference => "F",
Self::Other => "Z",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for DKReason<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MiscFeeType<'a> {
Regulatory,
Tax,
LocalCommission,
ExchangeFees,
Stamp,
Levy,
Other,
Markup,
ConsumptionTax,
PerTransaction,
Conversion,
Agent,
Unrecognized(&'a str),
}
impl<'a> MiscFeeType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Regulatory,
"2" => Self::Tax,
"3" => Self::LocalCommission,
"4" => Self::ExchangeFees,
"5" => Self::Stamp,
"6" => Self::Levy,
"7" => Self::Other,
"8" => Self::Markup,
"9" => Self::ConsumptionTax,
"10" => Self::PerTransaction,
"11" => Self::Conversion,
"12" => Self::Agent,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Regulatory => "1",
Self::Tax => "2",
Self::LocalCommission => "3",
Self::ExchangeFees => "4",
Self::Stamp => "5",
Self::Levy => "6",
Self::Other => "7",
Self::Markup => "8",
Self::ConsumptionTax => "9",
Self::PerTransaction => "10",
Self::Conversion => "11",
Self::Agent => "12",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MiscFeeType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ExecType<'a> {
New,
DoneForDay,
Canceled,
Replaced,
PendingCancel,
Stopped,
Rejected,
Suspended,
PendingNew,
Calculated,
Expired,
Restated,
PendingReplace,
Trade,
TradeCorrect,
TradeCancel,
OrderStatus,
Unrecognized(&'a str),
}
impl<'a> ExecType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::New,
"3" => Self::DoneForDay,
"4" => Self::Canceled,
"5" => Self::Replaced,
"6" => Self::PendingCancel,
"7" => Self::Stopped,
"8" => Self::Rejected,
"9" => Self::Suspended,
"A" => Self::PendingNew,
"B" => Self::Calculated,
"C" => Self::Expired,
"D" => Self::Restated,
"E" => Self::PendingReplace,
"F" => Self::Trade,
"G" => Self::TradeCorrect,
"H" => Self::TradeCancel,
"I" => Self::OrderStatus,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "0",
Self::DoneForDay => "3",
Self::Canceled => "4",
Self::Replaced => "5",
Self::PendingCancel => "6",
Self::Stopped => "7",
Self::Rejected => "8",
Self::Suspended => "9",
Self::PendingNew => "A",
Self::Calculated => "B",
Self::Expired => "C",
Self::Restated => "D",
Self::PendingReplace => "E",
Self::Trade => "F",
Self::TradeCorrect => "G",
Self::TradeCancel => "H",
Self::OrderStatus => "I",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for ExecType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlCurrFxRateCalc<'a> {
Multiply,
Divide,
Unrecognized(&'a str),
}
impl<'a> SettlCurrFxRateCalc<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"M" => Self::Multiply,
"D" => Self::Divide,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Multiply => "M",
Self::Divide => "D",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SettlCurrFxRateCalc<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlInstMode<'a> {
StandingInstructionsProvided,
SpecificOrderForASingleAccount,
RequestReject,
Unrecognized(&'a str),
}
impl<'a> SettlInstMode<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::StandingInstructionsProvided,
"4" => Self::SpecificOrderForASingleAccount,
"5" => Self::RequestReject,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::StandingInstructionsProvided => "1",
Self::SpecificOrderForASingleAccount => "4",
Self::RequestReject => "5",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SettlInstMode<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlInstTransType<'a> {
New,
Cancel,
Replace,
Restate,
Unrecognized(&'a str),
}
impl<'a> SettlInstTransType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"N" => Self::New,
"C" => Self::Cancel,
"R" => Self::Replace,
"T" => Self::Restate,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "N",
Self::Cancel => "C",
Self::Replace => "R",
Self::Restate => "T",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SettlInstTransType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlInstSource<'a> {
BrokerCredit,
Institution,
Investor,
Unrecognized(&'a str),
}
impl<'a> SettlInstSource<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::BrokerCredit,
"2" => Self::Institution,
"3" => Self::Investor,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::BrokerCredit => "1",
Self::Institution => "2",
Self::Investor => "3",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SettlInstSource<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SecurityType<'a> {
EuroSupranationalCoupons,
FederalAgencyCoupon,
FederalAgencyDiscountNote,
PrivateExportFunding,
UsdSupranationalCoupons,
CorporateBond,
CorporatePrivatePlacement,
ConvertibleBond,
DualCurrency,
EuroCorporateBond,
IndexedLinked,
StructuredNotes,
YankeeCorporateBond,
ForeignExchangeContract,
CommonStock,
PreferredStock,
BradyBond,
EuroSovereigns,
UsTreasuryBond,
InterestStripFromAnyBondOrNote,
TreasuryInflationProtectedSecurities,
PrincipalStripOfACallableBondOrNote,
PrincipalStripFromANonCallableBondOrNote,
UsTreasuryNoteOld,
UsTreasuryBillOld,
UsTreasuryNote,
UsTreasuryBill,
Repurchase,
Forward,
BuySellback,
SecuritiesLoan,
SecuritiesPledge,
TermLoan,
RevolverLoan,
Revolver,
BridgeLoan,
LetterOfCredit,
SwingLineFacility,
DebtorInPossession,
Defaulted,
Withdrawn,
Replaced,
Matured,
Amended,
Retired,
BankersAcceptance,
BankNotes,
BillOfExchanges,
CertificateOfDeposit,
CallLoans,
CommercialPaper,
DepositNotes,
EuroCertificateOfDeposit,
EuroCommercialPaper,
LiquidityNote,
MediumTermNotes,
Overnight,
PromissoryNote,
PlazosFijos,
ShortTermLoanNote,
TimeDeposit,
ExtendedCommNote,
YankeeCertificateOfDeposit,
AssetBackedSecurities,
Corp,
CollateralizedMortgageObligation,
IoetteMortgage,
MortgageBackedSecurities,
MortgageInterestOnly,
MortgagePrincipalOnly,
MortgagePrivatePlacement,
MiscellaneousPassThrough,
Pfandbriefe,
ToBeAnnounced,
OtherAnticipationNotes,
CertificateOfObligation,
CertificateOfParticipation,
GeneralObligationBonds,
MandatoryTender,
RevenueAnticipationNote,
RevenueBonds,
SpecialAssessment,
SpecialObligation,
SpecialTax,
TaxAnticipationNote,
TaxAllocation,
TaxExemptCommercialPaper,
TaxRevenueAnticipationNote,
VariableRateDemandNote,
Warrant,
MutualFund,
MultilegInstrument,
NoSecurityType,
Future,
Option,
Unrecognized(&'a str),
}
impl<'a> SecurityType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"EUSUPRA" => Self::EuroSupranationalCoupons,
"FAC" => Self::FederalAgencyCoupon,
"FADN" => Self::FederalAgencyDiscountNote,
"PEF" => Self::PrivateExportFunding,
"SUPRA" => Self::UsdSupranationalCoupons,
"CORP" => Self::CorporateBond,
"CPP" => Self::CorporatePrivatePlacement,
"CB" => Self::ConvertibleBond,
"DUAL" => Self::DualCurrency,
"EUCORP" => Self::EuroCorporateBond,
"XLINKD" => Self::IndexedLinked,
"STRUCT" => Self::StructuredNotes,
"YANK" => Self::YankeeCorporateBond,
"FOR" => Self::ForeignExchangeContract,
"CS" => Self::CommonStock,
"PS" => Self::PreferredStock,
"BRADY" => Self::BradyBond,
"EUSOV" => Self::EuroSovereigns,
"TBOND" => Self::UsTreasuryBond,
"TINT" => Self::InterestStripFromAnyBondOrNote,
"TIPS" => Self::TreasuryInflationProtectedSecurities,
"TCAL" => Self::PrincipalStripOfACallableBondOrNote,
"TPRN" => Self::PrincipalStripFromANonCallableBondOrNote,
"UST" => Self::UsTreasuryNoteOld,
"USTB" => Self::UsTreasuryBillOld,
"TNOTE" => Self::UsTreasuryNote,
"TBILL" => Self::UsTreasuryBill,
"REPO" => Self::Repurchase,
"FORWARD" => Self::Forward,
"BUYSELL" => Self::BuySellback,
"SECLOAN" => Self::SecuritiesLoan,
"SECPLEDGE" => Self::SecuritiesPledge,
"TERM" => Self::TermLoan,
"RVLV" => Self::RevolverLoan,
"RVLVTRM" => Self::Revolver,
"BRIDGE" => Self::BridgeLoan,
"LOFC" => Self::LetterOfCredit,
"SWING" => Self::SwingLineFacility,
"DINP" => Self::DebtorInPossession,
"DEFLTED" => Self::Defaulted,
"WITHDRN" => Self::Withdrawn,
"REPLACD" => Self::Replaced,
"MATURED" => Self::Matured,
"AMENDED" => Self::Amended,
"RETIRED" => Self::Retired,
"BA" => Self::BankersAcceptance,
"BN" => Self::BankNotes,
"BOX" => Self::BillOfExchanges,
"CD" => Self::CertificateOfDeposit,
"CL" => Self::CallLoans,
"CP" => Self::CommercialPaper,
"DN" => Self::DepositNotes,
"EUCD" => Self::EuroCertificateOfDeposit,
"EUCP" => Self::EuroCommercialPaper,
"LQN" => Self::LiquidityNote,
"MTN" => Self::MediumTermNotes,
"ONITE" => Self::Overnight,
"PN" => Self::PromissoryNote,
"PZFJ" => Self::PlazosFijos,
"STN" => Self::ShortTermLoanNote,
"TD" => Self::TimeDeposit,
"XCN" => Self::ExtendedCommNote,
"YCD" => Self::YankeeCertificateOfDeposit,
"ABS" => Self::AssetBackedSecurities,
"CMBS" => Self::Corp,
"CMO" => Self::CollateralizedMortgageObligation,
"IET" => Self::IoetteMortgage,
"MBS" => Self::MortgageBackedSecurities,
"MIO" => Self::MortgageInterestOnly,
"MPO" => Self::MortgagePrincipalOnly,
"MPP" => Self::MortgagePrivatePlacement,
"MPT" => Self::MiscellaneousPassThrough,
"PFAND" => Self::Pfandbriefe,
"TBA" => Self::ToBeAnnounced,
"AN" => Self::OtherAnticipationNotes,
"COFO" => Self::CertificateOfObligation,
"COFP" => Self::CertificateOfParticipation,
"GO" => Self::GeneralObligationBonds,
"MT" => Self::MandatoryTender,
"RAN" => Self::RevenueAnticipationNote,
"REV" => Self::RevenueBonds,
"SPCLA" => Self::SpecialAssessment,
"SPCLO" => Self::SpecialObligation,
"SPCLT" => Self::SpecialTax,
"TAN" => Self::TaxAnticipationNote,
"TAXA" => Self::TaxAllocation,
"TECP" => Self::TaxExemptCommercialPaper,
"TRAN" => Self::TaxRevenueAnticipationNote,
"VRDN" => Self::VariableRateDemandNote,
"WAR" => Self::Warrant,
"MF" => Self::MutualFund,
"MLEG" => Self::MultilegInstrument,
"NONE" => Self::NoSecurityType,
"FUT" => Self::Future,
"OPT" => Self::Option,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::EuroSupranationalCoupons => "EUSUPRA",
Self::FederalAgencyCoupon => "FAC",
Self::FederalAgencyDiscountNote => "FADN",
Self::PrivateExportFunding => "PEF",
Self::UsdSupranationalCoupons => "SUPRA",
Self::CorporateBond => "CORP",
Self::CorporatePrivatePlacement => "CPP",
Self::ConvertibleBond => "CB",
Self::DualCurrency => "DUAL",
Self::EuroCorporateBond => "EUCORP",
Self::IndexedLinked => "XLINKD",
Self::StructuredNotes => "STRUCT",
Self::YankeeCorporateBond => "YANK",
Self::ForeignExchangeContract => "FOR",
Self::CommonStock => "CS",
Self::PreferredStock => "PS",
Self::BradyBond => "BRADY",
Self::EuroSovereigns => "EUSOV",
Self::UsTreasuryBond => "TBOND",
Self::InterestStripFromAnyBondOrNote => "TINT",
Self::TreasuryInflationProtectedSecurities => "TIPS",
Self::PrincipalStripOfACallableBondOrNote => "TCAL",
Self::PrincipalStripFromANonCallableBondOrNote => "TPRN",
Self::UsTreasuryNoteOld => "UST",
Self::UsTreasuryBillOld => "USTB",
Self::UsTreasuryNote => "TNOTE",
Self::UsTreasuryBill => "TBILL",
Self::Repurchase => "REPO",
Self::Forward => "FORWARD",
Self::BuySellback => "BUYSELL",
Self::SecuritiesLoan => "SECLOAN",
Self::SecuritiesPledge => "SECPLEDGE",
Self::TermLoan => "TERM",
Self::RevolverLoan => "RVLV",
Self::Revolver => "RVLVTRM",
Self::BridgeLoan => "BRIDGE",
Self::LetterOfCredit => "LOFC",
Self::SwingLineFacility => "SWING",
Self::DebtorInPossession => "DINP",
Self::Defaulted => "DEFLTED",
Self::Withdrawn => "WITHDRN",
Self::Replaced => "REPLACD",
Self::Matured => "MATURED",
Self::Amended => "AMENDED",
Self::Retired => "RETIRED",
Self::BankersAcceptance => "BA",
Self::BankNotes => "BN",
Self::BillOfExchanges => "BOX",
Self::CertificateOfDeposit => "CD",
Self::CallLoans => "CL",
Self::CommercialPaper => "CP",
Self::DepositNotes => "DN",
Self::EuroCertificateOfDeposit => "EUCD",
Self::EuroCommercialPaper => "EUCP",
Self::LiquidityNote => "LQN",
Self::MediumTermNotes => "MTN",
Self::Overnight => "ONITE",
Self::PromissoryNote => "PN",
Self::PlazosFijos => "PZFJ",
Self::ShortTermLoanNote => "STN",
Self::TimeDeposit => "TD",
Self::ExtendedCommNote => "XCN",
Self::YankeeCertificateOfDeposit => "YCD",
Self::AssetBackedSecurities => "ABS",
Self::Corp => "CMBS",
Self::CollateralizedMortgageObligation => "CMO",
Self::IoetteMortgage => "IET",
Self::MortgageBackedSecurities => "MBS",
Self::MortgageInterestOnly => "MIO",
Self::MortgagePrincipalOnly => "MPO",
Self::MortgagePrivatePlacement => "MPP",
Self::MiscellaneousPassThrough => "MPT",
Self::Pfandbriefe => "PFAND",
Self::ToBeAnnounced => "TBA",
Self::OtherAnticipationNotes => "AN",
Self::CertificateOfObligation => "COFO",
Self::CertificateOfParticipation => "COFP",
Self::GeneralObligationBonds => "GO",
Self::MandatoryTender => "MT",
Self::RevenueAnticipationNote => "RAN",
Self::RevenueBonds => "REV",
Self::SpecialAssessment => "SPCLA",
Self::SpecialObligation => "SPCLO",
Self::SpecialTax => "SPCLT",
Self::TaxAnticipationNote => "TAN",
Self::TaxAllocation => "TAXA",
Self::TaxExemptCommercialPaper => "TECP",
Self::TaxRevenueAnticipationNote => "TRAN",
Self::VariableRateDemandNote => "VRDN",
Self::Warrant => "WAR",
Self::MutualFund => "MF",
Self::MultilegInstrument => "MLEG",
Self::NoSecurityType => "NONE",
Self::Future => "FUT",
Self::Option => "OPT",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SecurityType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum StandInstDbType {
Other,
Dtcsid,
ThomsonAlert,
AGlobalCustodian,
AccountNet,
Unrecognized(i64),
}
impl StandInstDbType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Other,
1 => Self::Dtcsid,
2 => Self::ThomsonAlert,
3 => Self::AGlobalCustodian,
4 => Self::AccountNet,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Other => 0,
Self::Dtcsid => 1,
Self::ThomsonAlert => 2,
Self::AGlobalCustodian => 3,
Self::AccountNet => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlDeliveryType {
Versus,
Free,
TriParty,
HoldInCustody,
Unrecognized(i64),
}
impl SettlDeliveryType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Versus,
1 => Self::Free,
2 => Self::TriParty,
3 => Self::HoldInCustody,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Versus => 0,
Self::Free => 1,
Self::TriParty => 2,
Self::HoldInCustody => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocLinkType {
FxNetting,
FxSwap,
Unrecognized(i64),
}
impl AllocLinkType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::FxNetting,
1 => Self::FxSwap,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::FxNetting => 0,
Self::FxSwap => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PutOrCall {
Put,
Call,
Unrecognized(i64),
}
impl PutOrCall {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Put,
1 => Self::Call,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Put => 0,
Self::Call => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CoveredOrUncovered {
Covered,
Uncovered,
Unrecognized(i64),
}
impl CoveredOrUncovered {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Covered,
1 => Self::Uncovered,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Covered => 0,
Self::Uncovered => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocHandlInst {
Match,
Forward,
ForwardAndMatch,
Unrecognized(i64),
}
impl AllocHandlInst {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Match,
2 => Self::Forward,
3 => Self::ForwardAndMatch,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Match => 1,
Self::Forward => 2,
Self::ForwardAndMatch => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum RoutingType {
TargetFirm,
TargetList,
BlockFirm,
BlockList,
Unrecognized(i64),
}
impl RoutingType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::TargetFirm,
2 => Self::TargetList,
3 => Self::BlockFirm,
4 => Self::BlockList,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::TargetFirm => 1,
Self::TargetList => 2,
Self::BlockFirm => 3,
Self::BlockList => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum StipulationType<'a> {
AlternativeMinimumTax,
AutoReinvestment,
BankQualified,
BargainConditions,
CouponRange,
IsoCurrencyCode,
CustomStart,
Geographics,
ValuationDiscount,
Insured,
IssueDate,
Issuer,
IssueSizeRange,
LookbackDays,
ExplicitLotIdentifier,
LotVariance,
MaturityYearAndMonth,
MaturityRange,
MaximumSubstitutions,
MinimumQuantity,
MinimumIncrement,
MinimumDenomination,
PaymentFrequency,
NumberOfPieces,
PoolsMaximum,
PoolsPerMillion,
PoolsPerLot,
PoolsPerTrade,
PriceRange,
PricingFrequency,
ProductionYear,
CallProtection,
Purpose,
BenchmarkPriceSource,
RatingSourceAndRange,
TypeOfRedemption,
Restricted,
MarketSector,
SecurityTypeIncludedOrExcluded,
Structure,
SubstitutionsFrequency,
SubstitutionsLeft,
FreeformText,
TradeVariance,
WeightedAverageCoupon,
WeightedAverageLifeCoupon,
WeightedAverageLoanAge,
WeightedAverageMaturity,
WholePool,
YieldRange,
Unrecognized(&'a str),
}
impl<'a> StipulationType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"AMT" => Self::AlternativeMinimumTax,
"AUTOREINV" => Self::AutoReinvestment,
"BANKQUAL" => Self::BankQualified,
"BGNCON" => Self::BargainConditions,
"COUPON" => Self::CouponRange,
"CURRENCY" => Self::IsoCurrencyCode,
"CUSTOMDATE" => Self::CustomStart,
"GEOG" => Self::Geographics,
"HAIRCUT" => Self::ValuationDiscount,
"INSURED" => Self::Insured,
"ISSUE" => Self::IssueDate,
"ISSUER" => Self::Issuer,
"ISSUESIZE" => Self::IssueSizeRange,
"LOOKBACK" => Self::LookbackDays,
"LOT" => Self::ExplicitLotIdentifier,
"LOTVAR" => Self::LotVariance,
"MAT" => Self::MaturityYearAndMonth,
"MATURITY" => Self::MaturityRange,
"MAXSUBS" => Self::MaximumSubstitutions,
"MINQTY" => Self::MinimumQuantity,
"MININCR" => Self::MinimumIncrement,
"MINDNOM" => Self::MinimumDenomination,
"PAYFREQ" => Self::PaymentFrequency,
"PIECES" => Self::NumberOfPieces,
"PMAX" => Self::PoolsMaximum,
"PPM" => Self::PoolsPerMillion,
"PPL" => Self::PoolsPerLot,
"PPT" => Self::PoolsPerTrade,
"PRICE" => Self::PriceRange,
"PRICEFREQ" => Self::PricingFrequency,
"PROD" => Self::ProductionYear,
"PROTECT" => Self::CallProtection,
"PURPOSE" => Self::Purpose,
"PXSOURCE" => Self::BenchmarkPriceSource,
"RATING" => Self::RatingSourceAndRange,
"REDEMPTION" => Self::TypeOfRedemption,
"RESTRICTED" => Self::Restricted,
"SECTOR" => Self::MarketSector,
"SECTYPE" => Self::SecurityTypeIncludedOrExcluded,
"STRUCT" => Self::Structure,
"SUBSFREQ" => Self::SubstitutionsFrequency,
"SUBSLEFT" => Self::SubstitutionsLeft,
"TEXT" => Self::FreeformText,
"TRDVAR" => Self::TradeVariance,
"WAC" => Self::WeightedAverageCoupon,
"WAL" => Self::WeightedAverageLifeCoupon,
"WALA" => Self::WeightedAverageLoanAge,
"WAM" => Self::WeightedAverageMaturity,
"WHOLE" => Self::WholePool,
"YIELD" => Self::YieldRange,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::AlternativeMinimumTax => "AMT",
Self::AutoReinvestment => "AUTOREINV",
Self::BankQualified => "BANKQUAL",
Self::BargainConditions => "BGNCON",
Self::CouponRange => "COUPON",
Self::IsoCurrencyCode => "CURRENCY",
Self::CustomStart => "CUSTOMDATE",
Self::Geographics => "GEOG",
Self::ValuationDiscount => "HAIRCUT",
Self::Insured => "INSURED",
Self::IssueDate => "ISSUE",
Self::Issuer => "ISSUER",
Self::IssueSizeRange => "ISSUESIZE",
Self::LookbackDays => "LOOKBACK",
Self::ExplicitLotIdentifier => "LOT",
Self::LotVariance => "LOTVAR",
Self::MaturityYearAndMonth => "MAT",
Self::MaturityRange => "MATURITY",
Self::MaximumSubstitutions => "MAXSUBS",
Self::MinimumQuantity => "MINQTY",
Self::MinimumIncrement => "MININCR",
Self::MinimumDenomination => "MINDNOM",
Self::PaymentFrequency => "PAYFREQ",
Self::NumberOfPieces => "PIECES",
Self::PoolsMaximum => "PMAX",
Self::PoolsPerMillion => "PPM",
Self::PoolsPerLot => "PPL",
Self::PoolsPerTrade => "PPT",
Self::PriceRange => "PRICE",
Self::PricingFrequency => "PRICEFREQ",
Self::ProductionYear => "PROD",
Self::CallProtection => "PROTECT",
Self::Purpose => "PURPOSE",
Self::BenchmarkPriceSource => "PXSOURCE",
Self::RatingSourceAndRange => "RATING",
Self::TypeOfRedemption => "REDEMPTION",
Self::Restricted => "RESTRICTED",
Self::MarketSector => "SECTOR",
Self::SecurityTypeIncludedOrExcluded => "SECTYPE",
Self::Structure => "STRUCT",
Self::SubstitutionsFrequency => "SUBSFREQ",
Self::SubstitutionsLeft => "SUBSLEFT",
Self::FreeformText => "TEXT",
Self::TradeVariance => "TRDVAR",
Self::WeightedAverageCoupon => "WAC",
Self::WeightedAverageLifeCoupon => "WAL",
Self::WeightedAverageLoanAge => "WALA",
Self::WeightedAverageMaturity => "WAM",
Self::WholePool => "WHOLE",
Self::YieldRange => "YIELD",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for StipulationType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum YieldType<'a> {
AfterTaxYield,
AnnualYield,
YieldAtIssue,
YieldToAverageMaturity,
BookYield,
YieldToNextCall,
YieldChangeSinceClose,
ClosingYield,
CompoundYield,
CurrentYield,
TrueGrossYield,
GvntEquivalentYield,
YieldWithInflationAssumption,
InverseFloaterBondYield,
MostRecentClosingYield,
ClosingYieldMostRecentMonth,
ClosingYieldMostRecentQuarter,
ClosingYieldMostRecentYear,
YieldToLongestAverageLife,
MarkToMarketYield,
YieldToMaturity,
YieldToNextRefund,
OpenAverageYield,
YieldToNextPut,
PreviousCloseYield,
ProceedsYield,
SemiAnnualYield,
YieldToShortestAverageLife,
SimpleYield,
TaxEquivalentYield,
YieldToTenderDate,
TrueYield,
YieldValueOf132,
YieldToWorst,
Unrecognized(&'a str),
}
impl<'a> YieldType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"AFTERTAX" => Self::AfterTaxYield,
"ANNUAL" => Self::AnnualYield,
"ATISSUE" => Self::YieldAtIssue,
"AVGMATURITY" => Self::YieldToAverageMaturity,
"BOOK" => Self::BookYield,
"CALL" => Self::YieldToNextCall,
"CHANGE" => Self::YieldChangeSinceClose,
"CLOSE" => Self::ClosingYield,
"COMPOUND" => Self::CompoundYield,
"CURRENT" => Self::CurrentYield,
"GROSS" => Self::TrueGrossYield,
"GOVTEQUIV" => Self::GvntEquivalentYield,
"INFLATION" => Self::YieldWithInflationAssumption,
"INVERSEFLOATER" => Self::InverseFloaterBondYield,
"LASTCLOSE" => Self::MostRecentClosingYield,
"LASTMONTH" => Self::ClosingYieldMostRecentMonth,
"LASTQUARTER" => Self::ClosingYieldMostRecentQuarter,
"LASTYEAR" => Self::ClosingYieldMostRecentYear,
"LONGAVGLIFE" => Self::YieldToLongestAverageLife,
"MARK" => Self::MarkToMarketYield,
"MATURITY" => Self::YieldToMaturity,
"NEXTREFUND" => Self::YieldToNextRefund,
"OPENAVG" => Self::OpenAverageYield,
"PUT" => Self::YieldToNextPut,
"PREVCLOSE" => Self::PreviousCloseYield,
"PROCEEDS" => Self::ProceedsYield,
"SEMIANNUAL" => Self::SemiAnnualYield,
"SHORTAVGLIFE" => Self::YieldToShortestAverageLife,
"SIMPLE" => Self::SimpleYield,
"TAXEQUIV" => Self::TaxEquivalentYield,
"TENDER" => Self::YieldToTenderDate,
"TRUE" => Self::TrueYield,
"VALUE1/32" => Self::YieldValueOf132,
"WORST" => Self::YieldToWorst,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::AfterTaxYield => "AFTERTAX",
Self::AnnualYield => "ANNUAL",
Self::YieldAtIssue => "ATISSUE",
Self::YieldToAverageMaturity => "AVGMATURITY",
Self::BookYield => "BOOK",
Self::YieldToNextCall => "CALL",
Self::YieldChangeSinceClose => "CHANGE",
Self::ClosingYield => "CLOSE",
Self::CompoundYield => "COMPOUND",
Self::CurrentYield => "CURRENT",
Self::TrueGrossYield => "GROSS",
Self::GvntEquivalentYield => "GOVTEQUIV",
Self::YieldWithInflationAssumption => "INFLATION",
Self::InverseFloaterBondYield => "INVERSEFLOATER",
Self::MostRecentClosingYield => "LASTCLOSE",
Self::ClosingYieldMostRecentMonth => "LASTMONTH",
Self::ClosingYieldMostRecentQuarter => "LASTQUARTER",
Self::ClosingYieldMostRecentYear => "LASTYEAR",
Self::YieldToLongestAverageLife => "LONGAVGLIFE",
Self::MarkToMarketYield => "MARK",
Self::YieldToMaturity => "MATURITY",
Self::YieldToNextRefund => "NEXTREFUND",
Self::OpenAverageYield => "OPENAVG",
Self::YieldToNextPut => "PUT",
Self::PreviousCloseYield => "PREVCLOSE",
Self::ProceedsYield => "PROCEEDS",
Self::SemiAnnualYield => "SEMIANNUAL",
Self::YieldToShortestAverageLife => "SHORTAVGLIFE",
Self::SimpleYield => "SIMPLE",
Self::TaxEquivalentYield => "TAXEQUIV",
Self::YieldToTenderDate => "TENDER",
Self::TrueYield => "TRUE",
Self::YieldValueOf132 => "VALUE1/32",
Self::YieldToWorst => "WORST",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for YieldType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SubscriptionRequestType<'a> {
Snapshot,
SnapshotAndUpdates,
DisablePreviousSnapshot,
Unrecognized(&'a str),
}
impl<'a> SubscriptionRequestType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Snapshot,
"1" => Self::SnapshotAndUpdates,
"2" => Self::DisablePreviousSnapshot,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Snapshot => "0",
Self::SnapshotAndUpdates => "1",
Self::DisablePreviousSnapshot => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SubscriptionRequestType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MDUpdateType {
FullRefresh,
IncrementalRefresh,
Unrecognized(i64),
}
impl MDUpdateType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::FullRefresh,
1 => Self::IncrementalRefresh,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::FullRefresh => 0,
Self::IncrementalRefresh => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MDEntryType<'a> {
Bid,
Offer,
Trade,
IndexValue,
OpeningPrice,
ClosingPrice,
SettlementPrice,
TradingSessionHighPrice,
TradingSessionLowPrice,
TradingSessionVwapPrice,
Imbalance,
TradeVolume,
OpenInterest,
Unrecognized(&'a str),
}
impl<'a> MDEntryType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Bid,
"1" => Self::Offer,
"2" => Self::Trade,
"3" => Self::IndexValue,
"4" => Self::OpeningPrice,
"5" => Self::ClosingPrice,
"6" => Self::SettlementPrice,
"7" => Self::TradingSessionHighPrice,
"8" => Self::TradingSessionLowPrice,
"9" => Self::TradingSessionVwapPrice,
"A" => Self::Imbalance,
"B" => Self::TradeVolume,
"C" => Self::OpenInterest,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Bid => "0",
Self::Offer => "1",
Self::Trade => "2",
Self::IndexValue => "3",
Self::OpeningPrice => "4",
Self::ClosingPrice => "5",
Self::SettlementPrice => "6",
Self::TradingSessionHighPrice => "7",
Self::TradingSessionLowPrice => "8",
Self::TradingSessionVwapPrice => "9",
Self::Imbalance => "A",
Self::TradeVolume => "B",
Self::OpenInterest => "C",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MDEntryType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TickDirection<'a> {
PlusTick,
ZeroPlusTick,
MinusTick,
ZeroMinusTick,
Unrecognized(&'a str),
}
impl<'a> TickDirection<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::PlusTick,
"1" => Self::ZeroPlusTick,
"2" => Self::MinusTick,
"3" => Self::ZeroMinusTick,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::PlusTick => "0",
Self::ZeroPlusTick => "1",
Self::MinusTick => "2",
Self::ZeroMinusTick => "3",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for TickDirection<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteCondition<'a> {
Open,
Closed,
ExchangeBest,
ConsolidatedBest,
Locked,
Crossed,
Depth,
FastTrading,
NonFirm,
Unrecognized(&'a str),
}
impl<'a> QuoteCondition<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::Open,
"B" => Self::Closed,
"C" => Self::ExchangeBest,
"D" => Self::ConsolidatedBest,
"E" => Self::Locked,
"F" => Self::Crossed,
"G" => Self::Depth,
"H" => Self::FastTrading,
"I" => Self::NonFirm,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Open => "A",
Self::Closed => "B",
Self::ExchangeBest => "C",
Self::ConsolidatedBest => "D",
Self::Locked => "E",
Self::Crossed => "F",
Self::Depth => "G",
Self::FastTrading => "H",
Self::NonFirm => "I",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for QuoteCondition<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradeCondition<'a> {
Cash,
AveragePriceTrade,
CashTrade,
NextDay,
Opening,
IntradayTradeDetail,
Rule127Trade,
Rule155Trade,
SoldLast,
NextDayTrade,
Opened,
Seller,
Sold,
StoppedStock,
ImbalanceMoreBuyers,
ImbalanceMoreSellers,
OpeningPrice,
Unrecognized(&'a str),
}
impl<'a> TradeCondition<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::Cash,
"B" => Self::AveragePriceTrade,
"C" => Self::CashTrade,
"D" => Self::NextDay,
"E" => Self::Opening,
"F" => Self::IntradayTradeDetail,
"G" => Self::Rule127Trade,
"H" => Self::Rule155Trade,
"I" => Self::SoldLast,
"J" => Self::NextDayTrade,
"K" => Self::Opened,
"L" => Self::Seller,
"M" => Self::Sold,
"N" => Self::StoppedStock,
"P" => Self::ImbalanceMoreBuyers,
"Q" => Self::ImbalanceMoreSellers,
"R" => Self::OpeningPrice,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Cash => "A",
Self::AveragePriceTrade => "B",
Self::CashTrade => "C",
Self::NextDay => "D",
Self::Opening => "E",
Self::IntradayTradeDetail => "F",
Self::Rule127Trade => "G",
Self::Rule155Trade => "H",
Self::SoldLast => "I",
Self::NextDayTrade => "J",
Self::Opened => "K",
Self::Seller => "L",
Self::Sold => "M",
Self::StoppedStock => "N",
Self::ImbalanceMoreBuyers => "P",
Self::ImbalanceMoreSellers => "Q",
Self::OpeningPrice => "R",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for TradeCondition<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MDUpdateAction<'a> {
New,
Change,
Delete,
Unrecognized(&'a str),
}
impl<'a> MDUpdateAction<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::New,
"1" => Self::Change,
"2" => Self::Delete,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "0",
Self::Change => "1",
Self::Delete => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MDUpdateAction<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MDReqRejReason<'a> {
UnknownSymbol,
DuplicateMdReqId,
InsufficientBandwidth,
InsufficientPermissions,
UnsupportedSubscriptionRequestType,
UnsupportedMarketDepth,
UnsupportedMdUpdateType,
UnsupportedAggregatedBook,
UnsupportedMdEntryType,
UnsupportedTradingSessionId,
UnsupportedScope,
UnsupportedOpenCloseSettleFlag,
UnsupportedMdImplicitDelete,
Unrecognized(&'a str),
}
impl<'a> MDReqRejReason<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::UnknownSymbol,
"1" => Self::DuplicateMdReqId,
"2" => Self::InsufficientBandwidth,
"3" => Self::InsufficientPermissions,
"4" => Self::UnsupportedSubscriptionRequestType,
"5" => Self::UnsupportedMarketDepth,
"6" => Self::UnsupportedMdUpdateType,
"7" => Self::UnsupportedAggregatedBook,
"8" => Self::UnsupportedMdEntryType,
"9" => Self::UnsupportedTradingSessionId,
"A" => Self::UnsupportedScope,
"B" => Self::UnsupportedOpenCloseSettleFlag,
"C" => Self::UnsupportedMdImplicitDelete,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::UnknownSymbol => "0",
Self::DuplicateMdReqId => "1",
Self::InsufficientBandwidth => "2",
Self::InsufficientPermissions => "3",
Self::UnsupportedSubscriptionRequestType => "4",
Self::UnsupportedMarketDepth => "5",
Self::UnsupportedMdUpdateType => "6",
Self::UnsupportedAggregatedBook => "7",
Self::UnsupportedMdEntryType => "8",
Self::UnsupportedTradingSessionId => "9",
Self::UnsupportedScope => "A",
Self::UnsupportedOpenCloseSettleFlag => "B",
Self::UnsupportedMdImplicitDelete => "C",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MDReqRejReason<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DeleteReason<'a> {
Cancellation,
Error,
Unrecognized(&'a str),
}
impl<'a> DeleteReason<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Cancellation,
"1" => Self::Error,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Cancellation => "0",
Self::Error => "1",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for DeleteReason<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OpenCloseSettlFlag<'a> {
DailyOpen,
SessionOpen,
DeliverySettlementEntry,
ExpectedEntry,
EntryFromPreviousBusinessDay,
TheoreticalPriceValue,
Unrecognized(&'a str),
}
impl<'a> OpenCloseSettlFlag<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::DailyOpen,
"1" => Self::SessionOpen,
"2" => Self::DeliverySettlementEntry,
"3" => Self::ExpectedEntry,
"4" => Self::EntryFromPreviousBusinessDay,
"5" => Self::TheoreticalPriceValue,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::DailyOpen => "0",
Self::SessionOpen => "1",
Self::DeliverySettlementEntry => "2",
Self::ExpectedEntry => "3",
Self::EntryFromPreviousBusinessDay => "4",
Self::TheoreticalPriceValue => "5",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for OpenCloseSettlFlag<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum FinancialStatus<'a> {
Bankrupt,
PendingDelisting,
Unrecognized(&'a str),
}
impl<'a> FinancialStatus<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Bankrupt,
"2" => Self::PendingDelisting,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Bankrupt => "1",
Self::PendingDelisting => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for FinancialStatus<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CorporateAction<'a> {
ExDividend,
ExDistribution,
ExRights,
New,
ExInterest,
Unrecognized(&'a str),
}
impl<'a> CorporateAction<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::ExDividend,
"B" => Self::ExDistribution,
"C" => Self::ExRights,
"D" => Self::New,
"E" => Self::ExInterest,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::ExDividend => "A",
Self::ExDistribution => "B",
Self::ExRights => "C",
Self::New => "D",
Self::ExInterest => "E",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for CorporateAction<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteStatus {
Accepted,
CancelForSymbol,
CanceledForSecurityType,
CanceledForUnderlying,
CanceledAll,
Rejected,
RemovedFromMarket,
Expired,
Query,
QuoteNotFound,
Pending,
Pass,
LockedMarketWarning,
CrossMarketWarning,
CanceledDueToLockMarket,
CanceledDueToCrossMarket,
Unrecognized(i64),
}
impl QuoteStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Accepted,
1 => Self::CancelForSymbol,
2 => Self::CanceledForSecurityType,
3 => Self::CanceledForUnderlying,
4 => Self::CanceledAll,
5 => Self::Rejected,
6 => Self::RemovedFromMarket,
7 => Self::Expired,
8 => Self::Query,
9 => Self::QuoteNotFound,
10 => Self::Pending,
11 => Self::Pass,
12 => Self::LockedMarketWarning,
13 => Self::CrossMarketWarning,
14 => Self::CanceledDueToLockMarket,
15 => Self::CanceledDueToCrossMarket,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Accepted => 0,
Self::CancelForSymbol => 1,
Self::CanceledForSecurityType => 2,
Self::CanceledForUnderlying => 3,
Self::CanceledAll => 4,
Self::Rejected => 5,
Self::RemovedFromMarket => 6,
Self::Expired => 7,
Self::Query => 8,
Self::QuoteNotFound => 9,
Self::Pending => 10,
Self::Pass => 11,
Self::LockedMarketWarning => 12,
Self::CrossMarketWarning => 13,
Self::CanceledDueToLockMarket => 14,
Self::CanceledDueToCrossMarket => 15,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteCancelType {
CancelForOneOrMoreSecurities,
CancelForSecurityType,
CancelForUnderlyingSecurity,
CancelAllQuotes,
Unrecognized(i64),
}
impl QuoteCancelType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::CancelForOneOrMoreSecurities,
2 => Self::CancelForSecurityType,
3 => Self::CancelForUnderlyingSecurity,
4 => Self::CancelAllQuotes,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::CancelForOneOrMoreSecurities => 1,
Self::CancelForSecurityType => 2,
Self::CancelForUnderlyingSecurity => 3,
Self::CancelAllQuotes => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteRejectReason {
UnknownSymbol,
Exchange,
QuoteRequestExceedsLimit,
TooLateToEnter,
UnknownQuote,
DuplicateQuote,
InvalidBid,
InvalidPrice,
NotAuthorizedToQuoteSecurity,
Other,
Unrecognized(i64),
}
impl QuoteRejectReason {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::UnknownSymbol,
2 => Self::Exchange,
3 => Self::QuoteRequestExceedsLimit,
4 => Self::TooLateToEnter,
5 => Self::UnknownQuote,
6 => Self::DuplicateQuote,
7 => Self::InvalidBid,
8 => Self::InvalidPrice,
9 => Self::NotAuthorizedToQuoteSecurity,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::UnknownSymbol => 1,
Self::Exchange => 2,
Self::QuoteRequestExceedsLimit => 3,
Self::TooLateToEnter => 4,
Self::UnknownQuote => 5,
Self::DuplicateQuote => 6,
Self::InvalidBid => 7,
Self::InvalidPrice => 8,
Self::NotAuthorizedToQuoteSecurity => 9,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteResponseLevel {
NoAcknowledgement,
AcknowledgeOnlyNegativeOrErroneousQuotes,
AcknowledgeEachQuoteMessage,
Unrecognized(i64),
}
impl QuoteResponseLevel {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::NoAcknowledgement,
1 => Self::AcknowledgeOnlyNegativeOrErroneousQuotes,
2 => Self::AcknowledgeEachQuoteMessage,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::NoAcknowledgement => 0,
Self::AcknowledgeOnlyNegativeOrErroneousQuotes => 1,
Self::AcknowledgeEachQuoteMessage => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteRequestType {
Manual,
Automatic,
Unrecognized(i64),
}
impl QuoteRequestType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Manual,
2 => Self::Automatic,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Manual => 1,
Self::Automatic => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SecurityRequestType {
RequestSecurityIdentityAndSpecifications,
RequestSecurityIdentityForSpecifications,
RequestListSecurityTypes,
RequestListSecurities,
Unrecognized(i64),
}
impl SecurityRequestType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::RequestSecurityIdentityAndSpecifications,
1 => Self::RequestSecurityIdentityForSpecifications,
2 => Self::RequestListSecurityTypes,
3 => Self::RequestListSecurities,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::RequestSecurityIdentityAndSpecifications => 0,
Self::RequestSecurityIdentityForSpecifications => 1,
Self::RequestListSecurityTypes => 2,
Self::RequestListSecurities => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SecurityResponseType {
AcceptAsIs,
AcceptWithRevisions,
RejectSecurityProposal,
CannotMatchSelectionCriteria,
Unrecognized(i64),
}
impl SecurityResponseType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::AcceptAsIs,
2 => Self::AcceptWithRevisions,
5 => Self::RejectSecurityProposal,
6 => Self::CannotMatchSelectionCriteria,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::AcceptAsIs => 1,
Self::AcceptWithRevisions => 2,
Self::RejectSecurityProposal => 5,
Self::CannotMatchSelectionCriteria => 6,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SecurityTradingStatus {
OpeningDelay,
TradingHalt,
Resume,
NoOpen,
PriceIndication,
TradingRangeIndication,
MarketImbalanceBuy,
MarketImbalanceSell,
MarketOnCloseImbalanceBuy,
MarketOnCloseImbalanceSell,
NoMarketImbalance,
NoMarketOnCloseImbalance,
ItsPreOpening,
NewPriceIndication,
TradeDisseminationTime,
ReadyToTrade,
NotAvailableForTrading,
NotTradedOnThisMarket,
UnknownOrInvalid,
PreOpen,
OpeningRotation,
FastMarket,
Unrecognized(i64),
}
impl SecurityTradingStatus {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::OpeningDelay,
2 => Self::TradingHalt,
3 => Self::Resume,
4 => Self::NoOpen,
5 => Self::PriceIndication,
6 => Self::TradingRangeIndication,
7 => Self::MarketImbalanceBuy,
8 => Self::MarketImbalanceSell,
9 => Self::MarketOnCloseImbalanceBuy,
10 => Self::MarketOnCloseImbalanceSell,
12 => Self::NoMarketImbalance,
13 => Self::NoMarketOnCloseImbalance,
14 => Self::ItsPreOpening,
15 => Self::NewPriceIndication,
16 => Self::TradeDisseminationTime,
17 => Self::ReadyToTrade,
18 => Self::NotAvailableForTrading,
19 => Self::NotTradedOnThisMarket,
20 => Self::UnknownOrInvalid,
21 => Self::PreOpen,
22 => Self::OpeningRotation,
23 => Self::FastMarket,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::OpeningDelay => 1,
Self::TradingHalt => 2,
Self::Resume => 3,
Self::NoOpen => 4,
Self::PriceIndication => 5,
Self::TradingRangeIndication => 6,
Self::MarketImbalanceBuy => 7,
Self::MarketImbalanceSell => 8,
Self::MarketOnCloseImbalanceBuy => 9,
Self::MarketOnCloseImbalanceSell => 10,
Self::NoMarketImbalance => 12,
Self::NoMarketOnCloseImbalance => 13,
Self::ItsPreOpening => 14,
Self::NewPriceIndication => 15,
Self::TradeDisseminationTime => 16,
Self::ReadyToTrade => 17,
Self::NotAvailableForTrading => 18,
Self::NotTradedOnThisMarket => 19,
Self::UnknownOrInvalid => 20,
Self::PreOpen => 21,
Self::OpeningRotation => 22,
Self::FastMarket => 23,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum HaltReasonChar<'a> {
OrderImbalance,
EquipmentChangeover,
NewsPending,
NewsDissemination,
OrderInflux,
AdditionalInformation,
Unrecognized(&'a str),
}
impl<'a> HaltReasonChar<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"I" => Self::OrderImbalance,
"X" => Self::EquipmentChangeover,
"P" => Self::NewsPending,
"D" => Self::NewsDissemination,
"E" => Self::OrderInflux,
"M" => Self::AdditionalInformation,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::OrderImbalance => "I",
Self::EquipmentChangeover => "X",
Self::NewsPending => "P",
Self::NewsDissemination => "D",
Self::OrderInflux => "E",
Self::AdditionalInformation => "M",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for HaltReasonChar<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum Adjustment {
Cancel,
Error,
Correction,
Unrecognized(i64),
}
impl Adjustment {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Cancel,
2 => Self::Error,
3 => Self::Correction,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Cancel => 1,
Self::Error => 2,
Self::Correction => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradSesMethod {
Electronic,
OpenOutcry,
TwoParty,
Unrecognized(i64),
}
impl TradSesMethod {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Electronic,
2 => Self::OpenOutcry,
3 => Self::TwoParty,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Electronic => 1,
Self::OpenOutcry => 2,
Self::TwoParty => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradSesMode {
Testing,
Simulated,
Production,
Unrecognized(i64),
}
impl TradSesMode {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Testing,
2 => Self::Simulated,
3 => Self::Production,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Testing => 1,
Self::Simulated => 2,
Self::Production => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradSesStatus {
Unknown,
Halted,
Open,
Closed,
PreOpen,
PreClose,
RequestRejected,
Unrecognized(i64),
}
impl TradSesStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Unknown,
1 => Self::Halted,
2 => Self::Open,
3 => Self::Closed,
4 => Self::PreOpen,
5 => Self::PreClose,
6 => Self::RequestRejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Unknown => 0,
Self::Halted => 1,
Self::Open => 2,
Self::Closed => 3,
Self::PreOpen => 4,
Self::PreClose => 5,
Self::RequestRejected => 6,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MessageEncoding<'a> {
Iso2022Jp,
Eucjp,
ShiftJis,
Utf8,
Unrecognized(&'a str),
}
impl<'a> MessageEncoding<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"ISO-2022-JP" => Self::Iso2022Jp,
"EUC-JP" => Self::Eucjp,
"Shift_JIS" => Self::ShiftJis,
"UTF-8" => Self::Utf8,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Iso2022Jp => "ISO-2022-JP",
Self::Eucjp => "EUC-JP",
Self::ShiftJis => "Shift_JIS",
Self::Utf8 => "UTF-8",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MessageEncoding<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SessionRejectReason {
InvalidTagNumber,
RequiredTagMissing,
TagNotDefinedForThisMessageType,
UndefinedTag,
TagSpecifiedWithoutAValue,
ValueIsIncorrect,
IncorrectDataFormatForValue,
DecryptionProblem,
SignatureProblem,
CompIdProblem,
SendingTimeAccuracyProblem,
InvalidMsgType,
XmlValidationError,
TagAppearsMoreThanOnce,
TagSpecifiedOutOfRequiredOrder,
RepeatingGroupFieldsOutOfOrder,
IncorrectNumInGroupCountForRepeatingGroup,
Non,
Other,
Unrecognized(i64),
}
impl SessionRejectReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::InvalidTagNumber,
1 => Self::RequiredTagMissing,
2 => Self::TagNotDefinedForThisMessageType,
3 => Self::UndefinedTag,
4 => Self::TagSpecifiedWithoutAValue,
5 => Self::ValueIsIncorrect,
6 => Self::IncorrectDataFormatForValue,
7 => Self::DecryptionProblem,
8 => Self::SignatureProblem,
9 => Self::CompIdProblem,
10 => Self::SendingTimeAccuracyProblem,
11 => Self::InvalidMsgType,
12 => Self::XmlValidationError,
13 => Self::TagAppearsMoreThanOnce,
14 => Self::TagSpecifiedOutOfRequiredOrder,
15 => Self::RepeatingGroupFieldsOutOfOrder,
16 => Self::IncorrectNumInGroupCountForRepeatingGroup,
17 => Self::Non,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::InvalidTagNumber => 0,
Self::RequiredTagMissing => 1,
Self::TagNotDefinedForThisMessageType => 2,
Self::UndefinedTag => 3,
Self::TagSpecifiedWithoutAValue => 4,
Self::ValueIsIncorrect => 5,
Self::IncorrectDataFormatForValue => 6,
Self::DecryptionProblem => 7,
Self::SignatureProblem => 8,
Self::CompIdProblem => 9,
Self::SendingTimeAccuracyProblem => 10,
Self::InvalidMsgType => 11,
Self::XmlValidationError => 12,
Self::TagAppearsMoreThanOnce => 13,
Self::TagSpecifiedOutOfRequiredOrder => 14,
Self::RepeatingGroupFieldsOutOfOrder => 15,
Self::IncorrectNumInGroupCountForRepeatingGroup => 16,
Self::Non => 17,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BidRequestTransType<'a> {
New,
Cancel,
Unrecognized(&'a str),
}
impl<'a> BidRequestTransType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"N" => Self::New,
"C" => Self::Cancel,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "N",
Self::Cancel => "C",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for BidRequestTransType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ExecRestatementReason {
GtCorporateAction,
GtRenewal,
VerbalChange,
RepricingOfOrder,
BrokerOption,
PartialDeclineOfOrderQty,
CancelOnTradingHalt,
CancelOnSystemFailure,
Market,
Canceled,
WarehouseRecap,
Other,
Unrecognized(i64),
}
impl ExecRestatementReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::GtCorporateAction,
1 => Self::GtRenewal,
2 => Self::VerbalChange,
3 => Self::RepricingOfOrder,
4 => Self::BrokerOption,
5 => Self::PartialDeclineOfOrderQty,
6 => Self::CancelOnTradingHalt,
7 => Self::CancelOnSystemFailure,
8 => Self::Market,
9 => Self::Canceled,
10 => Self::WarehouseRecap,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::GtCorporateAction => 0,
Self::GtRenewal => 1,
Self::VerbalChange => 2,
Self::RepricingOfOrder => 3,
Self::BrokerOption => 4,
Self::PartialDeclineOfOrderQty => 5,
Self::CancelOnTradingHalt => 6,
Self::CancelOnSystemFailure => 7,
Self::Market => 8,
Self::Canceled => 9,
Self::WarehouseRecap => 10,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BusinessRejectReason {
Other,
UnknownId,
UnknownSecurity,
UnsupportedMessageType,
ApplicationNotAvailable,
ConditionallyRequiredFieldMissing,
NotAuthorized,
DeliverToFirmNotAvailableAtThisTime,
Unrecognized(i64),
}
impl BusinessRejectReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Other,
1 => Self::UnknownId,
2 => Self::UnknownSecurity,
3 => Self::UnsupportedMessageType,
4 => Self::ApplicationNotAvailable,
5 => Self::ConditionallyRequiredFieldMissing,
6 => Self::NotAuthorized,
7 => Self::DeliverToFirmNotAvailableAtThisTime,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Other => 0,
Self::UnknownId => 1,
Self::UnknownSecurity => 2,
Self::UnsupportedMessageType => 3,
Self::ApplicationNotAvailable => 4,
Self::ConditionallyRequiredFieldMissing => 5,
Self::NotAuthorized => 6,
Self::DeliverToFirmNotAvailableAtThisTime => 7,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MsgDirection<'a> {
Send,
Receive,
Unrecognized(&'a str),
}
impl<'a> MsgDirection<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"S" => Self::Send,
"R" => Self::Receive,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Send => "S",
Self::Receive => "R",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MsgDirection<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DiscretionInst<'a> {
RelatedToDisplayedPrice,
RelatedToMarketPrice,
RelatedToPrimaryPrice,
RelatedToLocalPrimaryPrice,
RelatedToMidpointPrice,
RelatedToLastTradePrice,
RelatedToVwap,
Unrecognized(&'a str),
}
impl<'a> DiscretionInst<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::RelatedToDisplayedPrice,
"1" => Self::RelatedToMarketPrice,
"2" => Self::RelatedToPrimaryPrice,
"3" => Self::RelatedToLocalPrimaryPrice,
"4" => Self::RelatedToMidpointPrice,
"5" => Self::RelatedToLastTradePrice,
"6" => Self::RelatedToVwap,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::RelatedToDisplayedPrice => "0",
Self::RelatedToMarketPrice => "1",
Self::RelatedToPrimaryPrice => "2",
Self::RelatedToLocalPrimaryPrice => "3",
Self::RelatedToMidpointPrice => "4",
Self::RelatedToLastTradePrice => "5",
Self::RelatedToVwap => "6",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for DiscretionInst<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BidType {
NonDisclosed,
Disclosed,
NoBiddingProcess,
Unrecognized(i64),
}
impl BidType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::NonDisclosed,
2 => Self::Disclosed,
3 => Self::NoBiddingProcess,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::NonDisclosed => 1,
Self::Disclosed => 2,
Self::NoBiddingProcess => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BidDescriptorType {
Sector,
Country,
Index,
Unrecognized(i64),
}
impl BidDescriptorType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Sector,
2 => Self::Country,
3 => Self::Index,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Sector => 1,
Self::Country => 2,
Self::Index => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SideValueInd {
SideValue1,
SideValue2,
Unrecognized(i64),
}
impl SideValueInd {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::SideValue1,
2 => Self::SideValue2,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::SideValue1 => 1,
Self::SideValue2 => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum LiquidityIndType {
FiveDayMovingAverage,
TwentyDayMovingAverage,
NormalMarketSize,
Other,
Unrecognized(i64),
}
impl LiquidityIndType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::FiveDayMovingAverage,
2 => Self::TwentyDayMovingAverage,
3 => Self::NormalMarketSize,
4 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::FiveDayMovingAverage => 1,
Self::TwentyDayMovingAverage => 2,
Self::NormalMarketSize => 3,
Self::Other => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ProgRptReqs {
BuySideRequests,
SellSideSends,
RealTimeExecutionReports,
Unrecognized(i64),
}
impl ProgRptReqs {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::BuySideRequests,
2 => Self::SellSideSends,
3 => Self::RealTimeExecutionReports,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::BuySideRequests => 1,
Self::SellSideSends => 2,
Self::RealTimeExecutionReports => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum IncTaxInd {
Net,
Gross,
Unrecognized(i64),
}
impl IncTaxInd {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Net,
2 => Self::Gross,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Net => 1,
Self::Gross => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BidTradeType<'a> {
RiskTrade,
VwapGuarantee,
Agency,
GuaranteedClose,
Unrecognized(&'a str),
}
impl<'a> BidTradeType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"R" => Self::RiskTrade,
"G" => Self::VwapGuarantee,
"A" => Self::Agency,
"J" => Self::GuaranteedClose,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::RiskTrade => "R",
Self::VwapGuarantee => "G",
Self::Agency => "A",
Self::GuaranteedClose => "J",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for BidTradeType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BasisPxType<'a> {
ClosingPriceAtMorningSession,
ClosingPrice,
CurrentPrice,
Sq,
VwapThroughADay,
VwapThroughAMorningSession,
VwapThroughAnAfternoonSession,
VwapThroughADayExcept,
VwapThroughAMorningSessionExcept,
VwapThroughAnAfternoonSessionExcept,
Strike,
Open,
Others,
Unrecognized(&'a str),
}
impl<'a> BasisPxType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"2" => Self::ClosingPriceAtMorningSession,
"3" => Self::ClosingPrice,
"4" => Self::CurrentPrice,
"5" => Self::Sq,
"6" => Self::VwapThroughADay,
"7" => Self::VwapThroughAMorningSession,
"8" => Self::VwapThroughAnAfternoonSession,
"9" => Self::VwapThroughADayExcept,
"A" => Self::VwapThroughAMorningSessionExcept,
"B" => Self::VwapThroughAnAfternoonSessionExcept,
"C" => Self::Strike,
"D" => Self::Open,
"Z" => Self::Others,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::ClosingPriceAtMorningSession => "2",
Self::ClosingPrice => "3",
Self::CurrentPrice => "4",
Self::Sq => "5",
Self::VwapThroughADay => "6",
Self::VwapThroughAMorningSession => "7",
Self::VwapThroughAnAfternoonSession => "8",
Self::VwapThroughADayExcept => "9",
Self::VwapThroughAMorningSessionExcept => "A",
Self::VwapThroughAnAfternoonSessionExcept => "B",
Self::Strike => "C",
Self::Open => "D",
Self::Others => "Z",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for BasisPxType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PriceType {
Percentage,
PerUnit,
FixedAmount,
Discount,
Premium,
Spread,
TedPrice,
TedYield,
Yield,
FixedCabinetTradePrice,
VariableCabinetTradePrice,
Unrecognized(i64),
}
impl PriceType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Percentage,
2 => Self::PerUnit,
3 => Self::FixedAmount,
4 => Self::Discount,
5 => Self::Premium,
6 => Self::Spread,
7 => Self::TedPrice,
8 => Self::TedYield,
9 => Self::Yield,
10 => Self::FixedCabinetTradePrice,
11 => Self::VariableCabinetTradePrice,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Percentage => 1,
Self::PerUnit => 2,
Self::FixedAmount => 3,
Self::Discount => 4,
Self::Premium => 5,
Self::Spread => 6,
Self::TedPrice => 7,
Self::TedYield => 8,
Self::Yield => 9,
Self::FixedCabinetTradePrice => 10,
Self::VariableCabinetTradePrice => 11,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum GTBookingInst {
BookOutAllTradesOnDayOfExecution,
AccumulateUntilFilledOrExpired,
AccumulateUntilVerballlyNotifiedOtherwise,
Unrecognized(i64),
}
impl GTBookingInst {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::BookOutAllTradesOnDayOfExecution,
1 => Self::AccumulateUntilFilledOrExpired,
2 => Self::AccumulateUntilVerballlyNotifiedOtherwise,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::BookOutAllTradesOnDayOfExecution => 0,
Self::AccumulateUntilFilledOrExpired => 1,
Self::AccumulateUntilVerballlyNotifiedOtherwise => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ListStatusType {
Ack,
Response,
Timed,
ExecStarted,
AllDone,
Alert,
Unrecognized(i64),
}
impl ListStatusType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Ack,
2 => Self::Response,
3 => Self::Timed,
4 => Self::ExecStarted,
5 => Self::AllDone,
6 => Self::Alert,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Ack => 1,
Self::Response => 2,
Self::Timed => 3,
Self::ExecStarted => 4,
Self::AllDone => 5,
Self::Alert => 6,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum NetGrossInd {
Net,
Gross,
Unrecognized(i64),
}
impl NetGrossInd {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Net,
2 => Self::Gross,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Net => 1,
Self::Gross => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ListOrderStatus {
InBiddingProcess,
ReceivedForExecution,
Executing,
Cancelling,
Alert,
AllDone,
Reject,
Unrecognized(i64),
}
impl ListOrderStatus {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::InBiddingProcess,
2 => Self::ReceivedForExecution,
3 => Self::Executing,
4 => Self::Cancelling,
5 => Self::Alert,
6 => Self::AllDone,
7 => Self::Reject,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::InBiddingProcess => 1,
Self::ReceivedForExecution => 2,
Self::Executing => 3,
Self::Cancelling => 4,
Self::Alert => 5,
Self::AllDone => 6,
Self::Reject => 7,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ListExecInstType<'a> {
Immediate,
WaitForInstruction,
SellDriven,
BuyDrivenCashTopUp,
BuyDrivenCashWithdraw,
Unrecognized(&'a str),
}
impl<'a> ListExecInstType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Immediate,
"2" => Self::WaitForInstruction,
"3" => Self::SellDriven,
"4" => Self::BuyDrivenCashTopUp,
"5" => Self::BuyDrivenCashWithdraw,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Immediate => "1",
Self::WaitForInstruction => "2",
Self::SellDriven => "3",
Self::BuyDrivenCashTopUp => "4",
Self::BuyDrivenCashWithdraw => "5",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for ListExecInstType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CxlRejResponseTo<'a> {
OrderCancelRequest,
OrderCancel,
Unrecognized(&'a str),
}
impl<'a> CxlRejResponseTo<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::OrderCancelRequest,
"2" => Self::OrderCancel,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::OrderCancelRequest => "1",
Self::OrderCancel => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for CxlRejResponseTo<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MultiLegReportingType<'a> {
SingleSecurity,
IndividualLegOfAMultiLegSecurity,
MultiLegSecurity,
Unrecognized(&'a str),
}
impl<'a> MultiLegReportingType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::SingleSecurity,
"2" => Self::IndividualLegOfAMultiLegSecurity,
"3" => Self::MultiLegSecurity,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::SingleSecurity => "1",
Self::IndividualLegOfAMultiLegSecurity => "2",
Self::MultiLegSecurity => "3",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MultiLegReportingType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PartyIDSource<'a> {
Bic,
GeneralIdentifier,
Proprietary,
IsoCountryCode,
SettlementEntityLocation,
Mic,
CsdParticipant,
KoreanInvestorId,
TaiwaneseForeignInvestorId,
TaiwaneseTradingAcct,
MalaysianCentralDepository,
ChineseInvestorId,
UkNationalInsuranceOrPensionNumber,
UsSocialSecurityNumber,
UsEmployerOrTaxIdNumber,
AustralianBusinessNumber,
AustralianTaxFileNumber,
IsitcAcronym,
Unrecognized(&'a str),
}
impl<'a> PartyIDSource<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"B" => Self::Bic,
"C" => Self::GeneralIdentifier,
"D" => Self::Proprietary,
"E" => Self::IsoCountryCode,
"F" => Self::SettlementEntityLocation,
"G" => Self::Mic,
"H" => Self::CsdParticipant,
"1" => Self::KoreanInvestorId,
"2" => Self::TaiwaneseForeignInvestorId,
"3" => Self::TaiwaneseTradingAcct,
"4" => Self::MalaysianCentralDepository,
"5" => Self::ChineseInvestorId,
"6" => Self::UkNationalInsuranceOrPensionNumber,
"7" => Self::UsSocialSecurityNumber,
"8" => Self::UsEmployerOrTaxIdNumber,
"9" => Self::AustralianBusinessNumber,
"A" => Self::AustralianTaxFileNumber,
"I" => Self::IsitcAcronym,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Bic => "B",
Self::GeneralIdentifier => "C",
Self::Proprietary => "D",
Self::IsoCountryCode => "E",
Self::SettlementEntityLocation => "F",
Self::Mic => "G",
Self::CsdParticipant => "H",
Self::KoreanInvestorId => "1",
Self::TaiwaneseForeignInvestorId => "2",
Self::TaiwaneseTradingAcct => "3",
Self::MalaysianCentralDepository => "4",
Self::ChineseInvestorId => "5",
Self::UkNationalInsuranceOrPensionNumber => "6",
Self::UsSocialSecurityNumber => "7",
Self::UsEmployerOrTaxIdNumber => "8",
Self::AustralianBusinessNumber => "9",
Self::AustralianTaxFileNumber => "A",
Self::IsitcAcronym => "I",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for PartyIDSource<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PartyRole {
ExecutingFirm,
BrokerOfCredit,
ClientId,
ClearingFirm,
InvestorId,
IntroducingFirm,
EnteringFirm,
Locate,
FundManagerClientId,
SettlementLocation,
OrderOriginationTrader,
ExecutingTrader,
OrderOriginationFirm,
GiveupClearingFirm,
CorrespondantClearingFirm,
ExecutingSystem,
ContraFirm,
ContraClearingFirm,
SponsoringFirm,
UnderlyingContraFirm,
ClearingOrganization,
Exchange,
CustomerAccount,
CorrespondentClearingOrganization,
CorrespondentBroker,
Buyer,
Custodian,
Intermediary,
Agent,
SubCustodian,
Beneficiary,
InterestedParty,
RegulatoryBody,
LiquidityProvider,
EnteringTrader,
ContraTrader,
PositionAccount,
Unrecognized(i64),
}
impl PartyRole {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::ExecutingFirm,
2 => Self::BrokerOfCredit,
3 => Self::ClientId,
4 => Self::ClearingFirm,
5 => Self::InvestorId,
6 => Self::IntroducingFirm,
7 => Self::EnteringFirm,
8 => Self::Locate,
9 => Self::FundManagerClientId,
10 => Self::SettlementLocation,
11 => Self::OrderOriginationTrader,
12 => Self::ExecutingTrader,
13 => Self::OrderOriginationFirm,
14 => Self::GiveupClearingFirm,
15 => Self::CorrespondantClearingFirm,
16 => Self::ExecutingSystem,
17 => Self::ContraFirm,
18 => Self::ContraClearingFirm,
19 => Self::SponsoringFirm,
20 => Self::UnderlyingContraFirm,
21 => Self::ClearingOrganization,
22 => Self::Exchange,
24 => Self::CustomerAccount,
25 => Self::CorrespondentClearingOrganization,
26 => Self::CorrespondentBroker,
27 => Self::Buyer,
28 => Self::Custodian,
29 => Self::Intermediary,
30 => Self::Agent,
31 => Self::SubCustodian,
32 => Self::Beneficiary,
33 => Self::InterestedParty,
34 => Self::RegulatoryBody,
35 => Self::LiquidityProvider,
36 => Self::EnteringTrader,
37 => Self::ContraTrader,
38 => Self::PositionAccount,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ExecutingFirm => 1,
Self::BrokerOfCredit => 2,
Self::ClientId => 3,
Self::ClearingFirm => 4,
Self::InvestorId => 5,
Self::IntroducingFirm => 6,
Self::EnteringFirm => 7,
Self::Locate => 8,
Self::FundManagerClientId => 9,
Self::SettlementLocation => 10,
Self::OrderOriginationTrader => 11,
Self::ExecutingTrader => 12,
Self::OrderOriginationFirm => 13,
Self::GiveupClearingFirm => 14,
Self::CorrespondantClearingFirm => 15,
Self::ExecutingSystem => 16,
Self::ContraFirm => 17,
Self::ContraClearingFirm => 18,
Self::SponsoringFirm => 19,
Self::UnderlyingContraFirm => 20,
Self::ClearingOrganization => 21,
Self::Exchange => 22,
Self::CustomerAccount => 24,
Self::CorrespondentClearingOrganization => 25,
Self::CorrespondentBroker => 26,
Self::Buyer => 27,
Self::Custodian => 28,
Self::Intermediary => 29,
Self::Agent => 30,
Self::SubCustodian => 31,
Self::Beneficiary => 32,
Self::InterestedParty => 33,
Self::RegulatoryBody => 34,
Self::LiquidityProvider => 35,
Self::EnteringTrader => 36,
Self::ContraTrader => 37,
Self::PositionAccount => 38,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum Product {
Agency,
Commodity,
Corporate,
Currency,
Equity,
Government,
Index,
Loan,
Moneymarket,
Mortgage,
Municipal,
Other,
Financing,
Unrecognized(i64),
}
impl Product {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Agency,
2 => Self::Commodity,
3 => Self::Corporate,
4 => Self::Currency,
5 => Self::Equity,
6 => Self::Government,
7 => Self::Index,
8 => Self::Loan,
9 => Self::Moneymarket,
10 => Self::Mortgage,
11 => Self::Municipal,
12 => Self::Other,
13 => Self::Financing,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Agency => 1,
Self::Commodity => 2,
Self::Corporate => 3,
Self::Currency => 4,
Self::Equity => 5,
Self::Government => 6,
Self::Index => 7,
Self::Loan => 8,
Self::Moneymarket => 9,
Self::Mortgage => 10,
Self::Municipal => 11,
Self::Other => 12,
Self::Financing => 13,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum RoundingDirection<'a> {
RoundToNearest,
RoundDown,
RoundUp,
Unrecognized(&'a str),
}
impl<'a> RoundingDirection<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::RoundToNearest,
"1" => Self::RoundDown,
"2" => Self::RoundUp,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::RoundToNearest => "0",
Self::RoundDown => "1",
Self::RoundUp => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for RoundingDirection<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DistribPaymentMethod {
Crest,
Nscc,
Euroclear,
Clearstream,
Cheque,
TelegraphicTransfer,
FedWire,
DirectCredit,
AchCredit,
Bpay,
HighValueClearingSystemHvacs,
ReinvestInFund,
Unrecognized(i64),
}
impl DistribPaymentMethod {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Crest,
2 => Self::Nscc,
3 => Self::Euroclear,
4 => Self::Clearstream,
5 => Self::Cheque,
6 => Self::TelegraphicTransfer,
7 => Self::FedWire,
8 => Self::DirectCredit,
9 => Self::AchCredit,
10 => Self::Bpay,
11 => Self::HighValueClearingSystemHvacs,
12 => Self::ReinvestInFund,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Crest => 1,
Self::Nscc => 2,
Self::Euroclear => 3,
Self::Clearstream => 4,
Self::Cheque => 5,
Self::TelegraphicTransfer => 6,
Self::FedWire => 7,
Self::DirectCredit => 8,
Self::AchCredit => 9,
Self::Bpay => 10,
Self::HighValueClearingSystemHvacs => 11,
Self::ReinvestInFund => 12,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CancellationRights<'a> {
Yes,
NoExecutionOnly,
NoWaiverAgreement,
NoInstitutional,
Unrecognized(&'a str),
}
impl<'a> CancellationRights<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"Y" => Self::Yes,
"N" => Self::NoExecutionOnly,
"M" => Self::NoWaiverAgreement,
"O" => Self::NoInstitutional,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Yes => "Y",
Self::NoExecutionOnly => "N",
Self::NoWaiverAgreement => "M",
Self::NoInstitutional => "O",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for CancellationRights<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MoneyLaunderingStatus<'a> {
Passed,
NotChecked,
ExemptBelowLimit,
ExemptMoneyType,
ExemptAuthorised,
Unrecognized(&'a str),
}
impl<'a> MoneyLaunderingStatus<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"Y" => Self::Passed,
"N" => Self::NotChecked,
"1" => Self::ExemptBelowLimit,
"2" => Self::ExemptMoneyType,
"3" => Self::ExemptAuthorised,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Passed => "Y",
Self::NotChecked => "N",
Self::ExemptBelowLimit => "1",
Self::ExemptMoneyType => "2",
Self::ExemptAuthorised => "3",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MoneyLaunderingStatus<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ExecPriceType<'a> {
BidPrice,
CreationPrice,
CreationPricePlusAdjustmentPercent,
CreationPricePlusAdjustmentAmount,
OfferPrice,
OfferPriceMinusAdjustmentPercent,
OfferPriceMinusAdjustmentAmount,
SinglePrice,
Unrecognized(&'a str),
}
impl<'a> ExecPriceType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"B" => Self::BidPrice,
"C" => Self::CreationPrice,
"D" => Self::CreationPricePlusAdjustmentPercent,
"E" => Self::CreationPricePlusAdjustmentAmount,
"O" => Self::OfferPrice,
"P" => Self::OfferPriceMinusAdjustmentPercent,
"Q" => Self::OfferPriceMinusAdjustmentAmount,
"S" => Self::SinglePrice,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::BidPrice => "B",
Self::CreationPrice => "C",
Self::CreationPricePlusAdjustmentPercent => "D",
Self::CreationPricePlusAdjustmentAmount => "E",
Self::OfferPrice => "O",
Self::OfferPriceMinusAdjustmentPercent => "P",
Self::OfferPriceMinusAdjustmentAmount => "Q",
Self::SinglePrice => "S",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for ExecPriceType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PaymentMethod {
Crest,
Nscc,
Euroclear,
Clearstream,
Cheque,
TelegraphicTransfer,
FedWire,
DebitCard,
DirectDebit,
DirectCredit,
CreditCard,
AchDebit,
AchCredit,
Bpay,
HighValueClearingSystem,
Unrecognized(i64),
}
impl PaymentMethod {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Crest,
2 => Self::Nscc,
3 => Self::Euroclear,
4 => Self::Clearstream,
5 => Self::Cheque,
6 => Self::TelegraphicTransfer,
7 => Self::FedWire,
8 => Self::DebitCard,
9 => Self::DirectDebit,
10 => Self::DirectCredit,
11 => Self::CreditCard,
12 => Self::AchDebit,
13 => Self::AchCredit,
14 => Self::Bpay,
15 => Self::HighValueClearingSystem,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Crest => 1,
Self::Nscc => 2,
Self::Euroclear => 3,
Self::Clearstream => 4,
Self::Cheque => 5,
Self::TelegraphicTransfer => 6,
Self::FedWire => 7,
Self::DebitCard => 8,
Self::DirectDebit => 9,
Self::DirectCredit => 10,
Self::CreditCard => 11,
Self::AchDebit => 12,
Self::AchCredit => 13,
Self::Bpay => 14,
Self::HighValueClearingSystem => 15,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TaxAdvantageType {
None,
MaxiIsa,
Tessa,
MiniCashIsa,
MiniStocksAndSharesIsa,
MiniInsuranceIsa,
CurrentYearPayment,
PriorYearPayment,
AssetTransfer,
EmployeePriorYear,
EmployeeCurrentYear,
EmployerPriorYear,
EmployerCurrentYear,
NonFundPrototypeIra,
NonFundQualifiedPlan,
DefinedContributionPlan,
Ira,
IraRollover,
Keogh,
ProfitSharingPlan,
Us401K,
SelfDirectedIra,
Us403b,
Us457,
RothIraPrototype,
RothIraNonPrototype,
RothConversionIraPrototype,
RothConversionIraNonPrototype,
EducationIraPrototype,
EducationIraNonPrototype,
Unrecognized(i64),
}
impl TaxAdvantageType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::None,
1 => Self::MaxiIsa,
2 => Self::Tessa,
3 => Self::MiniCashIsa,
4 => Self::MiniStocksAndSharesIsa,
5 => Self::MiniInsuranceIsa,
6 => Self::CurrentYearPayment,
7 => Self::PriorYearPayment,
8 => Self::AssetTransfer,
9 => Self::EmployeePriorYear,
10 => Self::EmployeeCurrentYear,
11 => Self::EmployerPriorYear,
12 => Self::EmployerCurrentYear,
13 => Self::NonFundPrototypeIra,
14 => Self::NonFundQualifiedPlan,
15 => Self::DefinedContributionPlan,
16 => Self::Ira,
17 => Self::IraRollover,
18 => Self::Keogh,
19 => Self::ProfitSharingPlan,
20 => Self::Us401K,
21 => Self::SelfDirectedIra,
22 => Self::Us403b,
23 => Self::Us457,
24 => Self::RothIraPrototype,
25 => Self::RothIraNonPrototype,
26 => Self::RothConversionIraPrototype,
27 => Self::RothConversionIraNonPrototype,
28 => Self::EducationIraPrototype,
29 => Self::EducationIraNonPrototype,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::None => 0,
Self::MaxiIsa => 1,
Self::Tessa => 2,
Self::MiniCashIsa => 3,
Self::MiniStocksAndSharesIsa => 4,
Self::MiniInsuranceIsa => 5,
Self::CurrentYearPayment => 6,
Self::PriorYearPayment => 7,
Self::AssetTransfer => 8,
Self::EmployeePriorYear => 9,
Self::EmployeeCurrentYear => 10,
Self::EmployerPriorYear => 11,
Self::EmployerCurrentYear => 12,
Self::NonFundPrototypeIra => 13,
Self::NonFundQualifiedPlan => 14,
Self::DefinedContributionPlan => 15,
Self::Ira => 16,
Self::IraRollover => 17,
Self::Keogh => 18,
Self::ProfitSharingPlan => 19,
Self::Us401K => 20,
Self::SelfDirectedIra => 21,
Self::Us403b => 22,
Self::Us457 => 23,
Self::RothIraPrototype => 24,
Self::RothIraNonPrototype => 25,
Self::RothConversionIraPrototype => 26,
Self::RothConversionIraNonPrototype => 27,
Self::EducationIraPrototype => 28,
Self::EducationIraNonPrototype => 29,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum FundRenewWaiv<'a> {
Yes,
No,
Unrecognized(&'a str),
}
impl<'a> FundRenewWaiv<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"Y" => Self::Yes,
"N" => Self::No,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Yes => "Y",
Self::No => "N",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for FundRenewWaiv<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum RegistStatus<'a> {
Accepted,
Rejected,
Held,
Reminder,
Unrecognized(&'a str),
}
impl<'a> RegistStatus<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::Accepted,
"R" => Self::Rejected,
"H" => Self::Held,
"N" => Self::Reminder,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Accepted => "A",
Self::Rejected => "R",
Self::Held => "H",
Self::Reminder => "N",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for RegistStatus<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum RegistRejReasonCode {
InvalidAccountType,
InvalidTaxExemptType,
InvalidOwnershipType,
NoRegDetails,
InvalidRegSeqNo,
InvalidRegDetails,
InvalidMailingDetails,
InvalidMailingInstructions,
InvalidInvestorId,
InvalidInvestorIdSource,
InvalidDateOfBirth,
InvalidCountry,
InvalidDistribInstns,
InvalidPercentage,
InvalidPaymentMethod,
InvalidAccountName,
InvalidAgentCode,
InvalidAccountNum,
Other,
Unrecognized(i64),
}
impl RegistRejReasonCode {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::InvalidAccountType,
2 => Self::InvalidTaxExemptType,
3 => Self::InvalidOwnershipType,
4 => Self::NoRegDetails,
5 => Self::InvalidRegSeqNo,
6 => Self::InvalidRegDetails,
7 => Self::InvalidMailingDetails,
8 => Self::InvalidMailingInstructions,
9 => Self::InvalidInvestorId,
10 => Self::InvalidInvestorIdSource,
11 => Self::InvalidDateOfBirth,
12 => Self::InvalidCountry,
13 => Self::InvalidDistribInstns,
14 => Self::InvalidPercentage,
15 => Self::InvalidPaymentMethod,
16 => Self::InvalidAccountName,
17 => Self::InvalidAgentCode,
18 => Self::InvalidAccountNum,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::InvalidAccountType => 1,
Self::InvalidTaxExemptType => 2,
Self::InvalidOwnershipType => 3,
Self::NoRegDetails => 4,
Self::InvalidRegSeqNo => 5,
Self::InvalidRegDetails => 6,
Self::InvalidMailingDetails => 7,
Self::InvalidMailingInstructions => 8,
Self::InvalidInvestorId => 9,
Self::InvalidInvestorIdSource => 10,
Self::InvalidDateOfBirth => 11,
Self::InvalidCountry => 12,
Self::InvalidDistribInstns => 13,
Self::InvalidPercentage => 14,
Self::InvalidPaymentMethod => 15,
Self::InvalidAccountName => 16,
Self::InvalidAgentCode => 17,
Self::InvalidAccountNum => 18,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum RegistTransType<'a> {
New,
Replace,
Cancel,
Unrecognized(&'a str),
}
impl<'a> RegistTransType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::New,
"1" => Self::Replace,
"2" => Self::Cancel,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::New => "0",
Self::Replace => "1",
Self::Cancel => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for RegistTransType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OwnershipType<'a> {
JointInvestors,
TenantsInCommon,
JointTrustees,
Unrecognized(&'a str),
}
impl<'a> OwnershipType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"J" => Self::JointInvestors,
"T" => Self::TenantsInCommon,
"2" => Self::JointTrustees,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::JointInvestors => "J",
Self::TenantsInCommon => "T",
Self::JointTrustees => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for OwnershipType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ContAmtType {
CommissionAmount,
CommissionPercent,
InitialChargeAmount,
InitialChargePercent,
DiscountAmount,
DiscountPercent,
DilutionLevyAmount,
DilutionLevyPercent,
ExitChargeAmount,
ExitChargePercent,
FundBasedRenewalCommissionPercent,
ProjectedFundValue,
FundBasedRenewalCommissionOnOrder,
FundBasedRenewalCommissionOnFund,
NetSettlementAmount,
Unrecognized(i64),
}
impl ContAmtType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::CommissionAmount,
2 => Self::CommissionPercent,
3 => Self::InitialChargeAmount,
4 => Self::InitialChargePercent,
5 => Self::DiscountAmount,
6 => Self::DiscountPercent,
7 => Self::DilutionLevyAmount,
8 => Self::DilutionLevyPercent,
9 => Self::ExitChargeAmount,
10 => Self::ExitChargePercent,
11 => Self::FundBasedRenewalCommissionPercent,
12 => Self::ProjectedFundValue,
13 => Self::FundBasedRenewalCommissionOnOrder,
14 => Self::FundBasedRenewalCommissionOnFund,
15 => Self::NetSettlementAmount,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::CommissionAmount => 1,
Self::CommissionPercent => 2,
Self::InitialChargeAmount => 3,
Self::InitialChargePercent => 4,
Self::DiscountAmount => 5,
Self::DiscountPercent => 6,
Self::DilutionLevyAmount => 7,
Self::DilutionLevyPercent => 8,
Self::ExitChargeAmount => 9,
Self::ExitChargePercent => 10,
Self::FundBasedRenewalCommissionPercent => 11,
Self::ProjectedFundValue => 12,
Self::FundBasedRenewalCommissionOnOrder => 13,
Self::FundBasedRenewalCommissionOnFund => 14,
Self::NetSettlementAmount => 15,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OwnerType {
IndividualInvestor,
PublicCompany,
PrivateCompany,
IndividualTrustee,
CompanyTrustee,
PensionPlan,
CustodianUnderGiftsToMinorsAct,
Trusts,
Fiduciaries,
NetworkingSubAccount,
NonProfitOrganization,
CorporateBody,
Nominee,
Unrecognized(i64),
}
impl OwnerType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::IndividualInvestor,
2 => Self::PublicCompany,
3 => Self::PrivateCompany,
4 => Self::IndividualTrustee,
5 => Self::CompanyTrustee,
6 => Self::PensionPlan,
7 => Self::CustodianUnderGiftsToMinorsAct,
8 => Self::Trusts,
9 => Self::Fiduciaries,
10 => Self::NetworkingSubAccount,
11 => Self::NonProfitOrganization,
12 => Self::CorporateBody,
13 => Self::Nominee,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::IndividualInvestor => 1,
Self::PublicCompany => 2,
Self::PrivateCompany => 3,
Self::IndividualTrustee => 4,
Self::CompanyTrustee => 5,
Self::PensionPlan => 6,
Self::CustodianUnderGiftsToMinorsAct => 7,
Self::Trusts => 8,
Self::Fiduciaries => 9,
Self::NetworkingSubAccount => 10,
Self::NonProfitOrganization => 11,
Self::CorporateBody => 12,
Self::Nominee => 13,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OrderCapacity<'a> {
Agency,
Proprietary,
Individual,
Principal,
RisklessPrincipal,
AgentForOtherMember,
Unrecognized(&'a str),
}
impl<'a> OrderCapacity<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::Agency,
"G" => Self::Proprietary,
"I" => Self::Individual,
"P" => Self::Principal,
"R" => Self::RisklessPrincipal,
"W" => Self::AgentForOtherMember,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Agency => "A",
Self::Proprietary => "G",
Self::Individual => "I",
Self::Principal => "P",
Self::RisklessPrincipal => "R",
Self::AgentForOtherMember => "W",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for OrderCapacity<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum OrderRestrictions<'a> {
ProgramTrade,
IndexArbitrage,
NonIndexArbitrage,
CompetingMarketMaker,
ActingAsMarketMakerOrSpecialistInSecurity,
ActingAsMarketMakerOrSpecialistInUnderlying,
ForeignEntity,
ExternalMarketParticipant,
ExternalInterConnectedMarketLinkage,
RisklessArbitrage,
Unrecognized(&'a str),
}
impl<'a> OrderRestrictions<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::ProgramTrade,
"2" => Self::IndexArbitrage,
"3" => Self::NonIndexArbitrage,
"4" => Self::CompetingMarketMaker,
"5" => Self::ActingAsMarketMakerOrSpecialistInSecurity,
"6" => Self::ActingAsMarketMakerOrSpecialistInUnderlying,
"7" => Self::ForeignEntity,
"8" => Self::ExternalMarketParticipant,
"9" => Self::ExternalInterConnectedMarketLinkage,
"A" => Self::RisklessArbitrage,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::ProgramTrade => "1",
Self::IndexArbitrage => "2",
Self::NonIndexArbitrage => "3",
Self::CompetingMarketMaker => "4",
Self::ActingAsMarketMakerOrSpecialistInSecurity => "5",
Self::ActingAsMarketMakerOrSpecialistInUnderlying => "6",
Self::ForeignEntity => "7",
Self::ExternalMarketParticipant => "8",
Self::ExternalInterConnectedMarketLinkage => "9",
Self::RisklessArbitrage => "A",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for OrderRestrictions<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MassCancelRequestType<'a> {
CancelOrdersForASecurity,
CancelOrdersForAnUnderlyingSecurity,
CancelOrdersForAProduct,
CancelOrdersForAcfiCode,
CancelOrdersForASecurityType,
CancelOrdersForATradingSession,
CancelAllOrders,
Unrecognized(&'a str),
}
impl<'a> MassCancelRequestType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::CancelOrdersForASecurity,
"2" => Self::CancelOrdersForAnUnderlyingSecurity,
"3" => Self::CancelOrdersForAProduct,
"4" => Self::CancelOrdersForAcfiCode,
"5" => Self::CancelOrdersForASecurityType,
"6" => Self::CancelOrdersForATradingSession,
"7" => Self::CancelAllOrders,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::CancelOrdersForASecurity => "1",
Self::CancelOrdersForAnUnderlyingSecurity => "2",
Self::CancelOrdersForAProduct => "3",
Self::CancelOrdersForAcfiCode => "4",
Self::CancelOrdersForASecurityType => "5",
Self::CancelOrdersForATradingSession => "6",
Self::CancelAllOrders => "7",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MassCancelRequestType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MassCancelResponse<'a> {
CancelRequestRejected,
CancelOrdersForASecurity,
CancelOrdersForAnUnderlyingSecurity,
CancelOrdersForAProduct,
CancelOrdersForAcfiCode,
CancelOrdersForASecurityType,
CancelOrdersForATradingSession,
CancelAllOrders,
Unrecognized(&'a str),
}
impl<'a> MassCancelResponse<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::CancelRequestRejected,
"1" => Self::CancelOrdersForASecurity,
"2" => Self::CancelOrdersForAnUnderlyingSecurity,
"3" => Self::CancelOrdersForAProduct,
"4" => Self::CancelOrdersForAcfiCode,
"5" => Self::CancelOrdersForASecurityType,
"6" => Self::CancelOrdersForATradingSession,
"7" => Self::CancelAllOrders,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::CancelRequestRejected => "0",
Self::CancelOrdersForASecurity => "1",
Self::CancelOrdersForAnUnderlyingSecurity => "2",
Self::CancelOrdersForAProduct => "3",
Self::CancelOrdersForAcfiCode => "4",
Self::CancelOrdersForASecurityType => "5",
Self::CancelOrdersForATradingSession => "6",
Self::CancelAllOrders => "7",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MassCancelResponse<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MassCancelRejectReason<'a> {
MassCancelNotSupported,
InvalidOrUnknownSecurity,
InvalidOrUnkownUnderlyingSecurity,
InvalidOrUnknownProduct,
InvalidOrUnknownCfiCode,
InvalidOrUnknownSecurityType,
InvalidOrUnknownTradingSession,
Other,
Unrecognized(&'a str),
}
impl<'a> MassCancelRejectReason<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::MassCancelNotSupported,
"1" => Self::InvalidOrUnknownSecurity,
"2" => Self::InvalidOrUnkownUnderlyingSecurity,
"3" => Self::InvalidOrUnknownProduct,
"4" => Self::InvalidOrUnknownCfiCode,
"5" => Self::InvalidOrUnknownSecurityType,
"6" => Self::InvalidOrUnknownTradingSession,
"99" => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::MassCancelNotSupported => "0",
Self::InvalidOrUnknownSecurity => "1",
Self::InvalidOrUnkownUnderlyingSecurity => "2",
Self::InvalidOrUnknownProduct => "3",
Self::InvalidOrUnknownCfiCode => "4",
Self::InvalidOrUnknownSecurityType => "5",
Self::InvalidOrUnknownTradingSession => "6",
Self::Other => "99",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MassCancelRejectReason<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteType {
Indicative,
Tradeable,
RestrictedTradeable,
Counter,
Unrecognized(i64),
}
impl QuoteType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Indicative,
1 => Self::Tradeable,
2 => Self::RestrictedTradeable,
3 => Self::Counter,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Indicative => 0,
Self::Tradeable => 1,
Self::RestrictedTradeable => 2,
Self::Counter => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CashMargin<'a> {
Cash,
MarginOpen,
MarginClose,
Unrecognized(&'a str),
}
impl<'a> CashMargin<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::Cash,
"2" => Self::MarginOpen,
"3" => Self::MarginClose,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Cash => "1",
Self::MarginOpen => "2",
Self::MarginClose => "3",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for CashMargin<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum Scope<'a> {
LocalMarket,
National,
Global,
Unrecognized(&'a str),
}
impl<'a> Scope<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"1" => Self::LocalMarket,
"2" => Self::National,
"3" => Self::Global,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::LocalMarket => "1",
Self::National => "2",
Self::Global => "3",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for Scope<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CrossType {
CrossAon,
CrossIoc,
CrossOneSide,
CrossSamePrice,
Unrecognized(i64),
}
impl CrossType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::CrossAon,
2 => Self::CrossIoc,
3 => Self::CrossOneSide,
4 => Self::CrossSamePrice,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::CrossAon => 1,
Self::CrossIoc => 2,
Self::CrossOneSide => 3,
Self::CrossSamePrice => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CrossPrioritization {
None,
BuySideIsPrioritized,
SellSideIsPrioritized,
Unrecognized(i64),
}
impl CrossPrioritization {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::None,
1 => Self::BuySideIsPrioritized,
2 => Self::SellSideIsPrioritized,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::None => 0,
Self::BuySideIsPrioritized => 1,
Self::SellSideIsPrioritized => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum NoSides {
OneSide,
BothSides,
Unrecognized(i64),
}
impl NoSides {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::OneSide,
2 => Self::BothSides,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::OneSide => 1,
Self::BothSides => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SecurityListRequestType {
Symbol,
SecurityTypeAnd,
Product,
TradingSessionId,
AllSecurities,
Unrecognized(i64),
}
impl SecurityListRequestType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Symbol,
1 => Self::SecurityTypeAnd,
2 => Self::Product,
3 => Self::TradingSessionId,
4 => Self::AllSecurities,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Symbol => 0,
Self::SecurityTypeAnd => 1,
Self::Product => 2,
Self::TradingSessionId => 3,
Self::AllSecurities => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SecurityRequestResult {
ValidRequest,
InvalidOrUnsupportedRequest,
NoInstrumentsFound,
NotAuthorizedToRetrieveInstrumentData,
InstrumentDataTemporarilyUnavailable,
RequestForInstrumentDataNotSupported,
Unrecognized(i64),
}
impl SecurityRequestResult {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::ValidRequest,
1 => Self::InvalidOrUnsupportedRequest,
2 => Self::NoInstrumentsFound,
3 => Self::NotAuthorizedToRetrieveInstrumentData,
4 => Self::InstrumentDataTemporarilyUnavailable,
5 => Self::RequestForInstrumentDataNotSupported,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ValidRequest => 0,
Self::InvalidOrUnsupportedRequest => 1,
Self::NoInstrumentsFound => 2,
Self::NotAuthorizedToRetrieveInstrumentData => 3,
Self::InstrumentDataTemporarilyUnavailable => 4,
Self::RequestForInstrumentDataNotSupported => 5,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MultiLegRptTypeReq {
ReportByMulitlegSecurityOnly,
ReportByMultilegSecurityAndInstrumentLegs,
ReportByInstrumentLegsOnly,
Unrecognized(i64),
}
impl MultiLegRptTypeReq {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::ReportByMulitlegSecurityOnly,
1 => Self::ReportByMultilegSecurityAndInstrumentLegs,
2 => Self::ReportByInstrumentLegsOnly,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ReportByMulitlegSecurityOnly => 0,
Self::ReportByMultilegSecurityAndInstrumentLegs => 1,
Self::ReportByInstrumentLegsOnly => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradSesStatusRejReason {
UnknownOrInvalidTradingSessionId,
Other,
Unrecognized(i64),
}
impl TradSesStatusRejReason {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::UnknownOrInvalidTradingSessionId,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::UnknownOrInvalidTradingSessionId => 1,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradeRequestType {
AllTrades,
MatchedTradesMatchingCriteria,
UnmatchedTradesThatMatchCriteria,
UnreportedTradesThatMatchCriteria,
AdvisoriesThatMatchCriteria,
Unrecognized(i64),
}
impl TradeRequestType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::AllTrades,
1 => Self::MatchedTradesMatchingCriteria,
2 => Self::UnmatchedTradesThatMatchCriteria,
3 => Self::UnreportedTradesThatMatchCriteria,
4 => Self::AdvisoriesThatMatchCriteria,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::AllTrades => 0,
Self::MatchedTradesMatchingCriteria => 1,
Self::UnmatchedTradesThatMatchCriteria => 2,
Self::UnreportedTradesThatMatchCriteria => 3,
Self::AdvisoriesThatMatchCriteria => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MatchStatus<'a> {
Compared,
Uncompared,
AdvisoryOrAlert,
Unrecognized(&'a str),
}
impl<'a> MatchStatus<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Compared,
"1" => Self::Uncompared,
"2" => Self::AdvisoryOrAlert,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Compared => "0",
Self::Uncompared => "1",
Self::AdvisoryOrAlert => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MatchStatus<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MatchType<'a> {
ExactMatchPlus4BadgesExecTime,
ExactMatchPlus4Badges,
ExactMatchPlus2BadgesExecTime,
ExactMatchPlus2Badges,
ExactMatchPlusExecTime,
StampedAdvisoriesOrSpecialistAccepts,
A1ExactMatchSummarizedQuantity,
A2ExactMatchSummarizedQuantity,
A3ExactMatchSummarizedQuantity,
A4ExactMatchSummarizedQuantity,
A5ExactMatchSummarizedQuantity,
ExactMatchMinusBadgesTimes,
SummarizedMatchMinusBadgesTimes,
OcsLockedIn,
ActAcceptedTrade,
ActDefaultTrade,
ActDefaultAfterM2,
Actm6Match,
Unrecognized(&'a str),
}
impl<'a> MatchType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A1" => Self::ExactMatchPlus4BadgesExecTime,
"A2" => Self::ExactMatchPlus4Badges,
"A3" => Self::ExactMatchPlus2BadgesExecTime,
"A4" => Self::ExactMatchPlus2Badges,
"A5" => Self::ExactMatchPlusExecTime,
"AQ" => Self::StampedAdvisoriesOrSpecialistAccepts,
"S1" => Self::A1ExactMatchSummarizedQuantity,
"S2" => Self::A2ExactMatchSummarizedQuantity,
"S3" => Self::A3ExactMatchSummarizedQuantity,
"S4" => Self::A4ExactMatchSummarizedQuantity,
"S5" => Self::A5ExactMatchSummarizedQuantity,
"M1" => Self::ExactMatchMinusBadgesTimes,
"M2" => Self::SummarizedMatchMinusBadgesTimes,
"MT" => Self::OcsLockedIn,
"M3" => Self::ActAcceptedTrade,
"M4" => Self::ActDefaultTrade,
"M5" => Self::ActDefaultAfterM2,
"M6" => Self::Actm6Match,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::ExactMatchPlus4BadgesExecTime => "A1",
Self::ExactMatchPlus4Badges => "A2",
Self::ExactMatchPlus2BadgesExecTime => "A3",
Self::ExactMatchPlus2Badges => "A4",
Self::ExactMatchPlusExecTime => "A5",
Self::StampedAdvisoriesOrSpecialistAccepts => "AQ",
Self::A1ExactMatchSummarizedQuantity => "S1",
Self::A2ExactMatchSummarizedQuantity => "S2",
Self::A3ExactMatchSummarizedQuantity => "S3",
Self::A4ExactMatchSummarizedQuantity => "S4",
Self::A5ExactMatchSummarizedQuantity => "S5",
Self::ExactMatchMinusBadgesTimes => "M1",
Self::SummarizedMatchMinusBadgesTimes => "M2",
Self::OcsLockedIn => "MT",
Self::ActAcceptedTrade => "M3",
Self::ActDefaultTrade => "M4",
Self::ActDefaultAfterM2 => "M5",
Self::Actm6Match => "M6",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for MatchType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ClearingInstruction {
ProcessNormally,
ExcludeFromAllNetting,
BilateralNettingOnly,
ExClearing,
SpecialTrade,
MultilateralNetting,
ClearAgainstCentralCounterparty,
ExcludeFromCentralCounterparty,
ManualMode,
AutomaticPostingMode,
AutomaticGiveUpMode,
QualifiedServiceRepresentativeQsr,
CustomerTrade,
SelfClearing,
Unrecognized(i64),
}
impl ClearingInstruction {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::ProcessNormally,
1 => Self::ExcludeFromAllNetting,
2 => Self::BilateralNettingOnly,
3 => Self::ExClearing,
4 => Self::SpecialTrade,
5 => Self::MultilateralNetting,
6 => Self::ClearAgainstCentralCounterparty,
7 => Self::ExcludeFromCentralCounterparty,
8 => Self::ManualMode,
9 => Self::AutomaticPostingMode,
10 => Self::AutomaticGiveUpMode,
11 => Self::QualifiedServiceRepresentativeQsr,
12 => Self::CustomerTrade,
13 => Self::SelfClearing,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ProcessNormally => 0,
Self::ExcludeFromAllNetting => 1,
Self::BilateralNettingOnly => 2,
Self::ExClearing => 3,
Self::SpecialTrade => 4,
Self::MultilateralNetting => 5,
Self::ClearAgainstCentralCounterparty => 6,
Self::ExcludeFromCentralCounterparty => 7,
Self::ManualMode => 8,
Self::AutomaticPostingMode => 9,
Self::AutomaticGiveUpMode => 10,
Self::QualifiedServiceRepresentativeQsr => 11,
Self::CustomerTrade => 12,
Self::SelfClearing => 13,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AccountType {
CarriedCustomerSide,
CarriedNonCustomerSide,
HouseTrader,
FloorTrader,
CarriedNonCustomerSideCrossMargined,
HouseTraderCrossMargined,
JointBackOfficeAccount,
Unrecognized(i64),
}
impl AccountType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::CarriedCustomerSide,
2 => Self::CarriedNonCustomerSide,
3 => Self::HouseTrader,
4 => Self::FloorTrader,
6 => Self::CarriedNonCustomerSideCrossMargined,
7 => Self::HouseTraderCrossMargined,
8 => Self::JointBackOfficeAccount,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::CarriedCustomerSide => 1,
Self::CarriedNonCustomerSide => 2,
Self::HouseTrader => 3,
Self::FloorTrader => 4,
Self::CarriedNonCustomerSideCrossMargined => 6,
Self::HouseTraderCrossMargined => 7,
Self::JointBackOfficeAccount => 8,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CustOrderCapacity {
MemberTradingForTheirOwnAccount,
ClearingFirmTradingForItsProprietaryAccount,
MemberTradingForAnotherMember,
AllOther,
Unrecognized(i64),
}
impl CustOrderCapacity {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::MemberTradingForTheirOwnAccount,
2 => Self::ClearingFirmTradingForItsProprietaryAccount,
3 => Self::MemberTradingForAnotherMember,
4 => Self::AllOther,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::MemberTradingForTheirOwnAccount => 1,
Self::ClearingFirmTradingForItsProprietaryAccount => 2,
Self::MemberTradingForAnotherMember => 3,
Self::AllOther => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MassStatusReqType {
StatusForOrdersForASecurity,
StatusForOrdersForAnUnderlyingSecurity,
StatusForOrdersForAProduct,
StatusForOrdersForAcfiCode,
StatusForOrdersForASecurityType,
StatusForOrdersForATradingSession,
StatusForAllOrders,
StatusForOrdersForAPartyId,
Unrecognized(i64),
}
impl MassStatusReqType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::StatusForOrdersForASecurity,
2 => Self::StatusForOrdersForAnUnderlyingSecurity,
3 => Self::StatusForOrdersForAProduct,
4 => Self::StatusForOrdersForAcfiCode,
5 => Self::StatusForOrdersForASecurityType,
6 => Self::StatusForOrdersForATradingSession,
7 => Self::StatusForAllOrders,
8 => Self::StatusForOrdersForAPartyId,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::StatusForOrdersForASecurity => 1,
Self::StatusForOrdersForAnUnderlyingSecurity => 2,
Self::StatusForOrdersForAProduct => 3,
Self::StatusForOrdersForAcfiCode => 4,
Self::StatusForOrdersForASecurityType => 5,
Self::StatusForOrdersForATradingSession => 6,
Self::StatusForAllOrders => 7,
Self::StatusForOrdersForAPartyId => 8,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DayBookingInst<'a> {
Auto,
SpeakWithOrderInitiatorBeforeBooking,
Accumulate,
Unrecognized(&'a str),
}
impl<'a> DayBookingInst<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::Auto,
"1" => Self::SpeakWithOrderInitiatorBeforeBooking,
"2" => Self::Accumulate,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Auto => "0",
Self::SpeakWithOrderInitiatorBeforeBooking => "1",
Self::Accumulate => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for DayBookingInst<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BookingUnit<'a> {
EachPartialExecutionIsABookableUnit,
AggregatePartialExecutionsOnThisOrder,
AggregateExecutionsForThisSymbol,
Unrecognized(&'a str),
}
impl<'a> BookingUnit<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::EachPartialExecutionIsABookableUnit,
"1" => Self::AggregatePartialExecutionsOnThisOrder,
"2" => Self::AggregateExecutionsForThisSymbol,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::EachPartialExecutionIsABookableUnit => "0",
Self::AggregatePartialExecutionsOnThisOrder => "1",
Self::AggregateExecutionsForThisSymbol => "2",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for BookingUnit<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PreallocMethod<'a> {
ProRata,
DoNotProRata,
Unrecognized(&'a str),
}
impl<'a> PreallocMethod<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"0" => Self::ProRata,
"1" => Self::DoNotProRata,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::ProRata => "0",
Self::DoNotProRata => "1",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for PreallocMethod<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocType {
Calculated,
Preliminary,
ReadyToBook,
WarehouseInstruction,
RequestToIntermediary,
Unrecognized(i64),
}
impl AllocType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Calculated,
2 => Self::Preliminary,
5 => Self::ReadyToBook,
7 => Self::WarehouseInstruction,
8 => Self::RequestToIntermediary,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Calculated => 1,
Self::Preliminary => 2,
Self::ReadyToBook => 5,
Self::WarehouseInstruction => 7,
Self::RequestToIntermediary => 8,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ClearingFeeIndicator<'a> {
CboeMember,
NonMemberAndCustomer,
EquityMemberAndClearingMember,
FullAndAssociateMember,
Firms106HAnd106J,
Gim,
Lessee106FEmployees,
AllOtherOwnershipTypes,
FirstYearDelegate,
SecondYearDelegate,
ThirdYearDelegate,
FourthYearDelegate,
FifthYearDelegate,
SixthYearDelegate,
Unrecognized(&'a str),
}
impl<'a> ClearingFeeIndicator<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"B" => Self::CboeMember,
"C" => Self::NonMemberAndCustomer,
"E" => Self::EquityMemberAndClearingMember,
"F" => Self::FullAndAssociateMember,
"H" => Self::Firms106HAnd106J,
"I" => Self::Gim,
"L" => Self::Lessee106FEmployees,
"M" => Self::AllOtherOwnershipTypes,
"1" => Self::FirstYearDelegate,
"2" => Self::SecondYearDelegate,
"3" => Self::ThirdYearDelegate,
"4" => Self::FourthYearDelegate,
"5" => Self::FifthYearDelegate,
"9" => Self::SixthYearDelegate,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::CboeMember => "B",
Self::NonMemberAndCustomer => "C",
Self::EquityMemberAndClearingMember => "E",
Self::FullAndAssociateMember => "F",
Self::Firms106HAnd106J => "H",
Self::Gim => "I",
Self::Lessee106FEmployees => "L",
Self::AllOtherOwnershipTypes => "M",
Self::FirstYearDelegate => "1",
Self::SecondYearDelegate => "2",
Self::ThirdYearDelegate => "3",
Self::FourthYearDelegate => "4",
Self::FifthYearDelegate => "5",
Self::SixthYearDelegate => "9",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for ClearingFeeIndicator<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PriorityIndicator {
PriorityUnchanged,
LostPriorityAsResultOfOrderChange,
Unrecognized(i64),
}
impl PriorityIndicator {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::PriorityUnchanged,
1 => Self::LostPriorityAsResultOfOrderChange,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::PriorityUnchanged => 0,
Self::LostPriorityAsResultOfOrderChange => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteRequestRejectReason {
UnknownSymbol,
Exchange,
QuoteRequestExceedsLimit,
TooLateToEnter,
InvalidPrice,
NotAuthorizedToRequestQuote,
NoMatchForInquiry,
NoMarketForInstrument,
NoInventory,
Pass,
Other,
Unrecognized(i64),
}
impl QuoteRequestRejectReason {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::UnknownSymbol,
2 => Self::Exchange,
3 => Self::QuoteRequestExceedsLimit,
4 => Self::TooLateToEnter,
5 => Self::InvalidPrice,
6 => Self::NotAuthorizedToRequestQuote,
7 => Self::NoMatchForInquiry,
8 => Self::NoMarketForInstrument,
9 => Self::NoInventory,
10 => Self::Pass,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::UnknownSymbol => 1,
Self::Exchange => 2,
Self::QuoteRequestExceedsLimit => 3,
Self::TooLateToEnter => 4,
Self::InvalidPrice => 5,
Self::NotAuthorizedToRequestQuote => 6,
Self::NoMatchForInquiry => 7,
Self::NoMarketForInstrument => 8,
Self::NoInventory => 9,
Self::Pass => 10,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AcctIDSource {
Bic,
SidCode,
Tfm,
Omgeo,
DtccCode,
Other,
Unrecognized(i64),
}
impl AcctIDSource {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Bic,
2 => Self::SidCode,
3 => Self::Tfm,
4 => Self::Omgeo,
5 => Self::DtccCode,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Bic => 1,
Self::SidCode => 2,
Self::Tfm => 3,
Self::Omgeo => 4,
Self::DtccCode => 5,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ConfirmStatus {
Received,
MismatchedAccount,
MissingSettlementInstructions,
Confirmed,
RequestRejected,
Unrecognized(i64),
}
impl ConfirmStatus {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Received,
2 => Self::MismatchedAccount,
3 => Self::MissingSettlementInstructions,
4 => Self::Confirmed,
5 => Self::RequestRejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Received => 1,
Self::MismatchedAccount => 2,
Self::MissingSettlementInstructions => 3,
Self::Confirmed => 4,
Self::RequestRejected => 5,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ConfirmTransType {
New,
Replace,
Cancel,
Unrecognized(i64),
}
impl ConfirmTransType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::New,
1 => Self::Replace,
2 => Self::Cancel,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::New => 0,
Self::Replace => 1,
Self::Cancel => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DeliveryForm {
BookEntry,
Bearer,
Unrecognized(i64),
}
impl DeliveryForm {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::BookEntry,
2 => Self::Bearer,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::BookEntry => 1,
Self::Bearer => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum LegSwapType {
ParForPar,
ModifiedDuration,
Risk,
Proceeds,
Unrecognized(i64),
}
impl LegSwapType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::ParForPar,
2 => Self::ModifiedDuration,
4 => Self::Risk,
5 => Self::Proceeds,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ParForPar => 1,
Self::ModifiedDuration => 2,
Self::Risk => 4,
Self::Proceeds => 5,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuotePriceType {
Percent,
PerShare,
FixedAmount,
Discount,
Premium,
Spread,
TedPrice,
TedYield,
YieldSpread,
Yield,
Unrecognized(i64),
}
impl QuotePriceType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Percent,
2 => Self::PerShare,
3 => Self::FixedAmount,
4 => Self::Discount,
5 => Self::Premium,
6 => Self::Spread,
7 => Self::TedPrice,
8 => Self::TedYield,
9 => Self::YieldSpread,
10 => Self::Yield,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Percent => 1,
Self::PerShare => 2,
Self::FixedAmount => 3,
Self::Discount => 4,
Self::Premium => 5,
Self::Spread => 6,
Self::TedPrice => 7,
Self::TedYield => 8,
Self::YieldSpread => 9,
Self::Yield => 10,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QuoteRespType {
Hit,
Counter,
Expired,
Cover,
DoneAway,
Pass,
Unrecognized(i64),
}
impl QuoteRespType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Hit,
2 => Self::Counter,
3 => Self::Expired,
4 => Self::Cover,
5 => Self::DoneAway,
6 => Self::Pass,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Hit => 1,
Self::Counter => 2,
Self::Expired => 3,
Self::Cover => 4,
Self::DoneAway => 5,
Self::Pass => 6,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosType<'a> {
TransactionQuantity,
IntraSpreadQty,
InterSpreadQty,
EndOfDayQty,
StartOfDayQty,
OptionExerciseQty,
OptionAssignment,
TransactionFromExercise,
TransactionFromAssignment,
PitTradeQty,
TransferTradeQty,
ElectronicTradeQty,
AllocationTradeQty,
AdjustmentQty,
AsOfTradeQty,
DeliveryQty,
TotalTransactionQty,
CrossMarginQty,
IntegralSplit,
Unrecognized(&'a str),
}
impl<'a> PosType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"TQ" => Self::TransactionQuantity,
"IAS" => Self::IntraSpreadQty,
"IES" => Self::InterSpreadQty,
"FIN" => Self::EndOfDayQty,
"SOD" => Self::StartOfDayQty,
"EX" => Self::OptionExerciseQty,
"AS" => Self::OptionAssignment,
"TX" => Self::TransactionFromExercise,
"TA" => Self::TransactionFromAssignment,
"PIT" => Self::PitTradeQty,
"TRF" => Self::TransferTradeQty,
"ETR" => Self::ElectronicTradeQty,
"ALC" => Self::AllocationTradeQty,
"PA" => Self::AdjustmentQty,
"ASF" => Self::AsOfTradeQty,
"DLV" => Self::DeliveryQty,
"TOT" => Self::TotalTransactionQty,
"XM" => Self::CrossMarginQty,
"SPL" => Self::IntegralSplit,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::TransactionQuantity => "TQ",
Self::IntraSpreadQty => "IAS",
Self::InterSpreadQty => "IES",
Self::EndOfDayQty => "FIN",
Self::StartOfDayQty => "SOD",
Self::OptionExerciseQty => "EX",
Self::OptionAssignment => "AS",
Self::TransactionFromExercise => "TX",
Self::TransactionFromAssignment => "TA",
Self::PitTradeQty => "PIT",
Self::TransferTradeQty => "TRF",
Self::ElectronicTradeQty => "ETR",
Self::AllocationTradeQty => "ALC",
Self::AdjustmentQty => "PA",
Self::AsOfTradeQty => "ASF",
Self::DeliveryQty => "DLV",
Self::TotalTransactionQty => "TOT",
Self::CrossMarginQty => "XM",
Self::IntegralSplit => "SPL",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for PosType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosQtyStatus {
Submitted,
Accepted,
Rejected,
Unrecognized(i64),
}
impl PosQtyStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Submitted,
1 => Self::Accepted,
2 => Self::Rejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Submitted => 0,
Self::Accepted => 1,
Self::Rejected => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosAmtType<'a> {
FinalMarkToMarketAmount,
IncrementalMarkToMarketAmount,
TradeVariationAmount,
StartOfDayMarkToMarketAmount,
PremiumAmount,
CashResidualAmount,
CashAmount,
ValueAdjustedAmount,
Unrecognized(&'a str),
}
impl<'a> PosAmtType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"FMTM" => Self::FinalMarkToMarketAmount,
"IMTM" => Self::IncrementalMarkToMarketAmount,
"TVAR" => Self::TradeVariationAmount,
"SMTM" => Self::StartOfDayMarkToMarketAmount,
"PREM" => Self::PremiumAmount,
"CRES" => Self::CashResidualAmount,
"CASH" => Self::CashAmount,
"VADJ" => Self::ValueAdjustedAmount,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::FinalMarkToMarketAmount => "FMTM",
Self::IncrementalMarkToMarketAmount => "IMTM",
Self::TradeVariationAmount => "TVAR",
Self::StartOfDayMarkToMarketAmount => "SMTM",
Self::PremiumAmount => "PREM",
Self::CashResidualAmount => "CRES",
Self::CashAmount => "CASH",
Self::ValueAdjustedAmount => "VADJ",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for PosAmtType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosTransType {
Exercise,
DoNotExercise,
PositionAdjustment,
PositionChangeSubmission,
Pledge,
Unrecognized(i64),
}
impl PosTransType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Exercise,
2 => Self::DoNotExercise,
3 => Self::PositionAdjustment,
4 => Self::PositionChangeSubmission,
5 => Self::Pledge,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Exercise => 1,
Self::DoNotExercise => 2,
Self::PositionAdjustment => 3,
Self::PositionChangeSubmission => 4,
Self::Pledge => 5,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosMaintAction {
New,
Replace,
Cancel,
Unrecognized(i64),
}
impl PosMaintAction {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::New,
2 => Self::Replace,
3 => Self::Cancel,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::New => 1,
Self::Replace => 2,
Self::Cancel => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlSessID<'a> {
Intraday,
RegularTradingHours,
ElectronicTradingHours,
Unrecognized(&'a str),
}
impl<'a> SettlSessID<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"ITD" => Self::Intraday,
"RTH" => Self::RegularTradingHours,
"ETH" => Self::ElectronicTradingHours,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Intraday => "ITD",
Self::RegularTradingHours => "RTH",
Self::ElectronicTradingHours => "ETH",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for SettlSessID<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AdjustmentType {
ProcessRequestAsMarginDisposition,
DeltaPlus,
DeltaMinus,
Final,
Unrecognized(i64),
}
impl AdjustmentType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::ProcessRequestAsMarginDisposition,
1 => Self::DeltaPlus,
2 => Self::DeltaMinus,
3 => Self::Final,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ProcessRequestAsMarginDisposition => 0,
Self::DeltaPlus => 1,
Self::DeltaMinus => 2,
Self::Final => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosMaintStatus {
Accepted,
AcceptedWithWarnings,
Rejected,
Completed,
CompletedWithWarnings,
Unrecognized(i64),
}
impl PosMaintStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Accepted,
1 => Self::AcceptedWithWarnings,
2 => Self::Rejected,
3 => Self::Completed,
4 => Self::CompletedWithWarnings,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Accepted => 0,
Self::AcceptedWithWarnings => 1,
Self::Rejected => 2,
Self::Completed => 3,
Self::CompletedWithWarnings => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosMaintResult {
SuccessfulCompletion,
Rejected,
Other,
Unrecognized(i64),
}
impl PosMaintResult {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::SuccessfulCompletion,
1 => Self::Rejected,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::SuccessfulCompletion => 0,
Self::Rejected => 1,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosReqType {
Positions,
Trades,
Exercises,
Assignments,
Unrecognized(i64),
}
impl PosReqType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Positions,
1 => Self::Trades,
2 => Self::Exercises,
3 => Self::Assignments,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Positions => 0,
Self::Trades => 1,
Self::Exercises => 2,
Self::Assignments => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ResponseTransportType {
Inband,
OutOfBand,
Unrecognized(i64),
}
impl ResponseTransportType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Inband,
1 => Self::OutOfBand,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Inband => 0,
Self::OutOfBand => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosReqResult {
ValidRequest,
InvalidOrUnsupportedRequest,
NoPositionsFoundThatMatchCriteria,
NotAuthorizedToRequestPositions,
RequestForPositionNotSupported,
Other,
Unrecognized(i64),
}
impl PosReqResult {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::ValidRequest,
1 => Self::InvalidOrUnsupportedRequest,
2 => Self::NoPositionsFoundThatMatchCriteria,
3 => Self::NotAuthorizedToRequestPositions,
4 => Self::RequestForPositionNotSupported,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ValidRequest => 0,
Self::InvalidOrUnsupportedRequest => 1,
Self::NoPositionsFoundThatMatchCriteria => 2,
Self::NotAuthorizedToRequestPositions => 3,
Self::RequestForPositionNotSupported => 4,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PosReqStatus {
Completed,
CompletedWithWarnings,
Rejected,
Unrecognized(i64),
}
impl PosReqStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Completed,
1 => Self::CompletedWithWarnings,
2 => Self::Rejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Completed => 0,
Self::CompletedWithWarnings => 1,
Self::Rejected => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlPriceType {
Final,
Theoretical,
Unrecognized(i64),
}
impl SettlPriceType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Final,
2 => Self::Theoretical,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Final => 1,
Self::Theoretical => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AssignmentMethod<'a> {
Random,
ProRata,
Unrecognized(&'a str),
}
impl<'a> AssignmentMethod<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"R" => Self::Random,
"P" => Self::ProRata,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Random => "R",
Self::ProRata => "P",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for AssignmentMethod<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ExerciseMethod<'a> {
Automatic,
Manual,
Unrecognized(&'a str),
}
impl<'a> ExerciseMethod<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"A" => Self::Automatic,
"M" => Self::Manual,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Automatic => "A",
Self::Manual => "M",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for ExerciseMethod<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradeRequestResult {
Successful,
InvalidOrUnknownInstrument,
InvalidTypeOfTradeRequested,
InvalidParties,
InvalidTransportTypeRequested,
InvalidDestinationRequested,
TradeRequestTypeNotSupported,
NotAuthorized,
Other,
Unrecognized(i64),
}
impl TradeRequestResult {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Successful,
1 => Self::InvalidOrUnknownInstrument,
2 => Self::InvalidTypeOfTradeRequested,
3 => Self::InvalidParties,
4 => Self::InvalidTransportTypeRequested,
5 => Self::InvalidDestinationRequested,
8 => Self::TradeRequestTypeNotSupported,
9 => Self::NotAuthorized,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Successful => 0,
Self::InvalidOrUnknownInstrument => 1,
Self::InvalidTypeOfTradeRequested => 2,
Self::InvalidParties => 3,
Self::InvalidTransportTypeRequested => 4,
Self::InvalidDestinationRequested => 5,
Self::TradeRequestTypeNotSupported => 8,
Self::NotAuthorized => 9,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradeRequestStatus {
Accepted,
Completed,
Rejected,
Unrecognized(i64),
}
impl TradeRequestStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Accepted,
1 => Self::Completed,
2 => Self::Rejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Accepted => 0,
Self::Completed => 1,
Self::Rejected => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradeReportRejectReason {
Successful,
InvalidPartyOnformation,
UnknownInstrument,
UnauthorizedToReportTrades,
InvalidTradeType,
Other,
Unrecognized(i64),
}
impl TradeReportRejectReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Successful,
1 => Self::InvalidPartyOnformation,
2 => Self::UnknownInstrument,
3 => Self::UnauthorizedToReportTrades,
4 => Self::InvalidTradeType,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Successful => 0,
Self::InvalidPartyOnformation => 1,
Self::UnknownInstrument => 2,
Self::UnauthorizedToReportTrades => 3,
Self::InvalidTradeType => 4,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SideMultiLegReportingType {
SingleSecurity,
IndividualLegOfAMultilegSecurity,
MultilegSecurity,
Unrecognized(i64),
}
impl SideMultiLegReportingType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::SingleSecurity,
2 => Self::IndividualLegOfAMultilegSecurity,
3 => Self::MultilegSecurity,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::SingleSecurity => 1,
Self::IndividualLegOfAMultilegSecurity => 2,
Self::MultilegSecurity => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TrdRegTimestampType {
ExecutionTime,
TimeIn,
TimeOut,
BrokerReceipt,
BrokerExecution,
Unrecognized(i64),
}
impl TrdRegTimestampType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::ExecutionTime,
2 => Self::TimeIn,
3 => Self::TimeOut,
4 => Self::BrokerReceipt,
5 => Self::BrokerExecution,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ExecutionTime => 1,
Self::TimeIn => 2,
Self::TimeOut => 3,
Self::BrokerReceipt => 4,
Self::BrokerExecution => 5,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ConfirmType {
Status,
Confirmation,
ConfirmationRequestRejected,
Unrecognized(i64),
}
impl ConfirmType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Status,
2 => Self::Confirmation,
3 => Self::ConfirmationRequestRejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Status => 1,
Self::Confirmation => 2,
Self::ConfirmationRequestRejected => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ConfirmRejReason {
MismatchedAccount,
MissingSettlementInstructions,
Other,
Unrecognized(i64),
}
impl ConfirmRejReason {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::MismatchedAccount,
2 => Self::MissingSettlementInstructions,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::MismatchedAccount => 1,
Self::MissingSettlementInstructions => 2,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum BookingType {
RegularBooking,
Cfd,
TotalReturnSwap,
Unrecognized(i64),
}
impl BookingType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::RegularBooking,
1 => Self::Cfd,
2 => Self::TotalReturnSwap,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::RegularBooking => 0,
Self::Cfd => 1,
Self::TotalReturnSwap => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocSettlInstType {
UseDefaultInstructions,
DeriveFromParametersProvided,
FullDetailsProvided,
SsidbiDsProvided,
PhoneForInstructions,
Unrecognized(i64),
}
impl AllocSettlInstType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::UseDefaultInstructions,
1 => Self::DeriveFromParametersProvided,
2 => Self::FullDetailsProvided,
3 => Self::SsidbiDsProvided,
4 => Self::PhoneForInstructions,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::UseDefaultInstructions => 0,
Self::DeriveFromParametersProvided => 1,
Self::FullDetailsProvided => 2,
Self::SsidbiDsProvided => 3,
Self::PhoneForInstructions => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DlvyInstType<'a> {
Securities,
Cash,
Unrecognized(&'a str),
}
impl<'a> DlvyInstType<'a> {
pub fn from_value(value: &'a str) -> Self {
match value {
"S" => Self::Securities,
"C" => Self::Cash,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> &'a str {
match self {
Self::Securities => "S",
Self::Cash => "C",
Self::Unrecognized(value) => value,
}
}
}
impl<'a> From<&'a str> for DlvyInstType<'a> {
fn from(value: &'a str) -> Self {
Self::from_value(value)
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TerminationType {
Overnight,
Term,
Flexible,
Open,
Unrecognized(i64),
}
impl TerminationType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Overnight,
2 => Self::Term,
3 => Self::Flexible,
4 => Self::Open,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Overnight => 1,
Self::Term => 2,
Self::Flexible => 3,
Self::Open => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum SettlInstReqRejCode {
UnableToProcessRequest,
UnknownAccount,
NoMatchingSettlementInstructionsFound,
Other,
Unrecognized(i64),
}
impl SettlInstReqRejCode {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::UnableToProcessRequest,
1 => Self::UnknownAccount,
2 => Self::NoMatchingSettlementInstructionsFound,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::UnableToProcessRequest => 0,
Self::UnknownAccount => 1,
Self::NoMatchingSettlementInstructionsFound => 2,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocReportType {
SellsideCalculatedUsingPreliminary,
SellsideCalculatedWithoutPreliminary,
WarehouseRecap,
RequestToIntermediary,
Unrecognized(i64),
}
impl AllocReportType {
pub fn from_value(value: i64) -> Self {
match value {
3 => Self::SellsideCalculatedUsingPreliminary,
4 => Self::SellsideCalculatedWithoutPreliminary,
5 => Self::WarehouseRecap,
8 => Self::RequestToIntermediary,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::SellsideCalculatedUsingPreliminary => 3,
Self::SellsideCalculatedWithoutPreliminary => 4,
Self::WarehouseRecap => 5,
Self::RequestToIntermediary => 8,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocCancReplaceReason {
OriginalDetailsIncomplete,
ChangeInUnderlyingOrderDetails,
Other,
Unrecognized(i64),
}
impl AllocCancReplaceReason {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::OriginalDetailsIncomplete,
2 => Self::ChangeInUnderlyingOrderDetails,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::OriginalDetailsIncomplete => 1,
Self::ChangeInUnderlyingOrderDetails => 2,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocAccountType {
CarriedCustomerSide,
CarriedNonCustomerSide,
HouseTrader,
FloorTrader,
CarriedNonCustomerSideCrossMargined,
HouseTraderCrossMargined,
JointBackOfficeAccount,
Unrecognized(i64),
}
impl AllocAccountType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::CarriedCustomerSide,
2 => Self::CarriedNonCustomerSide,
3 => Self::HouseTrader,
4 => Self::FloorTrader,
6 => Self::CarriedNonCustomerSideCrossMargined,
7 => Self::HouseTraderCrossMargined,
8 => Self::JointBackOfficeAccount,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::CarriedCustomerSide => 1,
Self::CarriedNonCustomerSide => 2,
Self::HouseTrader => 3,
Self::FloorTrader => 4,
Self::CarriedNonCustomerSideCrossMargined => 6,
Self::HouseTraderCrossMargined => 7,
Self::JointBackOfficeAccount => 8,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PartySubIDType {
Firm,
Person,
System,
Application,
FullLegalNameOfFirm,
PostalAddress,
PhoneNumber,
EmailAddress,
ContactName,
SecuritiesAccountNumber,
RegistrationNumber,
RegisteredAddressForConfirmation,
RegulatoryStatus,
RegistrationName,
CashAccountNumber,
Bic,
CsdParticipantMemberCode,
RegisteredAddress,
FundAccountName,
TelexNumber,
FaxNumber,
SecuritiesAccountName,
CashAccountName,
Department,
LocationDesk,
PositionAccountType,
Unrecognized(i64),
}
impl PartySubIDType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Firm,
2 => Self::Person,
3 => Self::System,
4 => Self::Application,
5 => Self::FullLegalNameOfFirm,
6 => Self::PostalAddress,
7 => Self::PhoneNumber,
8 => Self::EmailAddress,
9 => Self::ContactName,
10 => Self::SecuritiesAccountNumber,
11 => Self::RegistrationNumber,
12 => Self::RegisteredAddressForConfirmation,
13 => Self::RegulatoryStatus,
14 => Self::RegistrationName,
15 => Self::CashAccountNumber,
16 => Self::Bic,
17 => Self::CsdParticipantMemberCode,
18 => Self::RegisteredAddress,
19 => Self::FundAccountName,
20 => Self::TelexNumber,
21 => Self::FaxNumber,
22 => Self::SecuritiesAccountName,
23 => Self::CashAccountName,
24 => Self::Department,
25 => Self::LocationDesk,
26 => Self::PositionAccountType,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Firm => 1,
Self::Person => 2,
Self::System => 3,
Self::Application => 4,
Self::FullLegalNameOfFirm => 5,
Self::PostalAddress => 6,
Self::PhoneNumber => 7,
Self::EmailAddress => 8,
Self::ContactName => 9,
Self::SecuritiesAccountNumber => 10,
Self::RegistrationNumber => 11,
Self::RegisteredAddressForConfirmation => 12,
Self::RegulatoryStatus => 13,
Self::RegistrationName => 14,
Self::CashAccountNumber => 15,
Self::Bic => 16,
Self::CsdParticipantMemberCode => 17,
Self::RegisteredAddress => 18,
Self::FundAccountName => 19,
Self::TelexNumber => 20,
Self::FaxNumber => 21,
Self::SecuritiesAccountName => 22,
Self::CashAccountName => 23,
Self::Department => 24,
Self::LocationDesk => 25,
Self::PositionAccountType => 26,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocIntermedReqType {
PendingAccept,
PendingRelease,
PendingReversal,
Accept,
BlockLevelReject,
AccountLevelReject,
Unrecognized(i64),
}
impl AllocIntermedReqType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::PendingAccept,
2 => Self::PendingRelease,
3 => Self::PendingReversal,
4 => Self::Accept,
5 => Self::BlockLevelReject,
6 => Self::AccountLevelReject,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::PendingAccept => 1,
Self::PendingRelease => 2,
Self::PendingReversal => 3,
Self::Accept => 4,
Self::BlockLevelReject => 5,
Self::AccountLevelReject => 6,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ApplQueueResolution {
NoActionTaken,
QueueFlushed,
OverlayLast,
EndSession,
Unrecognized(i64),
}
impl ApplQueueResolution {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::NoActionTaken,
1 => Self::QueueFlushed,
2 => Self::OverlayLast,
3 => Self::EndSession,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::NoActionTaken => 0,
Self::QueueFlushed => 1,
Self::OverlayLast => 2,
Self::EndSession => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ApplQueueAction {
NoActionTaken,
QueueFlushed,
OverlayLast,
EndSession,
Unrecognized(i64),
}
impl ApplQueueAction {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::NoActionTaken,
1 => Self::QueueFlushed,
2 => Self::OverlayLast,
3 => Self::EndSession,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::NoActionTaken => 0,
Self::QueueFlushed => 1,
Self::OverlayLast => 2,
Self::EndSession => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AvgPxIndicator {
NoAveragePricing,
Trade,
LastTrade,
Unrecognized(i64),
}
impl AvgPxIndicator {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::NoAveragePricing,
1 => Self::Trade,
2 => Self::LastTrade,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::NoAveragePricing => 0,
Self::Trade => 1,
Self::LastTrade => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradeAllocIndicator {
AllocationNotRequired,
AllocationRequired,
UseAllocationProvidedWithTheTrade,
Unrecognized(i64),
}
impl TradeAllocIndicator {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::AllocationNotRequired,
1 => Self::AllocationRequired,
2 => Self::UseAllocationProvidedWithTheTrade,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::AllocationNotRequired => 0,
Self::AllocationRequired => 1,
Self::UseAllocationProvidedWithTheTrade => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ExpirationCycle {
ExpireOnTradingSessionClose,
ExpireOnTradingSessionOpen,
Unrecognized(i64),
}
impl ExpirationCycle {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::ExpireOnTradingSessionClose,
1 => Self::ExpireOnTradingSessionOpen,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::ExpireOnTradingSessionClose => 0,
Self::ExpireOnTradingSessionOpen => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TrdType {
RegularTrade,
BlockTrade,
Efp,
Transfer,
LateTrade,
TTrade,
WeightedAveragePriceTrade,
BunchedTrade,
LateBunchedTrade,
PriorReferencePriceTrade,
AfterHoursTrade,
Unrecognized(i64),
}
impl TrdType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::RegularTrade,
1 => Self::BlockTrade,
2 => Self::Efp,
3 => Self::Transfer,
4 => Self::LateTrade,
5 => Self::TTrade,
6 => Self::WeightedAveragePriceTrade,
7 => Self::BunchedTrade,
8 => Self::LateBunchedTrade,
9 => Self::PriorReferencePriceTrade,
10 => Self::AfterHoursTrade,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::RegularTrade => 0,
Self::BlockTrade => 1,
Self::Efp => 2,
Self::Transfer => 3,
Self::LateTrade => 4,
Self::TTrade => 5,
Self::WeightedAveragePriceTrade => 6,
Self::BunchedTrade => 7,
Self::LateBunchedTrade => 8,
Self::PriorReferencePriceTrade => 9,
Self::AfterHoursTrade => 10,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PegMoveType {
Floating,
Fixed,
Unrecognized(i64),
}
impl PegMoveType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Floating,
1 => Self::Fixed,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Floating => 0,
Self::Fixed => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PegOffsetType {
Price,
BasisPoints,
Ticks,
PriceTier,
Unrecognized(i64),
}
impl PegOffsetType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Price,
1 => Self::BasisPoints,
2 => Self::Ticks,
3 => Self::PriceTier,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Price => 0,
Self::BasisPoints => 1,
Self::Ticks => 2,
Self::PriceTier => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PegLimitType {
OrBetter,
Strict,
OrWorse,
Unrecognized(i64),
}
impl PegLimitType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::OrBetter,
1 => Self::Strict,
2 => Self::OrWorse,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::OrBetter => 0,
Self::Strict => 1,
Self::OrWorse => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PegRoundDirection {
MoreAggressive,
MorePassive,
Unrecognized(i64),
}
impl PegRoundDirection {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::MoreAggressive,
2 => Self::MorePassive,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::MoreAggressive => 1,
Self::MorePassive => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PegScope {
Local,
National,
Global,
NationalExcludingLocal,
Unrecognized(i64),
}
impl PegScope {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Local,
2 => Self::National,
3 => Self::Global,
4 => Self::NationalExcludingLocal,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Local => 1,
Self::National => 2,
Self::Global => 3,
Self::NationalExcludingLocal => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DiscretionMoveType {
Floating,
Fixed,
Unrecognized(i64),
}
impl DiscretionMoveType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Floating,
1 => Self::Fixed,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Floating => 0,
Self::Fixed => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DiscretionOffsetType {
Price,
BasisPoints,
Ticks,
PriceTier,
Unrecognized(i64),
}
impl DiscretionOffsetType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Price,
1 => Self::BasisPoints,
2 => Self::Ticks,
3 => Self::PriceTier,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Price => 0,
Self::BasisPoints => 1,
Self::Ticks => 2,
Self::PriceTier => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DiscretionLimitType {
OrBetter,
Strict,
OrWorse,
Unrecognized(i64),
}
impl DiscretionLimitType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::OrBetter,
1 => Self::Strict,
2 => Self::OrWorse,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::OrBetter => 0,
Self::Strict => 1,
Self::OrWorse => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DiscretionRoundDirection {
MoreAggressive,
MorePassive,
Unrecognized(i64),
}
impl DiscretionRoundDirection {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::MoreAggressive,
2 => Self::MorePassive,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::MoreAggressive => 1,
Self::MorePassive => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DiscretionScope {
Local,
National,
Global,
NationalExcludingLocal,
Unrecognized(i64),
}
impl DiscretionScope {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Local,
2 => Self::National,
3 => Self::Global,
4 => Self::NationalExcludingLocal,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Local => 1,
Self::National => 2,
Self::Global => 3,
Self::NationalExcludingLocal => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TargetStrategy {
Vwap,
Participate,
MininizeMarketImpact,
Unrecognized(i64),
}
impl TargetStrategy {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Vwap,
2 => Self::Participate,
3 => Self::MininizeMarketImpact,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Vwap => 1,
Self::Participate => 2,
Self::MininizeMarketImpact => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum LastLiquidityInd {
AddedLiquidity,
RemovedLiquidity,
LiquidityRoutedOut,
Unrecognized(i64),
}
impl LastLiquidityInd {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::AddedLiquidity,
2 => Self::RemovedLiquidity,
3 => Self::LiquidityRoutedOut,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::AddedLiquidity => 1,
Self::RemovedLiquidity => 2,
Self::LiquidityRoutedOut => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum ShortSaleReason {
DealerSoldShort,
DealerSoldShortExempt,
SellingCustomerSoldShort,
SellingCustomerSoldShortExempt,
QualifiedServiceRepresentative,
QsrOrAguContraSideSoldShortExempt,
Unrecognized(i64),
}
impl ShortSaleReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::DealerSoldShort,
1 => Self::DealerSoldShortExempt,
2 => Self::SellingCustomerSoldShort,
3 => Self::SellingCustomerSoldShortExempt,
4 => Self::QualifiedServiceRepresentative,
5 => Self::QsrOrAguContraSideSoldShortExempt,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::DealerSoldShort => 0,
Self::DealerSoldShortExempt => 1,
Self::SellingCustomerSoldShort => 2,
Self::SellingCustomerSoldShortExempt => 3,
Self::QualifiedServiceRepresentative => 4,
Self::QsrOrAguContraSideSoldShortExempt => 5,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum QtyType {
Units,
Contracts,
Unrecognized(i64),
}
impl QtyType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Units,
1 => Self::Contracts,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Units => 0,
Self::Contracts => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TradeReportType {
Submit,
Alleged,
Accept,
Decline,
Addendum,
No,
TradeReportCancel,
LockedIn,
Unrecognized(i64),
}
impl TradeReportType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Submit,
1 => Self::Alleged,
2 => Self::Accept,
3 => Self::Decline,
4 => Self::Addendum,
5 => Self::No,
6 => Self::TradeReportCancel,
7 => Self::LockedIn,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Submit => 0,
Self::Alleged => 1,
Self::Accept => 2,
Self::Decline => 3,
Self::Addendum => 4,
Self::No => 5,
Self::TradeReportCancel => 6,
Self::LockedIn => 7,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AllocNoOrdersType {
NotSpecified,
ExplicitListProvided,
Unrecognized(i64),
}
impl AllocNoOrdersType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::NotSpecified,
1 => Self::ExplicitListProvided,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::NotSpecified => 0,
Self::ExplicitListProvided => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum EventType {
Put,
Call,
Tender,
SinkingFundCall,
Other,
Unrecognized(i64),
}
impl EventType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Put,
2 => Self::Call,
3 => Self::Tender,
4 => Self::SinkingFundCall,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Put => 1,
Self::Call => 2,
Self::Tender => 3,
Self::SinkingFundCall => 4,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum InstrAttribType {
Flat,
ZeroCoupon,
InterestBearing,
NoPeriodicPayments,
VariableRate,
LessFeeForPut,
SteppedCoupon,
CouponPeriod,
When,
OriginalIssueDiscount,
Callable,
EscrowedToMaturity,
EscrowedToRedemptionDate,
PreRefunded,
InDefault,
Unrated,
Taxable,
Indexed,
SubjectToAlternativeMinimumTax,
OriginalIssueDiscountPrice,
CallableBelowMaturityValue,
CallableWithoutNotice,
Text,
Unrecognized(i64),
}
impl InstrAttribType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Flat,
2 => Self::ZeroCoupon,
3 => Self::InterestBearing,
4 => Self::NoPeriodicPayments,
5 => Self::VariableRate,
6 => Self::LessFeeForPut,
7 => Self::SteppedCoupon,
8 => Self::CouponPeriod,
9 => Self::When,
10 => Self::OriginalIssueDiscount,
11 => Self::Callable,
12 => Self::EscrowedToMaturity,
13 => Self::EscrowedToRedemptionDate,
14 => Self::PreRefunded,
15 => Self::InDefault,
16 => Self::Unrated,
17 => Self::Taxable,
18 => Self::Indexed,
19 => Self::SubjectToAlternativeMinimumTax,
20 => Self::OriginalIssueDiscountPrice,
21 => Self::CallableBelowMaturityValue,
22 => Self::CallableWithoutNotice,
99 => Self::Text,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Flat => 1,
Self::ZeroCoupon => 2,
Self::InterestBearing => 3,
Self::NoPeriodicPayments => 4,
Self::VariableRate => 5,
Self::LessFeeForPut => 6,
Self::SteppedCoupon => 7,
Self::CouponPeriod => 8,
Self::When => 9,
Self::OriginalIssueDiscount => 10,
Self::Callable => 11,
Self::EscrowedToMaturity => 12,
Self::EscrowedToRedemptionDate => 13,
Self::PreRefunded => 14,
Self::InDefault => 15,
Self::Unrated => 16,
Self::Taxable => 17,
Self::Indexed => 18,
Self::SubjectToAlternativeMinimumTax => 19,
Self::OriginalIssueDiscountPrice => 20,
Self::CallableBelowMaturityValue => 21,
Self::CallableWithoutNotice => 22,
Self::Text => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CPProgram {
Program3a3,
Program42,
Other,
Unrecognized(i64),
}
impl CPProgram {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Program3a3,
2 => Self::Program42,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Program3a3 => 1,
Self::Program42 => 2,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum MiscFeeBasis {
Absolute,
PerUnit,
Percentage,
Unrecognized(i64),
}
impl MiscFeeBasis {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Absolute,
1 => Self::PerUnit,
2 => Self::Percentage,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Absolute => 0,
Self::PerUnit => 1,
Self::Percentage => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollAsgnReason {
Initial,
Scheduled,
TimeWarning,
MarginDeficiency,
MarginExcess,
ForwardCollateralDemand,
EventOfDefault,
AdverseTaxEvent,
Unrecognized(i64),
}
impl CollAsgnReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Initial,
1 => Self::Scheduled,
2 => Self::TimeWarning,
3 => Self::MarginDeficiency,
4 => Self::MarginExcess,
5 => Self::ForwardCollateralDemand,
6 => Self::EventOfDefault,
7 => Self::AdverseTaxEvent,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Initial => 0,
Self::Scheduled => 1,
Self::TimeWarning => 2,
Self::MarginDeficiency => 3,
Self::MarginExcess => 4,
Self::ForwardCollateralDemand => 5,
Self::EventOfDefault => 6,
Self::AdverseTaxEvent => 7,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollInquiryQualifier {
TradeDate,
GcInstrument,
CollateralInstrument,
SubstitutionEligible,
NotAssigned,
PartiallyAssigned,
FullyAssigned,
OutstandingTrades,
Unrecognized(i64),
}
impl CollInquiryQualifier {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::TradeDate,
1 => Self::GcInstrument,
2 => Self::CollateralInstrument,
3 => Self::SubstitutionEligible,
4 => Self::NotAssigned,
5 => Self::PartiallyAssigned,
6 => Self::FullyAssigned,
7 => Self::OutstandingTrades,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::TradeDate => 0,
Self::GcInstrument => 1,
Self::CollateralInstrument => 2,
Self::SubstitutionEligible => 3,
Self::NotAssigned => 4,
Self::PartiallyAssigned => 5,
Self::FullyAssigned => 6,
Self::OutstandingTrades => 7,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollAsgnTransType {
New,
Replace,
Cancel,
Release,
Reverse,
Unrecognized(i64),
}
impl CollAsgnTransType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::New,
1 => Self::Replace,
2 => Self::Cancel,
3 => Self::Release,
4 => Self::Reverse,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::New => 0,
Self::Replace => 1,
Self::Cancel => 2,
Self::Release => 3,
Self::Reverse => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollAsgnRespType {
Received,
Accepted,
Declined,
Rejected,
Unrecognized(i64),
}
impl CollAsgnRespType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Received,
1 => Self::Accepted,
2 => Self::Declined,
3 => Self::Rejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Received => 0,
Self::Accepted => 1,
Self::Declined => 2,
Self::Rejected => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollAsgnRejectReason {
UnknownDeal,
UnknownOrInvalidInstrument,
UnauthorizedTransaction,
InsufficientCollateral,
InvalidTypeOfCollateral,
ExcessiveSubstitution,
Other,
Unrecognized(i64),
}
impl CollAsgnRejectReason {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::UnknownDeal,
1 => Self::UnknownOrInvalidInstrument,
2 => Self::UnauthorizedTransaction,
3 => Self::InsufficientCollateral,
4 => Self::InvalidTypeOfCollateral,
5 => Self::ExcessiveSubstitution,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::UnknownDeal => 0,
Self::UnknownOrInvalidInstrument => 1,
Self::UnauthorizedTransaction => 2,
Self::InsufficientCollateral => 3,
Self::InvalidTypeOfCollateral => 4,
Self::ExcessiveSubstitution => 5,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollStatus {
Unassigned,
PartiallyAssigned,
AssignmentProposed,
Assigned,
Challenged,
Unrecognized(i64),
}
impl CollStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Unassigned,
1 => Self::PartiallyAssigned,
2 => Self::AssignmentProposed,
3 => Self::Assigned,
4 => Self::Challenged,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Unassigned => 0,
Self::PartiallyAssigned => 1,
Self::AssignmentProposed => 2,
Self::Assigned => 3,
Self::Challenged => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum DeliveryType {
VersusPayment,
Free,
TriParty,
HoldInCustody,
Unrecognized(i64),
}
impl DeliveryType {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::VersusPayment,
1 => Self::Free,
2 => Self::TriParty,
3 => Self::HoldInCustody,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::VersusPayment => 0,
Self::Free => 1,
Self::TriParty => 2,
Self::HoldInCustody => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum UserRequestType {
LogOnUser,
LogOffUser,
ChangePasswordForUser,
RequestIndividualUserStatus,
Unrecognized(i64),
}
impl UserRequestType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::LogOnUser,
2 => Self::LogOffUser,
3 => Self::ChangePasswordForUser,
4 => Self::RequestIndividualUserStatus,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::LogOnUser => 1,
Self::LogOffUser => 2,
Self::ChangePasswordForUser => 3,
Self::RequestIndividualUserStatus => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum UserStatus {
LoggedIn,
NotLoggedIn,
UserNotRecognised,
PasswordIncorrect,
PasswordChanged,
Other,
Unrecognized(i64),
}
impl UserStatus {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::LoggedIn,
2 => Self::NotLoggedIn,
3 => Self::UserNotRecognised,
4 => Self::PasswordIncorrect,
5 => Self::PasswordChanged,
6 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::LoggedIn => 1,
Self::NotLoggedIn => 2,
Self::UserNotRecognised => 3,
Self::PasswordIncorrect => 4,
Self::PasswordChanged => 5,
Self::Other => 6,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum StatusValue {
Connected,
NotConnectedUnexpected,
NotConnectedExpected,
InProcess,
Unrecognized(i64),
}
impl StatusValue {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Connected,
2 => Self::NotConnectedUnexpected,
3 => Self::NotConnectedExpected,
4 => Self::InProcess,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Connected => 1,
Self::NotConnectedUnexpected => 2,
Self::NotConnectedExpected => 3,
Self::InProcess => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum NetworkRequestType {
Snapshot,
Subscribe,
StopSubscribing,
LevelOfDetail,
Unrecognized(i64),
}
impl NetworkRequestType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Snapshot,
2 => Self::Subscribe,
4 => Self::StopSubscribing,
8 => Self::LevelOfDetail,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Snapshot => 1,
Self::Subscribe => 2,
Self::StopSubscribing => 4,
Self::LevelOfDetail => 8,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum NetworkStatusResponseType {
Full,
IncrementalUpdate,
Unrecognized(i64),
}
impl NetworkStatusResponseType {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Full,
2 => Self::IncrementalUpdate,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Full => 1,
Self::IncrementalUpdate => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum TrdRptStatus {
Accepted,
Rejected,
Unrecognized(i64),
}
impl TrdRptStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Accepted,
1 => Self::Rejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Accepted => 0,
Self::Rejected => 1,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum AffirmStatus {
Received,
ConfirmRejected,
Affirmed,
Unrecognized(i64),
}
impl AffirmStatus {
pub fn from_value(value: i64) -> Self {
match value {
1 => Self::Received,
2 => Self::ConfirmRejected,
3 => Self::Affirmed,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Received => 1,
Self::ConfirmRejected => 2,
Self::Affirmed => 3,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollAction {
Retain,
Add,
Remove,
Unrecognized(i64),
}
impl CollAction {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Retain,
1 => Self::Add,
2 => Self::Remove,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Retain => 0,
Self::Add => 1,
Self::Remove => 2,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollInquiryStatus {
Accepted,
AcceptedWithWarnings,
Completed,
CompletedWithWarnings,
Rejected,
Unrecognized(i64),
}
impl CollInquiryStatus {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Accepted,
1 => Self::AcceptedWithWarnings,
2 => Self::Completed,
3 => Self::CompletedWithWarnings,
4 => Self::Rejected,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Accepted => 0,
Self::AcceptedWithWarnings => 1,
Self::Completed => 2,
Self::CompletedWithWarnings => 3,
Self::Rejected => 4,
Self::Unrecognized(value) => value,
}
}
}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum CollInquiryResult {
Successful,
InvalidOrUnknownInstrument,
InvalidOrUnknownCollateralType,
InvalidParties,
InvalidTransportTypeRequested,
InvalidDestinationRequested,
NoCollateralFoundForTheTradeSpecified,
NoCollateralFoundForTheOrderSpecified,
CollateralInquiryTypeNotSupported,
UnauthorizedForCollateralInquiry,
Other,
Unrecognized(i64),
}
impl CollInquiryResult {
pub fn from_value(value: i64) -> Self {
match value {
0 => Self::Successful,
1 => Self::InvalidOrUnknownInstrument,
2 => Self::InvalidOrUnknownCollateralType,
3 => Self::InvalidParties,
4 => Self::InvalidTransportTypeRequested,
5 => Self::InvalidDestinationRequested,
6 => Self::NoCollateralFoundForTheTradeSpecified,
7 => Self::NoCollateralFoundForTheOrderSpecified,
8 => Self::CollateralInquiryTypeNotSupported,
9 => Self::UnauthorizedForCollateralInquiry,
99 => Self::Other,
unrecognized => Self::Unrecognized(unrecognized),
}
}
pub fn value(self) -> i64 {
match self {
Self::Successful => 0,
Self::InvalidOrUnknownInstrument => 1,
Self::InvalidOrUnknownCollateralType => 2,
Self::InvalidParties => 3,
Self::InvalidTransportTypeRequested => 4,
Self::InvalidDestinationRequested => 5,
Self::NoCollateralFoundForTheTradeSpecified => 6,
Self::NoCollateralFoundForTheOrderSpecified => 7,
Self::CollateralInquiryTypeNotSupported => 8,
Self::UnauthorizedForCollateralInquiry => 9,
Self::Other => 99,
Self::Unrecognized(value) => value,
}
}
}