The generic, venue-agnostic symbol normaliser.
Canonical form is BASE-QUOTE, uppercase, dash-separated (BTC-USD). This
module holds no venue-specific knowledge — it converts given a mapping that
each venue package declares inside itself. That split is what keeps Core free of
venue facts: the venue supplies its separator, quote list and asset aliases; the
string surgery lives here, once.
Mapping
%{
sep: "-" | "", # native separator
quotes: ["USDC", "USD", ...], # known quote assets, LONGEST-FIRST
asset_aliases: %{"XBT" => "BTC"} # exchange base code → canonical (optional)
}Invariant
to_canonical(m, to_exchange(m, p)) == p for every pair. The conformance suite
asserts this against each venue's own mapping, so a venue whose two directions
disagree fails before it ships.
Summary
Functions
Exchange-native symbol → canonical BASE-QUOTE, per the connector's mapping.
Unparseable / already-dashed input → uppercased input (never dropped).
Canonical BASE-QUOTE → exchange-native, per the connector's mapping.
Types
Functions
Exchange-native symbol → canonical BASE-QUOTE, per the connector's mapping.
Unparseable / already-dashed input → uppercased input (never dropped).
Canonical BASE-QUOTE → exchange-native, per the connector's mapping.