CoinigyMessageAdapter
The message adapter for Coinigy.
Inherits: MessageAdapter
Implements: IKeySecretAdapter
Constructors
public CoinigyMessageAdapter(IdGenerator transactionIdGenerator)
coinigyMessageAdapter = CoinigyMessageAdapter(transactionIdGenerator)
Initializes a new instance of the CoinigyMessageAdapter.
- transactionIdGenerator
- Transaction id generator.
Properties
public static IEnumerable<TimeSpan> AllTimeFrames { get; }
value = CoinigyMessageAdapter.AllTimeFrames
Possible time-frames.
public TimeSpan BalanceCheckInterval { get; set; }
value = coinigyMessageAdapter.BalanceCheckInterval
coinigyMessageAdapter.BalanceCheckInterval = value
Balance check interval. Required in case of deposit and withdraw actions.
public override string FeatureName { get; }
value = coinigyMessageAdapter.FeatureName
Feature name.
public SecureString Key { get; set; }
value = coinigyMessageAdapter.Key
coinigyMessageAdapter.Key = value
Key.
public SecureString Secret { get; set; }
value = coinigyMessageAdapter.Secret
coinigyMessageAdapter.Secret = value
Secret.
public SecureString WebSocketId { get; set; }
value = coinigyMessageAdapter.WebSocketId
coinigyMessageAdapter.WebSocketId = value
Websocket id.
Methods
protected override ValueTask CancelOrderAsync(OrderCancelMessage cancelMsg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.CancelOrderAsync(cancelMsg, cancellationToken)
protected override ValueTask ConnectAsync(ConnectMessage msg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.ConnectAsync(msg, cancellationToken)
protected override ValueTask DisconnectAsync(DisconnectMessage msg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.DisconnectAsync(msg, cancellationToken)
public override bool IsAllDownloadingSupported(DataType dataType)
result = coinigyMessageAdapter.IsAllDownloadingSupported(dataType)
Is for the specified all securities downloading enabled.
- dataType
- Data type info.
Returns: Check result.
public override void Load(SettingsStorage storage)
coinigyMessageAdapter.Load(storage)
Load settings.
- storage
- Settings storage.
protected override ValueTask OnMarketDepthSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.OnMarketDepthSubscriptionAsync(mdMsg, cancellationToken)
Handles subscription request for market depth data. Override to provide implementation for market depth 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.
protected override ValueTask OnTFCandlesSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.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.
protected override ValueTask OnTicksSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.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.
protected override ValueTask OrderStatusAsync(OrderStatusMessage message, CancellationToken cancellationToken)
result = coinigyMessageAdapter.OrderStatusAsync(message, cancellationToken)
protected override ValueTask PortfolioLookupAsync(PortfolioLookupMessage message, CancellationToken cancellationToken)
result = coinigyMessageAdapter.PortfolioLookupAsync(message, cancellationToken)
protected override ValueTask RegisterOrderAsync(OrderRegisterMessage regMsg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.RegisterOrderAsync(regMsg, cancellationToken)
protected override ValueTask ResetAsync(ResetMessage msg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.ResetAsync(msg, cancellationToken)
public override void Save(SettingsStorage storage)
coinigyMessageAdapter.Save(storage)
Save settings.
- storage
- Settings storage.
protected override ValueTask SecurityLookupAsync(SecurityLookupMessage lookupMsg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.SecurityLookupAsync(lookupMsg, cancellationToken)
protected override ValueTask TimeAsync(TimeMessage timeMsg, CancellationToken cancellationToken)
result = coinigyMessageAdapter.TimeAsync(timeMsg, cancellationToken)
public override string ToString()
result = coinigyMessageAdapter.ToString()
Преобразовать к строковому представлению.
Returns: Строковое представление.