Documentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/backtest-monorepo-parallel/llms.txt
Use this file to discover all available pages before exploring further.
@pro/core ships four injectable services that are accessible anywhere in the monorepo via globalThis.core — a structured async logger, a Telegram MTProto scraper for pulling raw channel messages, a regex-based parser that maps those messages to typed fields, and a pre-built crypto signal screener wired to the crypto_yoda_channel Telegram channel.
All four services are lazy-initialized via the DI container — their constructors are invoked on first access (i.e., when
inject() is called for a given token), not at module load time.LoggerService
Accessed viacore.loggerService
LoggerService is a thin async wrapper that delegates to a pluggable ILogger implementation. Out of the box the underlying logger is NOOP_LOGGER — every method is a no-op — so the library is completely silent unless you opt in by calling setLogger().
Methods
log()
log()
debug()
debug()
log().info()
info()
BaseCRUD and BaseMap for every operation.warn()
warn()
log().setLogger()
setLogger()
Any object implementing
{ log, debug, info, warn }. The implementation may be synchronous or asynchronous.ScraperService
Accessed viacore.scraperService
ScraperService connects to Telegram via MTProto (getTelegram() from config/telegram.ts) and iterates messages in a given channel for a given calendar day in UTC.
scrapeDay()
channel on the UTC calendar day represented by date — from 00:00:00.000 UTC to 23:59:59.999 UTC.
The Telegram channel username or ID (e.g.
"crypto_yoda_channel").Any
Date whose UTC date components identify the day to scrape. Time components are ignored — the method normalises to midnight UTC internally.Promise<ScraperMessage[]> — messages in reverse-chronological order as received from the Telegram API, filtered to the requested day.
Telegram message ID.
Raw text body of the message.
The channel name as passed to
scrapeDay.Message timestamp reconstructed from the Telegram UNIX epoch.
ParserService
Accessed viacore.parserService
ParserService applies a declarative regex-based field mapping to an array of ScraperMessage objects and returns each message augmented with a data field — null if the message did not match all required fields, or a typed extracted object if it did.
parseDay()
The raw messages to parse, typically the output of
scraperService.scrapeDay().A field-mapping object where each key maps to either a bare
RegExp or a full ExtractConfig descriptor.Promise<ParserMessageRaw<M>[]> — the original messages with an added data field.
null if any non-optional field failed to match. Otherwise an object whose keys and value types are inferred from M.FieldMapping and ExtractConfig
AFieldMapping is a plain object where each value is either a RegExp (shorthand — extracts capture group 1 as a string) or a full ExtractConfig:
CryptoYodaScreenService
Accessed viacore.cryptoYodaScreenService
CryptoYodaScreenService is a pre-built screener that combines ScraperService and ParserService to extract structured trading signals from the crypto_yoda_channel Telegram channel. The hard-coded SIGNAL_FORMAT parses Russian-language signal messages into a typed SignalFields object.
SignalFields
screenDay()
crypto_yoda_channel for the given UTC date and applies the SIGNAL_FORMAT parser in a single call.
The UTC calendar day to screen. Internally delegates to
scraperService.scrapeDay("crypto_yoda_channel", date).Promise<ParserMessageRaw<SignalFields>[]> — every message from the channel that day, each with a data field that is either a parsed SignalFields object or null if the message was not a recognisable signal.
Example:
parseDay()
SIGNAL_FORMAT. Use this overload when you have already retrieved messages via scraperService.scrapeDay() and want to avoid a second Telegram round-trip.
Messages already fetched from the Telegram API.
screenDay().