Table of Contents

Class PolygonIOMessageAdapter

Namespace
StockSharp.PolygonIO
Assembly
StockSharp.PolygonIO.dll

The message adapter for StockSharp.PolygonIO.

[MediaIcon("polygonio_logo.svg")]
[Display(ResourceType = typeof(LocalizedStrings), Name = "PolygonIO", Description = "MarketDataConnector", GroupName = "MarketData")]
[MessageAdapterCategory(MessageAdapterCategories.US|MessageAdapterCategories.Stock|MessageAdapterCategories.FX|MessageAdapterCategories.History|MessageAdapterCategories.RealTime|MessageAdapterCategories.Free|MessageAdapterCategories.Candles|MessageAdapterCategories.Futures|MessageAdapterCategories.Options)]
public class PolygonIOMessageAdapter : AsyncMessageAdapter, IMessageAdapter, IMessageChannel, ICloneable<IMessageChannel>, ICloneable, IPersistable, ILogReceiver, ILogSource, IDisposable, INotifyPropertyChanged, ITokenAdapter
Inheritance
PolygonIOMessageAdapter
Implements
ICloneable<IMessageChannel>
IPersistable
Inherited Members
Extension Methods

Constructors

PolygonIOMessageAdapter(IdGenerator)

Initializes a new instance of the PolygonIOMessageAdapter.

public PolygonIOMessageAdapter(IdGenerator transactionIdGenerator)

Parameters

transactionIdGenerator IdGenerator

Transaction id generator.

Properties

AllTimeFrames

Possible time-frames.

public static IEnumerable<TimeSpan> AllTimeFrames { get; }

Property Value

IEnumerable<TimeSpan>

ConnectionType

Connection type.

[Display(ResourceType = typeof(LocalizedStrings), Name = "ConnectionType", Description = "ConnectionType", GroupName = "Connection", Order = 2)]
public PolygonIOConnectionTypes ConnectionType { get; set; }

Property Value

PolygonIOConnectionTypes

FeatureName

Feature name.

public override string FeatureName { get; }

Property Value

string

TimeFrames

Get possible time-frames for the specified instrument.

protected override IEnumerable<TimeSpan> TimeFrames { get; }

Property Value

IEnumerable<TimeSpan>

Token

Token.

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

Property Value

SecureString

Methods

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.

OnLevel1SubscriptionAsync(MarketDataMessage, CancellationToken)

protected override ValueTask OnLevel1SubscriptionAsync(MarketDataMessage mdMsg, CancellationToken cancellationToken)

Parameters

mdMsg MarketDataMessage
cancellationToken CancellationToken

Returns

ValueTask

OnNewsSubscriptionAsync(MarketDataMessage, CancellationToken)

protected override ValueTask OnNewsSubscriptionAsync(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

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.