ClientOrderIdRegistry

StockSharp.Server.Core

Tracks live client order IDs within a session.

プロパティ

Count
public int Count { get; }
value = clientOrderIdRegistry.Count

How many client order ids are claimed right now.

メソッド

Clear
public void Clear()
clientOrderIdRegistry.Clear()

Frees every claimed id.

CreateRefusal
public static InvalidOperationException CreateRefusal(string clientOrderId)
result = ClientOrderIdRegistry.CreateRefusal(clientOrderId)

Builds the error used to refuse a re-used client order id.

clientOrderId
The id the client re-used.

戻り値: The error to fail the offending command with.

HoldsTransaction
public bool HoldsTransaction(string login, long transactionId)
result = clientOrderIdRegistry.HoldsTransaction(login, transactionId)

Whether a live order of the client travels under this transaction.

login
The client the transaction belongs to.
transactionId
The transaction.

戻り値: when an id is claimed for it.

IsClaimed
public bool IsClaimed(string login, string clientOrderId)
result = clientOrderIdRegistry.IsClaimed(login, clientOrderId)

Whether the client already has a live order under this id.

login
The client the id belongs to.
clientOrderId
The id the client gave the order.

戻り値: when a live order holds it.

Release
public void Release(string login, long transactionId)
clientOrderIdRegistry.Release(login, transactionId)

Frees the id an order held, once that order has ended.

login
The client the order belongs to.
transactionId
The transaction the order travelled under.
TryClaim
public bool TryClaim(string login, string clientOrderId, long transactionId, long? orderId)
result = clientOrderIdRegistry.TryClaim(login, clientOrderId, transactionId, orderId)

Claims a client order id for an order that is being opened.

login
The client the id belongs to.
clientOrderId
The id the client gave the order.
transactionId
The transaction the order travels under, which later frees the id.
orderId
The id the order is written down under, or when it names none.

戻り値: when the id was free or is held by this very order; when another live order of the client holds it.

TryGetTransaction
public bool TryGetTransaction(string login, string clientOrderId, long transactionId)
result = clientOrderIdRegistry.TryGetTransaction(login, clientOrderId, transactionId)

Reads the transaction of the live order the client holds under this id.

login
The client the id belongs to.
clientOrderId
The id the client gave the order.
transactionId
The transaction the order travels under.

戻り値: when a live order of that client holds the id.

TrySeed
public bool TrySeed(string login, string clientOrderId, long transactionId)
result = clientOrderIdRegistry.TrySeed(login, clientOrderId, transactionId)

Claims a client order id for an order that was already live before this process knew of it, as replayed from the upstream order book.

login
The client the id belongs to.
clientOrderId
The id the client gave the order.
transactionId
The transaction the order travels under, which later frees the id.

戻り値: when the id is claimed for this order; when some other order already holds it.