You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: coinbasepro.go
    path of file: ./repos/gocryptotrader/exchanges/coinbasepro
    
    the code of the file until where you have to start completion: package coinbasepro

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"time"

	"github.com/thrasher-corp/gocryptotrader/common"
	"github.com/thrasher-corp/gocryptotrader/common/crypto"
	"github.com/thrasher-corp/gocryptotrader/currency"
	exchange "github.com/thrasher-corp/gocryptotrader/exchanges"
	"github.com/thrasher-corp/gocryptotrader/exchanges/order"
	"github.com/thrasher-corp/gocryptotrader/exchanges/request"
)
    
func (c *CoinbasePro) PlaceMarketOrder(ctx context.Context, clientRef string, size, funds float64, side, productID, stp string) (string, error) {
	resp := GeneralizedOrderResponse{}
	req := make(map[string]interface{})
	req["side"] = side
	req["product_id"] = productID
	req["type"] = order.Market.Lower()

	if size != 0 {
		req["size"] = strconv.FormatFloat(size, 'f', -1, 64)
	}
	if funds != 0 {
		req["funds"] = strconv.FormatFloat(funds, 'f', -1, 64)
	}
	if clientRef != "" {
		req["client_oid"] = clientRef
	}
	if stp != "" {
		req["stp"] = stp
	}

	err := c.SendAuthenticatedHTTPRequest(ctx, exchange.RestSpot, http.MethodPost, coinbaseproOrders, req, &resp)
	if err != nil {
		return "", err
	}

	return resp.ID, nil
}