Table of Contents

Class FixServer

Namespace
StockSharp.Server.Fix
Assembly
StockSharp.Server.Fix.dll

FIX server.

public class FixServer : BaseLogReceiver, IPersistable, ICloneable<FixServer>, IMessageListener, IMessageChannel, ICloneable, ICloneable<IMessageChannel>, ILogReceiver, ILogSource, IDisposable
Inheritance
FixServer
Implements
IPersistable
ICloneable<FixServer>
ICloneable<IMessageChannel>
Inherited Members
Extension Methods

Constructors

FixServer(IAuthorization, ITransactionIdStorage, string, DateTime)

Initializes a new instance of the FixServer.

public FixServer(IAuthorization authorization, ITransactionIdStorage transactionIdStorage, string licenseFeatureId, DateTime componentTimestamp)

Parameters

authorization IAuthorization

The customer authentication.

transactionIdStorage ITransactionIdStorage

Transaction and request identifiers storage.

licenseFeatureId string

LicenseFeatureId

componentTimestamp DateTime

ComponentTimestamp

FixServer(IAuthorization, ITransactionIdStorage, string, Type)

Initializes a new instance of the FixServer.

public FixServer(IAuthorization authorization, ITransactionIdStorage transactionIdStorage, string licenseFeatureId, Type componentType)

Parameters

authorization IAuthorization

The customer authentication.

transactionIdStorage ITransactionIdStorage

Transaction and request identifiers storage.

licenseFeatureId string

LicenseFeatureId

componentType Type

ComponentTimestamp

Properties

Authorization

The customer authentication.

[Browsable(false)]
public IAuthorization Authorization { get; }

Property Value

IAuthorization

ComponentTimestamp

Component timestamp.

public DateTime ComponentTimestamp { get; }

Property Value

DateTime

IsDemo

Demo mode only.

public bool IsDemo { get; }

Property Value

bool

LicenseFeatureId

License feature id to be sent as Logon response.

public string LicenseFeatureId { get; }

Property Value

string

SendOutHeartbeats

Send via NewOutMessage heartbeat.

public bool SendOutHeartbeats { get; set; }

Property Value

bool

Sessions

Active sessions.

public IEnumerable<IMessageListenerSession> Sessions { get; }

Property Value

IEnumerable<IMessageListenerSession>

Settings

Settings.

public FixServerSettings Settings { get; }

Property Value

FixServerSettings

State

State.

[Browsable(false)]
public ChannelStates State { get; }

Property Value

ChannelStates

TransactionIdStorage

Transaction and request identifiers storage.

[Browsable(false)]
public ITransactionIdStorage TransactionIdStorage { get; }

Property Value

ITransactionIdStorage

Methods

AddSubscription(ServerSubscription)

Add subscription.

public void AddSubscription(ServerSubscription subscription)

Parameters

subscription ServerSubscription

Subscription.

Close()

Close channel.

public void Close()

CreateCondition()

To create the order condition.

protected virtual OrderCondition CreateCondition()

Returns

OrderCondition

The order condition.

Disconnect(IMessageListenerSession)

Disconnect session.

public void Disconnect(IMessageListenerSession session)

Parameters

session IMessageListenerSession

Session.

DisposeManaged()

Release resources.

protected override void DisposeManaged()

GetSubscriptions(IMessageListenerSession)

Get subscription for the specified session.

public IEnumerable<ServerSubscription> GetSubscriptions(IMessageListenerSession session)

Parameters

session IMessageListenerSession

Session.

Returns

IEnumerable<ServerSubscription>

Subscriptions.

HasSubscriptions(DataType, SecurityId)

Are there subscribers.

public bool HasSubscriptions(DataType dataType, SecurityId securityId)

Parameters

dataType DataType

Market data type.

securityId SecurityId

Security ID.

Returns

bool

Are there subscribers.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnProcess(FixSession, string, IFixReader)

The method is called when the received message is processing.

protected virtual bool? OnProcess(FixSession session, string msgType, IFixReader reader)

Parameters

session FixSession

Session.

msgType string

Message type.

reader IFixReader

Data reader.

Returns

bool?

Whether the data was successfully processed.

Open()

Open channel.

public void Open()

PostInitCondition(char, OrderCondition)

The final initialization of the order condition.

protected virtual void PostInitCondition(char ordType, OrderCondition condition)

Parameters

ordType char

Order type.

condition OrderCondition

The order condition.

RaiseNewOutMessage(IMessageListenerSession, Message)

To call the event NewOutMessage.

protected void RaiseNewOutMessage(IMessageListenerSession session, Message message)

Parameters

session IMessageListenerSession

Session.

message Message

Message.

ReadOrderCondition(IFixReader, FixTags, Func<OrderCondition>)

To read the order condition OrderCondition.

protected virtual bool ReadOrderCondition(IFixReader reader, FixTags tag, Func<OrderCondition> getCondition)

Parameters

reader IFixReader

Data reader.

tag FixTags

Tag.

getCondition Func<OrderCondition>

The function returning the order condition.

Returns

bool

Whether the data was successfully processed.

RemoveSubscription(ServerSubscription)

Remove subscription.

public bool RemoveSubscription(ServerSubscription subscription)

Parameters

subscription ServerSubscription

Subscription.

Returns

bool

true if subscription was found, otherwise false.

Resume(IMessageListenerSession)

Resume session.

public void Resume(IMessageListenerSession session)

Parameters

session IMessageListenerSession

Session.

Resume(ServerSubscription)

Resume subscription.

public bool Resume(ServerSubscription subscription)

Parameters

subscription ServerSubscription

Subscription.

Returns

bool

true if subscription was found, otherwise false.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

SendInMessage(Message)

Send message.

public bool SendInMessage(Message message)

Parameters

message Message

Message.

Returns

bool

true if the specified message was processed successfully, otherwise, false.

SendInMessage(IMessageListenerSession, long?, Message)

public bool SendInMessage(IMessageListenerSession session, long? subscriptionId, Message message)

Parameters

session IMessageListenerSession
subscriptionId long?
message Message

Returns

bool

Suspend(IMessageListenerSession)

Suspend session.

public void Suspend(IMessageListenerSession session)

Parameters

session IMessageListenerSession

Session.

Suspend(ServerSubscription)

Suspend subscription.

public bool Suspend(ServerSubscription subscription)

Parameters

subscription ServerSubscription

Subscription.

Returns

bool

true if subscription was found, otherwise false.

WriterFixOrderCondition(IFixWriter, OrderCondition)

To record data by the order condition.

protected virtual void WriterFixOrderCondition(IFixWriter writer, OrderCondition condition)

Parameters

writer IFixWriter

FIX data writer.

condition OrderCondition

Order condition (e.g., stop- and algo- orders parameters).

Events

NewOutMessage

New message event.

public event Action<IMessageListenerSession, Message> NewOutMessage

Event Type

Action<IMessageListenerSession, Message>

SessionConnected

Session connected event.

public event Action<IMessageListenerSession> SessionConnected

Event Type

Action<IMessageListenerSession>

SessionDisconnected

Session disconnected event.

public event Action<IMessageListenerSession> SessionDisconnected

Event Type

Action<IMessageListenerSession>

StateChanged

State change event.

public event Action StateChanged

Event Type

Action

SubscriptionChanged

Client subscription changed event.

public event Action<ServerSubscription> SubscriptionChanged

Event Type

Action<ServerSubscription>