MCPcopy
hub / github.com/thrasher-corp/gocryptotrader / FormatSymbol

Method FormatSymbol

exchanges/exchange.go:1336–1342  ·  view source on GitHub ↗

FormatSymbol formats the given pair to a string suitable for exchange API requests

(pair currency.Pair, assetType asset.Item)

Source from the content-addressed store, hash-verified

1334
1335// FormatSymbol formats the given pair to a string suitable for exchange API requests
1336func (b *Base) FormatSymbol(pair currency.Pair, assetType asset.Item) (string, error) {
1337 pairFmt, err := b.GetPairFormat(assetType, true)
1338 if err != nil {
1339 return pair.String(), err
1340 }
1341 return pairFmt.Format(pair), nil
1342}
1343
1344func (u URL) String() string {
1345 switch u {

Callers 1

TestFormatSymbolFunction · 0.95

Calls 3

GetPairFormatMethod · 0.95
StringMethod · 0.65
FormatMethod · 0.45

Tested by 1

TestFormatSymbolFunction · 0.76