bbgo_origin/pkg/exchange/okex/convert.go

17 lines
297 B
Go
Raw Normal View History

2021-05-25 18:11:02 +00:00
package okex
import "strings"
func toGlobalSymbol(symbol string) string {
return strings.ReplaceAll(symbol, "-", "")
}
func toLocalSymbol(symbol string) string {
if s, ok := symbolMap[symbol]; ok {
return s
}
log.Errorf("failed to look up local symbol from %s", symbol)
return symbol
}