public void InstanceToString() { var value = new FixProtocolVersion("xxx", 4, 17); var st = value.ToString(); Assert.IsTrue("xxx.4.17" == st); }
public void ParseCorrectString() { var protocol = new FixProtocolVersion("ext.1.2"); Assert.IsTrue("ext" == protocol.Type); Assert.IsTrue(1 == protocol.MajorVersion); Assert.IsTrue(2 == protocol.MinorVersion); }
public SymbolInfo[] Symbols(FixProtocolVersion protocolVersion) { var symbols = Native.Converter.SymbolsFromHandle(this.Data); foreach (var symbol in symbols) { symbol.ProtocolVersion = protocolVersion; } return symbols; }
public SymbolInfo[] Symbols(FixProtocolVersion protocolVersion) { var symbols = Native.Converter.SymbolsFromHandle(this.Data); foreach (var symbol in symbols) { symbol.ProtocolVersion = protocolVersion; } return(symbols); }
/// <summary> /// Creates a new instance of SymbolInfoFeatures /// </summary> /// <param name="protocolVersion">A protocol version; can not be null.</param> /// <param name="provider"></param> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> public SymbolInfoFeatures(FixProtocolVersion protocolVersion, SymbolInfoFeaturesProvider provider) { if (protocolVersion == null) throw new ArgumentNullException(nameof(protocolVersion)); if (provider == null) throw new ArgumentNullException(nameof(provider)); this.protocolVersion = protocolVersion; this.provider = provider; }
public SymbolInfo[] GetSymbols(int timeoutInMilliseconds) { this.VerifyInitialized(); var symbols = Native.FeedServer.GetSymbols(this.handle, (uint)timeoutInMilliseconds); var protocolVersion = new FixProtocolVersion(this.DataClient.ProtocolVersion); foreach (var symbol in symbols) { symbol.ProtocolVersion = protocolVersion; } return symbols; }
public SymbolInfo[] GetSymbols(int timeoutInMilliseconds) { this.VerifyInitialized(); var symbols = Native.FeedServer.GetSymbols(this.handle, (uint)timeoutInMilliseconds); var protocolVersion = new FixProtocolVersion(this.DataClient.ProtocolVersion); foreach (var symbol in symbols) { symbol.ProtocolVersion = protocolVersion; } return(symbols); }
/// <summary> /// Creates a new instance of SymbolInfoFeatures /// </summary> /// <param name="protocolVersion">A protocol version; can not be null.</param> /// <param name="provider"></param> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> public SymbolInfoFeatures(FixProtocolVersion protocolVersion, SymbolInfoFeaturesProvider provider) { if (protocolVersion == null) { throw new ArgumentNullException(nameof(protocolVersion)); } if (provider == null) { throw new ArgumentNullException(nameof(provider)); } this.protocolVersion = protocolVersion; this.provider = provider; }
static FixConnectionStringBuilder CreateFixConnectionStringBuilder(AccountType type, FixProtocolVersion protocolVersion) { var result = new FixConnectionStringBuilder { FixVersion = "FIX.4.4", Address = "ttdemo.fxopen.com", TargetCompId = "EXECUTOR" }; if (type == AccountType.Gross) { result.Username = "******"; result.Password = "******"; } else if (type == AccountType.Net) { result.Username = "******"; result.Password = "******"; } else if (type == AccountType.Cash) { result.Address = "crypto.ttdemo.fxopen.com"; result.Username = "******"; result.Password = "******"; } result.ProtocolVersion = protocolVersion.ToString(); #if DEBUG result.DecodeLogFixMessages = true; result.FixLogDirectory = @"C:\Temporary\Logs"; #endif return result; }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'MarginFactor' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsMarginFactorSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.SymbolExtending); }
static FixConnectionStringBuilder CreateFixConnectionStringBuilder(AccountType type, FixProtocolVersion protocolVersion) { var result = new FixConnectionStringBuilder { FixVersion = "FIX.4.4", Address = "ttdemo.fxopen.com", TargetCompId = "EXECUTOR" }; if (type == AccountType.Gross) { result.Username = "******"; result.Password = "******"; } else if (type == AccountType.Net) { result.Username = "******"; result.Password = "******"; } else if (type == AccountType.Cash) { result.Address = "crypto.ttdemo.fxopen.com"; result.Username = "******"; result.Password = "******"; } result.ProtocolVersion = protocolVersion.ToString(); #if DEBUG result.DecodeLogFixMessages = true; result.FixLogDirectory = @"C:\Temporary\Logs"; #endif return(result); }
public void StaticToString() { var st = FixProtocolVersion.ToString("xxx", 5, 12); Assert.IsTrue("xxx.5.12" == st); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'RoundLot' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsRoundLotSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.SymbolExtending); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'SettlementCurrency' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsSettlementCurrencySupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.SymbolExtending); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'MinCommissionCurrency' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsMinCommissionCurrencySupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version57); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'Commission' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsCommissionSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version15); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'CommissionChargeMethod' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsCommissionChargeMethodSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version25); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'Color' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsColorSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.SymbolColorExtending); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'ContractMultiplier' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsContractMultiplierSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Initial); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'MarginFactorFractional' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsMarginFactorFractionalSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version20); }
internal bool IsCurrencySortOrderSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version20); }
internal bool IsCurrencyPrecisionSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version23); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'Name' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsNameSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Initial); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'Precision' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsPrecisionSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.SymbolExtending); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'SwapType' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsSwapTypeSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version57); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'MaxTradeVolume' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsMaxTradeVolumeSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.SymbolExtending); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'TripleSwapDay' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsTripleSwapDaySupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version57); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'ProfitCalcMode' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsProfitCalcModeSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.SymbolExtending); }
internal unsafe SymbolInfoEventArgs(FxMessage message, string usedProtocolVersion) { var protocolVersion = new FixProtocolVersion(usedProtocolVersion); this.Information = message.Symbols(protocolVersion); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'TradeEnabled' property, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsIsTradeEnabledSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version16); }
internal bool IsSortOrderSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version18); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'SwapSizeShort' and 'SwapSizeLong' properties, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsSwapSizeSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version15); }
/// <summary> /// Create a new SymbolInfoFeatures instance for a specified version. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public SymbolInfoFeatures GetInfo(FixProtocolVersion protocolVersion) { return(new SymbolInfoFeatures(protocolVersion, this)); }
/// <summary> /// Returns true, if a protocol version of symbol info supports 'DefaultSlippage' properties, otherwise false. /// </summary> /// <exception cref="System.ArgumentNullException">If protocol version is null.</exception> /// <exception cref="System.ArgumentException">If an input protocol version is unknown.</exception> /// <returns>True, if the corresponding property or method is supported for a protocol version, otherwise false.</returns> public bool IsDefaultSlippageSupported(FixProtocolVersion protocolVersion) { return(protocolVersion >= FixProtocolVersion.Version36); }