Class TradierMessageAdapter
- Namespace
- StockSharp.Tradier
- Assembly
- StockSharp.Tradier.dll
The message adapter for StockSharp.Tradier.
[OrderCondition(typeof(TradierOrderCondition))]
[MediaIcon("tradier_logo.svg")]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Tradier", Description = "StockConnector", GroupName = "America")]
[MessageAdapterCategory(MessageAdapterCategories.US|MessageAdapterCategories.RealTime|MessageAdapterCategories.Free|MessageAdapterCategories.Ticks|MessageAdapterCategories.Candles|MessageAdapterCategories.Level1|MessageAdapterCategories.Transactions|MessageAdapterCategories.Futures|MessageAdapterCategories.Options)]
public class TradierMessageAdapter : AsyncMessageAdapter, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanged, ITokenAdapter, IDemoAdapter
- Inheritance
-
TradierMessageAdapter
- Implements
-
ICloneable<IMessageChannel>IPersistable
- Inherited Members
- Extension Methods
Constructors
TradierMessageAdapter(IdGenerator)
Initializes a new instance of the TradierMessageAdapter.
public TradierMessageAdapter(IdGenerator transactionIdGenerator)
Parameters
transactionIdGenerator
IdGeneratorTransaction id generator.
Properties
AllTimeFrames
Possible time-frames.
public static IEnumerable<TimeSpan> AllTimeFrames { get; }
Property Value
FeatureName
Feature name.
public override string FeatureName { get; }
Property Value
IsDemo
Connect to demo trading instead of real trading server.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Demo", Description = "DemoMode", GroupName = "Connection", Order = 1)]
public bool IsDemo { get; set; }
Property Value
IsReplaceCommandEditCurrent
Is the OrderReplaceMessage command edit a current order.
public override bool IsReplaceCommandEditCurrent { get; }
Property Value
TimeFrames
Get possible time-frames for the specified instrument.
protected override IEnumerable<TimeSpan> TimeFrames { get; }
Property Value
Token
Token.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Token", Description = "TokenDot", GroupName = "Connection", Order = 0)]
public SecureString Token { get; set; }
Property Value
Methods
CancelOrderAsync(OrderCancelMessage, CancellationToken)
Process OrderCancelMessage.
public override ValueTask CancelOrderAsync(OrderCancelMessage cancelMsg, CancellationToken cancellationToken)
Parameters
cancelMsg
OrderCancelMessagecancellationToken
CancellationToken
Returns
ConnectAsync(ConnectMessage, CancellationToken)
Process ConnectMessage.
public override ValueTask ConnectAsync(ConnectMessage connectMsg, CancellationToken cancellationToken)
Parameters
connectMsg
ConnectMessagecancellationToken
CancellationToken
Returns
DisconnectAsync(DisconnectMessage, CancellationToken)
Process DisconnectMessage.
public override ValueTask DisconnectAsync(DisconnectMessage disconnectMsg, CancellationToken cancellationToken)
Parameters
disconnectMsg
DisconnectMessagecancellationToken
CancellationToken
Returns
Load(SettingsStorage)
Load settings.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
OnLevel1SubscriptionAsync(MarketDataMessage, CancellationToken)
protected override ValueTask OnLevel1SubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
Parameters
mdMsg
MarketDataMessagecancellationToken
CancellationToken
Returns
OnTFCandlesSubscriptionAsync(MarketDataMessage, CancellationToken)
protected override ValueTask OnTFCandlesSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
Parameters
mdMsg
MarketDataMessagecancellationToken
CancellationToken
Returns
OnTicksSubscriptionAsync(MarketDataMessage, CancellationToken)
protected override ValueTask OnTicksSubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)
Parameters
mdMsg
MarketDataMessagecancellationToken
CancellationToken
Returns
OrderStatusAsync(OrderStatusMessage, CancellationToken)
Process OrderStatusMessage.
public override ValueTask OrderStatusAsync(OrderStatusMessage statusMsg, CancellationToken cancellationToken)
Parameters
statusMsg
OrderStatusMessagecancellationToken
CancellationToken
Returns
PortfolioLookupAsync(PortfolioLookupMessage, CancellationToken)
Process PortfolioLookupMessage.
public override ValueTask PortfolioLookupAsync(PortfolioLookupMessage lookupMsg, CancellationToken cancellationToken)
Parameters
lookupMsg
PortfolioLookupMessagecancellationToken
CancellationToken
Returns
RegisterOrderAsync(OrderRegisterMessage, CancellationToken)
Process OrderRegisterMessage.
public override ValueTask RegisterOrderAsync(OrderRegisterMessage regMsg, CancellationToken cancellationToken)
Parameters
regMsg
OrderRegisterMessagecancellationToken
CancellationToken
Returns
ReplaceOrderAsync(OrderReplaceMessage, CancellationToken)
Process OrderReplaceMessage.
public override ValueTask ReplaceOrderAsync(OrderReplaceMessage replaceMsg, CancellationToken cancellationToken)
Parameters
replaceMsg
OrderReplaceMessagecancellationToken
CancellationToken
Returns
ResetAsync(ResetMessage, CancellationToken)
Process ResetMessage.
public override ValueTask ResetAsync(ResetMessage resetMsg, CancellationToken cancellationToken)
Parameters
resetMsg
ResetMessagecancellationToken
CancellationToken
Returns
Remarks
Must NOT throw.
Save(SettingsStorage)
Save settings.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageSettings storage.
SecurityLookupAsync(SecurityLookupMessage, CancellationToken)
Process SecurityLookupMessage.
public override ValueTask SecurityLookupAsync(SecurityLookupMessage lookupMsg, CancellationToken cancellationToken)
Parameters
lookupMsg
SecurityLookupMessagecancellationToken
CancellationToken