Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IDToSymbol ¶
IDToSymbol converts a slash-format counter_id to a user-facing symbol.
Conversions:
- "ST/US/TSLA" → "TSLA.US"
- "ETF/US/SPY" → "SPY.US"
- "VA/HAS/BTCUSD" → "BTCUSD.HAS" (crypto: PAIR.EXCHANGE)
Returns the input unchanged if it is not in the expected format.
func SymbolToID ¶ added in v0.26.0
SymbolToID converts a user-facing symbol to its internal counter_id.
Conversions:
- "TSLA.US" → "ST/US/TSLA" (stock)
- "SPY.US" → "ETF/US/SPY" (ETF, from embedded list)
- "BTCUSD.HAS" → "VA/HAS/BTCUSD" (crypto: suffix is a known exchange)
Stocks default to "ST/{MARKET}/{CODE}"; ETF/index/warrant are resolved via embedded CSV lists.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.