coinbase.go
func (c Client) Buy(amount float64, agreeBtcAmountVaries bool) (*transfer, error) {
	params := map[string]interface{}{
		"qty": amount,
		"agree_btc_amount_varies": agreeBtcAmountVaries,
	}
	holder := transferHolder{}
	if err := c.Post("buys", params, &holder); err != nil {
		return nil, err
	}
	if err := checkApiErrors(holder.response, "Buy"); err != nil {
		return nil, err
	}
	return &holder.Transfer, nil
}
func (c Client) Buy(amount float64, agreeBtcAmountVaries bool) (*transfer, error) {
	params := map[string]interface{}{
		"qty": amount,
		"agree_btc_amount_varies": agreeBtcAmountVaries,
	}
	holder := transferHolder{}
	if err := c.Post("buys", params, &holder); err != nil {
		return nil, err
	}
	if err := checkApiErrors(holder.response, "Buy"); err != nil {
		return nil, err
	}
	return &holder.Transfer, nil
}
func ( c Client ) Buy ( amount float64 , agreeBtcAmountVaries bool ) ( * transfer , error ) { params := map [ string ] interface { } { " " : amount , " " : agreeBtcAmountVaries , } holder := transferHolder { } if err := c . Post ( " " , params , & holder ) ; err != nil { return nil , err } if err := checkApiErrors ( holder . response , " " ) ; err != nil { return nil , err } return & holder . Transfer , nil }
// Buy an amount of BTC and bypass rate limits by setting agreeBtcAmountVaries to true
Buy an amount of BTC and bypass rate limits by setting agreeBtcAmountVaries to true