LigtherMessageAdapter
The message adapter for Ligther (Lighter).
Inherits: MessageAdapter
Implements: IKeySecretAdapter, IDemoAdapter
Constructors
LigtherMessageAdapter(IdGenerator)
Initializes a new instance of the LigtherMessageAdapter.
- transactionIdGenerator
- Transaction id generator.
Properties
AccountIndex : int
Lighter account index.
AllTimeFrames : IEnumerable<TimeSpan>
Possible candle time-frames.
ApiKeyIndex : int
Lighter API key index.
AssociatedBoards : string[]
The adapter can process subscription only with instruments associated with the specified board.
DerivativesRestEndpoint : string
Derivatives REST endpoint.
DerivativesWsEndpoint : string
Derivatives websocket endpoint.
IsSupportOrderBookIncrements : bool
Adapter translates incremental order books.
Key : SecureString
Key.
Secret : SecureString
Secret.
Sections : IEnumerable<LigtherSections>
Market sections.
SpotRestEndpoint : string
Spot REST endpoint.
SpotWsEndpoint : string
Spot websocket endpoint.
UseWsReadOnlyMode : bool
Use websocket read-only mode query parameter when available.
Methods
IsAllDownloadingSupported(DataType) : bool
Is for the specified all securities downloading enabled.
- dataType
- Data type info.
Returns: Check result.
IsSupportCandlesUpdates(MarketDataMessage) : bool
Support candles subscription and live updates.
- subscription
- MarketDataMessage
Returns: Check result.
OnLevel1SubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask
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.
OnMarketDepthSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask
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.
OnTFCandlesSubscriptionAsync(MarketDataMessage, CancellationToken) : ValueTask
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(MarketDataMessage, CancellationToken) : ValueTask
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.
ValidateSecurityId(SecurityId) : bool
Validate the specified security id is supported by the adapter and subscription can be done.
- secId
- SecurityId.
Returns: Check result.