14 Commits
Author SHA1 Message Date
mika@stocksharp.com 3533aedf8b Drop the Finam connector from the samples
The RemoteSource sample was the only one still using Finam, and it did so
through a NuGet package. That package - like every published connector - is
built against a StockSharp.Messages that still had HistoricalAsyncMessageAdapter,
a type this repository removed, so the sample no longer compiled against its own
sources.

BinanceHistory replaces it. Being open, it is referenced as a project the way the
other samples reference connectors, which also ends the package-versus-sources
mismatch. It is free and keyless, so the web-api token prompt and the
IInstrumentInfoService registration are gone - nothing resolved that service
here, and demanding a token to download public data made no sense. The security
lookup now derives its code from Paths.HistoryDefaultSecurity instead of asking
for BTCUSD while fetching BTCUSDT@BNBFT.
2026-07-31 00:56:57 +03:00
mika@stocksharp.com 660f2a2815 Convert security access to async (SaveAsync/GetSecurityAsync) end to end
The security get-or-create path was bridged to the async storage through a
blocking AsyncHelper.Run, turning SaveAsync into a sync-over-async call inside
the hot message-processing path. Propagate real async up the whole chain.

TraderHelper:
- Add GetOrCreateAsync that awaits ISecurityStorage.SaveAsync. It does not hold
  the storage Lock.Scope across the await (the lock is monitor based and thread
  affine); SaveAsync(forced: false) is an atomic add-if-absent, and the
  canonical stored instance is re-resolved to stay correct under concurrent
  creation.
- Mark the sync GetOrCreate(out bool) obsolete; it bridges to the async variant
  and has no internal callers left.

Connector / Connector_ProcessMessage:
- Add GetSecurityAsync/EnsureGetSecurityAsync and route the message-processing
  handlers (Security, Level1, News, Quotes, Trade, Transaction, PositionChange,
  Execution) through them; the already-async dispatcher awaits them. No blocking
  Run remains on this path.
- TryGetSecurity (entity cache snapshot delegate) becomes a pure LookupById: a
  snapshot lookup must not create or persist a security.

IConnector:
- Add GetSecurityAsync(SecurityId, CancellationToken) and mark the sync
  GetSecurity(SecurityId) obsolete. The sync method stays as a deprecated bridge
  for external callers only.

Migrate the in-repo callers (tests and the RemoteSource sample) to the async API.
2026-06-16 01:58:07 +03:00
mikasoukhov ca6d4de17c build fix. 2025-12-30 23:55:07 +03:00
mikasoukhov 450fe68a0e Updated samples and tests for IFileSystem API. 2025-12-26 03:31:29 +03:00
mikasoukhov 699c8c8c15 Fix commit 206ae52b46 2025-11-22 11:49:49 +03:00
mikasoukhov 0aa71265fc Fix commit 51022b03c2 2025-11-10 18:08:00 +03:00
mikasoukhov 25e621a4cf DateTimeOffset -> DateTime UTC 2025-11-02 18:40:36 +03:00
mikasoukhov b2b2685a08 Code cleanup. 2025-03-25 19:45:31 +03:00
mikasoukhov d36a9f5394 Fix commit 5f87bb1ae1 2025-03-25 19:33:15 +03:00
mikasoukhov b856fb4987 Use Subscribe method directly. 2025-03-22 11:00:23 +03:00
mikasoukhov 58888c35a9 ISubscriptionProvider. Global subscriptions. 2025-03-06 20:04:24 +03:00
mikasoukhov 3c5760f0f7 Reduced CandleSeries usage. 2025-03-06 15:42:32 +03:00
mikasoukhov dc27bcfc5a RemoteSource sample fix. 2024-11-11 11:23:25 +03:00
mikasoukhov 7f28b31c13 Samples re-org. 2024-06-22 13:45:38 +03:00