Documentation
¶
Index ¶
- func BuildRequestSignature(requestMethod, requestPath string, requestBody []byte) (string, string)
- func DELETERequest(endpoint string, params RequestParams) ([]byte, error)
- func GETRequest(endpoint string, params RequestParams) ([]byte, error)
- func POSTRequest(endpoint string, body interface{}, params RequestParams) ([]byte, error)
- type RequestParams
- type ResponseWithMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRequestSignature ¶
BuildRequestSignature builds the signature required by the Coinbase Pro API for the CB-ACCESS-SIGN header, using the request's method, path, and JSON body (if provided). The generated signature, as well as the timestamp (in seconds) used for the signature (for use with the CB-ACCESS-TIMESTAMP header) are returned.
func DELETERequest ¶
func DELETERequest(endpoint string, params RequestParams) ([]byte, error)
DELETERequest fires off a DELETE request to the specified endpoint.
func GETRequest ¶
func GETRequest(endpoint string, params RequestParams) ([]byte, error)
func POSTRequest ¶
func POSTRequest(endpoint string, body interface{}, params RequestParams) ([]byte, error)
POSTRequest fires off a POST request to the specified endpoint. If body is non-nil, it is added to the request.
Types ¶
type RequestParams ¶
type RequestParams interface {
GetEncoded() string
}
type ResponseWithMessage ¶
type ResponseWithMessage struct {
Message string `json:"message"`
}
Click to show internal directories.
Click to hide internal directories.