counter

package
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDToSymbol

func IDToSymbol(counterID string) string

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

func SymbolToID(symbol string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL