Table of Contents

Class BitStampMessageAdapter

Namespace
StockSharp.BitStamp
Assembly
StockSharp.BitStamp.dll

The message adapter for StockSharp.BitStamp.

[OrderCondition(typeof(BitStampOrderCondition))]
[MediaIcon("BitStamp_logo.svg")]
[Display(ResourceType = typeof(LocalizedStrings), Name = "BitStamp", Description = "CryptoConnector", GroupName = "Cryptocurrency")]
[MessageAdapterCategory(MessageAdapterCategories.Crypto|MessageAdapterCategories.RealTime|MessageAdapterCategories.Free|MessageAdapterCategories.Ticks|MessageAdapterCategories.MarketDepth|MessageAdapterCategories.Level1|MessageAdapterCategories.OrderLog|MessageAdapterCategories.Transactions)]
public class BitStampMessageAdapter : AsyncMessageAdapter, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanged, IKeySecretAdapter
Inheritance
BitStampMessageAdapter
Implements
ICloneable<IMessageChannel>
IPersistable
Inherited Members
Extension Methods

Constructors

BitStampMessageAdapter(IdGenerator)

Initializes a new instance of the BitStampMessageAdapter.

public BitStampMessageAdapter(IdGenerator transactionIdGenerator)

Parameters

transactionIdGenerator IdGenerator

Transaction id generator.

Fields

DefaultHeartbeatInterval

Default value for HeartbeatInterval.

public static readonly TimeSpan DefaultHeartbeatInterval

Field Value

TimeSpan

Properties

AssociatedBoards

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

public override string[] AssociatedBoards { get; }

Property Value

string[]

BalanceCheckInterval

Balance check interval. Required in case of deposit and withdraw actions.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Balance", Description = "BalanceCheckInterval", GroupName = "Connection", Order = 3)]
public TimeSpan BalanceCheckInterval { get; set; }

Property Value

TimeSpan

Key

Key.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Key", Description = "KeyDot", GroupName = "Connection", Order = 0)]
public SecureString Key { get; set; }

Property Value

SecureString

Secret

Secret.

[Display(ResourceType = typeof(LocalizedStrings), Name = "Secret", Description = "SecretDesc", GroupName = "Connection", Order = 1)]
public SecureString Secret { get; set; }

Property Value

SecureString

TimeFrames

Get possible time-frames for the specified instrument.

protected override IEnumerable<TimeSpan> TimeFrames { get; }

Property Value

IEnumerable<TimeSpan>

Methods

CancelOrderAsync(OrderCancelMessage, CancellationToken)

public override ValueTask CancelOrderAsync(OrderCancelMessage cancelMsg, CancellationToken cancellationToken)

Parameters

cancelMsg OrderCancelMessage

OrderCancelMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

CancelOrderGroupAsync(OrderGroupCancelMessage, CancellationToken)

public override ValueTask CancelOrderGroupAsync(OrderGroupCancelMessage cancelMsg, CancellationToken cancellationToken)

Parameters

cancelMsg OrderGroupCancelMessage

OrderGroupCancelMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

ConnectAsync(ConnectMessage, CancellationToken)

Process ConnectMessage.

public override ValueTask ConnectAsync(ConnectMessage connectMsg, CancellationToken cancellationToken)

Parameters

connectMsg ConnectMessage

ConnectMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

DisconnectAsync(DisconnectMessage, CancellationToken)

public override ValueTask DisconnectAsync(DisconnectMessage disconnectMsg, CancellationToken cancellationToken)

Parameters

disconnectMsg DisconnectMessage

DisconnectMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

IsAllDownloadingSupported(DataType)

Is for the specified dataType all securities downloading enabled.

public override bool IsAllDownloadingSupported(DataType dataType)

Parameters

dataType DataType

Data type info.

Returns

bool

Check result.

Load(SettingsStorage)

Load settings.

public override void Load(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

OnMarketDepthSubscriptionAsync(MarketDataMessage, CancellationToken)

protected override ValueTask OnMarketDepthSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)

Parameters

mdMsg MarketDataMessage
cancellationToken CancellationToken

Returns

ValueTask

OnOrderLogSubscriptionAsync(MarketDataMessage, CancellationToken)

protected override ValueTask OnOrderLogSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)

Parameters

mdMsg MarketDataMessage
cancellationToken CancellationToken

Returns

ValueTask

OnTFCandlesSubscriptionAsync(MarketDataMessage, CancellationToken)

protected override ValueTask OnTFCandlesSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)

Parameters

mdMsg MarketDataMessage
cancellationToken CancellationToken

Returns

ValueTask

OnTicksSubscriptionAsync(MarketDataMessage, CancellationToken)

protected override ValueTask OnTicksSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)

Parameters

mdMsg MarketDataMessage
cancellationToken CancellationToken

Returns

ValueTask

OrderStatusAsync(OrderStatusMessage, CancellationToken)

public override ValueTask OrderStatusAsync(OrderStatusMessage statusMsg, CancellationToken cancellationToken)

Parameters

statusMsg OrderStatusMessage

OrderStatusMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

PortfolioLookupAsync(PortfolioLookupMessage, CancellationToken)

public override ValueTask PortfolioLookupAsync(PortfolioLookupMessage lookupMsg, CancellationToken cancellationToken)

Parameters

lookupMsg PortfolioLookupMessage

PortfolioLookupMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

RegisterOrderAsync(OrderRegisterMessage, CancellationToken)

public override ValueTask RegisterOrderAsync(OrderRegisterMessage regMsg, CancellationToken cancellationToken)

Parameters

regMsg OrderRegisterMessage

OrderRegisterMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

ResetAsync(ResetMessage, CancellationToken)

Process ResetMessage.

public override ValueTask ResetAsync(ResetMessage resetMsg, CancellationToken cancellationToken)

Parameters

resetMsg ResetMessage

ResetMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

Remarks

Must NOT throw.

Save(SettingsStorage)

Save settings.

public override void Save(SettingsStorage storage)

Parameters

storage SettingsStorage

Settings storage.

SecurityLookupAsync(SecurityLookupMessage, CancellationToken)

public override ValueTask SecurityLookupAsync(SecurityLookupMessage lookupMsg, CancellationToken cancellationToken)

Parameters

lookupMsg SecurityLookupMessage

SecurityLookupMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

TimeAsync(TimeMessage, CancellationToken)

Process TimeMessage.

public override ValueTask TimeAsync(TimeMessage timeMsg, CancellationToken cancellationToken)

Parameters

timeMsg TimeMessage

TimeMessage.

cancellationToken CancellationToken

CancellationToken.

Returns

ValueTask

ValueTask.

ToString()

public override string ToString()

Returns

string