FormatSymbol formats the given pair to a string suitable for exchange API requests
(pair currency.Pair, assetType asset.Item)
| 1334 | |
| 1335 | // FormatSymbol formats the given pair to a string suitable for exchange API requests |
| 1336 | func (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 | |
| 1344 | func (u URL) String() string { |
| 1345 | switch u { |