// Pair creates a CurrencyPair from a description in the format: BTC/USDT
Pair creates a CurrencyPair from a description in the format: BTC/USDT
// Pair creates a CurrencyPair from a description in the format : BTC / USDT
func Pair(pairDescription string) (CurrencyPair, error) {
	if !strings.Contains(pairDescription, "/") {
		return CurrencyPair{}, fmt.Errorf("the currency pair description must contain a '/' to indicate the separation between base and quote currencies")
	}
	pair := strings.Split(pairDescription, "/")
	return CurrencyPair{
		BaseCurrency:  pair[0],
		QuoteCurrency: pair[1],
	}, nil
}
func Pair ( pairDescription string ) ( CurrencyPair , error ) { if ! strings . Contains ( pairDescription , " " ) { return CurrencyPair { } , fmt . Errorf ( " " ) } pair := strings . Split ( pairDescription , " " ) return CurrencyPair { BaseCurrency : pair [ 0 ] , QuoteCurrency : pair [ 1 ] , } , nil }
Pair creates a CurrencyPair from a description in the format: BTC/USDT
Pair creates a CurrencyPair from a description in the format : BTC / USDT