Versions in this module Expand all Collapse all v1 v1.0.0 Dec 26, 2023 Changes in this version + const ApiKeyVersionV1 + const ApiKeyVersionV2 + const ApiSuccess + var FuturesBaseURL = "https://api-futures.kucoin.com" + var NIL = "<nil>" + var SpotBaseURL = "https://api.kucoin.com" + func IntToString(i int64) string + func ToJsonString(v interface{}) string + type ApiResponse struct + Code string + Message string + RawData json.RawMessage + Resp *HTTPResponse + func (ar *ApiResponse) ApiSuccessful() bool + func (ar *ApiResponse) HttpSuccessful() bool + func (ar *ApiResponse) ReadData(v interface{}) error + func (ar *ApiResponse) ReadPaginationData(v interface{}) (*PaginationModel, error) + type HTTPRequest struct + BaseURL string + Body any + Headers map[string]string + Method string + Path string + Query any + func (h *HTTPRequest) RequestBody() (string, error) + func (h *HTTPRequest) RequestURI() (string, error) + type HTTPResponse struct + Body []byte + Req *HTTPRequest + Resp *http.Response + func NewResponse(request *HTTPRequest, response *http.Response, body []byte) *HTTPResponse + func (r *HTTPResponse) Error() string + func (r *HTTPResponse) ReadBody() ([]byte, error) + func (r *HTTPResponse) ReadJsonBody(v interface{}) error + type KucoinClient struct + func NewKucoinRestClient(cfg *KucoinClientCfg) (*KucoinClient, error) + func (k *KucoinClient) GenSignature(req HTTPRequest) (map[string]string, error) + func (k *KucoinClient) GetBaseURL() string + func (k *KucoinClient) GetDebug() bool + func (k *KucoinClient) GetHeaders() (map[string]string, error) + func (k *KucoinClient) GetKey() string + func (k *KucoinClient) GetPassphrase() string + func (k *KucoinClient) GetSecret() string + func (s *KucoinClient) SendHTTPRequest(ctx context.Context, req HTTPRequest) (*HTTPResponse, error) + type KucoinClientCfg struct + BaseURL string + Debug bool + Key string + KeyVersion string + Logger *slog.Logger + Passphrase string + Secret string + type PaginationModel struct + CurrentPage int64 + PageSize int64 + RawItems json.RawMessage + TotalNum int64 + TotalPage int64 + func (p *PaginationModel) ReadItems(v interface{}) error + type PaginationParam struct + CurrentPage int64 + PageSize int64 + func (p *PaginationParam) ReadParam(params map[string]string)