BitmartMessageAdapter
The message adapter for Bitmart.
Inherits: MessageAdapter
Implements: IKeySecretAdapter, IAddressAdapter<string>
Constructors
public BitmartMessageAdapter(IdGenerator transactionIdGenerator)
bitmartMessageAdapter = BitmartMessageAdapter(transactionIdGenerator)
Initializes a new instance of the BitmartMessageAdapter.
- transactionIdGenerator
- Transaction id generator.
Properties
public string Address { get; set; }
value = bitmartMessageAdapter.Address
bitmartMessageAdapter.Address = value
Server address.
public static IEnumerable<TimeSpan> AllTimeFrames { get; }
value = BitmartMessageAdapter.AllTimeFrames
Possible time-frames.
public override string[] AssociatedBoards { get; }
value = bitmartMessageAdapter.AssociatedBoards
The adapter can process subscription only with instruments associated with the specified board.
public override string FeatureName { get; }
value = bitmartMessageAdapter.FeatureName
Feature name.
public string FuturesPrivateWsAddress { get; set; }
value = bitmartMessageAdapter.FuturesPrivateWsAddress
bitmartMessageAdapter.FuturesPrivateWsAddress = value
Futures private websocket endpoint.
public string FuturesPublicWsAddress { get; set; }
value = bitmartMessageAdapter.FuturesPublicWsAddress
bitmartMessageAdapter.FuturesPublicWsAddress = value
Futures public websocket endpoint.
public override bool IsSupportOrderBookIncrements { get; }
value = bitmartMessageAdapter.IsSupportOrderBookIncrements
Adapter translates incremental order books.
public SecureString Key { get; set; }
value = bitmartMessageAdapter.Key
bitmartMessageAdapter.Key = value
Key.
public string Memo { get; set; }
value = bitmartMessageAdapter.Memo
bitmartMessageAdapter.Memo = value
Memo.
public SecureString Secret { get; set; }
value = bitmartMessageAdapter.Secret
bitmartMessageAdapter.Secret = value
Secret.
public BitmartSections Section { get; set; }
value = bitmartMessageAdapter.Section
bitmartMessageAdapter.Section = value
Section.
public string SpotPrivateWsAddress { get; set; }
value = bitmartMessageAdapter.SpotPrivateWsAddress
bitmartMessageAdapter.SpotPrivateWsAddress = value
Spot private websocket endpoint.
public string SpotPublicWsAddress { get; set; }
value = bitmartMessageAdapter.SpotPublicWsAddress
bitmartMessageAdapter.SpotPublicWsAddress = value
Spot public websocket endpoint.
public override IEnumerable<int> SupportedOrderBookDepths { get; }
value = bitmartMessageAdapter.SupportedOrderBookDepths
Available options for MaxDepth.
Methods
protected override ValueTask CancelOrderAsync(OrderCancelMessage cancelMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.CancelOrderAsync(cancelMsg, cancellationToken)
protected override ValueTask CancelOrderGroupAsync(OrderGroupCancelMessage cancelMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.CancelOrderGroupAsync(cancelMsg, cancellationToken)
protected override ValueTask ConnectAsync(ConnectMessage connectMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.ConnectAsync(connectMsg, cancellationToken)
protected override ValueTask DisconnectAsync(DisconnectMessage disconnectMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.DisconnectAsync(disconnectMsg, cancellationToken)
public override bool IsAllDownloadingSupported(DataType dataType)
result = bitmartMessageAdapter.IsAllDownloadingSupported(dataType)
Is for the specified all securities downloading enabled.
- dataType
- Data type info.
Returns: Check result.
public override bool IsSupportCandlesUpdates(MarketDataMessage subscription)
result = bitmartMessageAdapter.IsSupportCandlesUpdates(subscription)
Support candles subscription and live updates.
- subscription
- MarketDataMessage
Returns: Check result.
public override void Load(SettingsStorage storage)
bitmartMessageAdapter.Load(storage)
Load settings.
- storage
- Settings storage.
protected override ValueTask OnLevel1SubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.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.
protected override ValueTask OnMarketDepthSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.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 = bitmartMessageAdapter.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 = bitmartMessageAdapter.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 statusMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.OrderStatusAsync(statusMsg, cancellationToken)
protected override ValueTask PortfolioLookupAsync(PortfolioLookupMessage lookupMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.PortfolioLookupAsync(lookupMsg, cancellationToken)
protected override ValueTask RegisterOrderAsync(OrderRegisterMessage regMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.RegisterOrderAsync(regMsg, cancellationToken)
protected override ValueTask ResetAsync(ResetMessage resetMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.ResetAsync(resetMsg, cancellationToken)
public override void Save(SettingsStorage storage)
bitmartMessageAdapter.Save(storage)
Save settings.
- storage
- Settings storage.
protected override ValueTask SecurityLookupAsync(SecurityLookupMessage lookupMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.SecurityLookupAsync(lookupMsg, cancellationToken)
protected override ValueTask TimeAsync(TimeMessage timeMsg, CancellationToken cancellationToken)
result = bitmartMessageAdapter.TimeAsync(timeMsg, cancellationToken)
public override string ToString()
result = bitmartMessageAdapter.ToString()
Преобразовать к строковому представлению.
Returns: Строковое представление.