code: public CoinbaseBuy buy(String accountId, BigDecimal total, Currency currency, boolean commit)
        throws IOException {
  
      String path = "/v2/accounts/" + accountId + "/buys";
      String apiKey = exchange.getExchangeSpecification().getApiKey();
      BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();
      BuyPayload payload = new BuyPayload(total, currency.getCurrencyCode(), commit, false);
      String body = new ObjectMapper().writeValueAsString(payload);
      String signature = getSignature(timestamp, HttpMethod.POST, path, body);
  
      showCurl(HttpMethod.POST, apiKey, timestamp, signature, path, body);
  
      return coinbase
          .buy(
              MediaType.APPLICATION_JSON,
              Coinbase.CB_VERSION_VALUE,
              apiKey,
              signature,
              timestamp,
              accountId,
              payload)
          .getData();
    }
docs: Authenticated resource that lets you purchase Bitcoin using the primary bank account that is
  linked to your account. (You must link and verify your bank account through the website before
  this API call will work). The underlying optional parameter agree_btc_amount_varies is set to
  false.
  
  @see <a
  href="https://developers.coinbase.com/api/v2#place-buy-order">developers.coinbase.com/api/v2#place-buy-order</a>