Longbridge.Symbol.Directory (longbridge v0.1.0)

Copy Markdown View Source

Vendored subset of the upstream counter.rs directory: special counter_ids known at build time (ETFs, US indexes, US warrants). New listings resolved at runtime go through Longbridge.Symbol.Cache.

Summary

Functions

Looks up a user symbol against the embedded directory. Returns the counter_id (e.g. "ETF/US/SPY") on hit, nil otherwise.

Functions

lookup(symbol, market, code)

@spec lookup(String.t(), String.t(), String.t()) :: String.t() | nil

Looks up a user symbol against the embedded directory. Returns the counter_id (e.g. "ETF/US/SPY") on hit, nil otherwise.

Does not apply the default ST/ fallback — callers should do that themselves so the priority order (ST/, IX/, ETF/, WT/) matches the upstream.