CoinCapMessageAdapter

StockSharp.CoinCap

The message adapter for CoinCap.

Inherits: MessageAdapter

Implements: ITokenAdapter, IAddressAdapter<string>

Constructors

CoinCapMessageAdapter
public CoinCapMessageAdapter(IdGenerator transactionIdGenerator)
coinCapMessageAdapter = CoinCapMessageAdapter(transactionIdGenerator)

Initializes a new instance of the CoinCapMessageAdapter.

transactionIdGenerator
Transaction id generator.

Properties

Address
public string Address { get; set; }
value = coinCapMessageAdapter.Address
coinCapMessageAdapter.Address = value

Server address.

AllTimeFrames
public static IEnumerable<TimeSpan> AllTimeFrames { get; }
value = CoinCapMessageAdapter.AllTimeFrames

Possible time-frames.

AssociatedBoards
public override string[] AssociatedBoards { get; }
value = coinCapMessageAdapter.AssociatedBoards

The adapter can process subscription only with instruments associated with the specified board.

FeatureName
public override string FeatureName { get; }
value = coinCapMessageAdapter.FeatureName

Feature name.

Token
public SecureString Token { get; set; }
value = coinCapMessageAdapter.Token
coinCapMessageAdapter.Token = value

Token.

Methods

ConnectAsync
protected override ValueTask ConnectAsync(ConnectMessage msg, CancellationToken cancellationToken)
result = coinCapMessageAdapter.ConnectAsync(msg, cancellationToken)
DisconnectAsync
protected override ValueTask DisconnectAsync(DisconnectMessage msg, CancellationToken cancellationToken)
result = coinCapMessageAdapter.DisconnectAsync(msg, cancellationToken)
IsAllDownloadingSupported
public override bool IsAllDownloadingSupported(DataType dataType)
result = coinCapMessageAdapter.IsAllDownloadingSupported(dataType)

Is for the specified all securities downloading enabled.

dataType
Data type info.

Returns: Check result.

Load
public override void Load(SettingsStorage storage)
coinCapMessageAdapter.Load(storage)

Load settings.

storage
Settings storage.
OnLevel1SubscriptionAsync
protected override ValueTask OnLevel1SubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = coinCapMessageAdapter.OnLevel1SubscriptionAsync(mdMsg, cancellationToken)

Handles subscription request for level1 data. Override to provide implementation for level1 subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Returns: A ValueTask representing the asynchronous operation.

OnTFCandlesSubscriptionAsync
protected override ValueTask OnTFCandlesSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = coinCapMessageAdapter.OnTFCandlesSubscriptionAsync(mdMsg, cancellationToken)

Handles subscription request for time-frame candles (TF candles) data. Override to provide implementation for TF candles subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Returns: A ValueTask representing the asynchronous operation.

OnTicksSubscriptionAsync
protected override ValueTask OnTicksSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = coinCapMessageAdapter.OnTicksSubscriptionAsync(mdMsg, cancellationToken)

Handles subscription request for ticks data. Override to provide implementation for ticks subscription processing. The default implementation throws NotSupported.

mdMsg
Market data subscription message.
cancellationToken
Cancellation token to cancel the operation.

Returns: A ValueTask representing the asynchronous operation.

ResetAsync
protected override ValueTask ResetAsync(ResetMessage msg, CancellationToken cancellationToken)
result = coinCapMessageAdapter.ResetAsync(msg, cancellationToken)
Save
public override void Save(SettingsStorage storage)
coinCapMessageAdapter.Save(storage)

Save settings.

storage
Settings storage.
SecurityLookupAsync
protected override ValueTask SecurityLookupAsync(SecurityLookupMessage lookupMsg, CancellationToken cancellationToken)
result = coinCapMessageAdapter.SecurityLookupAsync(lookupMsg, cancellationToken)
ValidateSecurityId
protected override bool ValidateSecurityId(SecurityId secId)
result = coinCapMessageAdapter.ValidateSecurityId(secId)

Validate the specified security id is supported by the adapter and subscription can be done.

secId
SecurityId.

Returns: Check result.