Table of Contents

Class BlockUntilReconnectedOrTimeout

Namespace
WhalesSecret.TradeScriptLib.API.TradingV1.ConnectionStrategy
Assembly
WhalesSecret.TradeScriptLib.dll

Strategy that affects exchange API functions to behave in the following way.

When there is an active connection to the exchange, then all exchange API requests are processed normally.

When the exchange connection is lost and a new exchange API request is sent, NotConnectedException is thrown to the callee script task only if PreRequestTimeout elapses and a new exchange connection was not established in the allotted time. If a new connection was established before PreRequestTimeout elapsed, then the API request will be sent at that point.

public sealed class BlockUntilReconnectedOrTimeout : IConnectionStrategy
Inheritance
BlockUntilReconnectedOrTimeout
Implements
Inherited Members
Extension Methods

Remarks

This strategy is useful for trade scripts that do not need to be aware of short disconnections and as such a lot of script code complexity can be avoided.

Constructors

BlockUntilReconnectedOrTimeout()

Creates a new instance of the object.

BlockUntilReconnectedOrTimeout(TimeSpan)

Creates a new instance of the object.

Fields

InfinityTimeoutInstance

Blocking strategy with infinite timeout.

Properties

PreRequestTimeout

Maximum time until the request is sent to the exchange.

Methods

ToString()

Returns a string that represents the current object.