Versions in this module Expand all Collapse all v1 v1.0.0 Jul 19, 2026 Changes in this version + func StringJSON(v any) string + type APIError struct + Body []byte + Code int + Message string + StatusCode int + func (e *APIError) Error() string + type AuthenticationError struct + func (e *AuthenticationError) Error() string + type Client struct + func NewClient(cfg Config) *Client + func (c *Client) Do(ctx context.Context, method, path string, params map[string]any) (*Response, error) + type Config struct + APIKey string + APISecret string + BaseURI string + HTTPClient *http.Client + RequestTracing string + Retries int + RetryDelay time.Duration + Timeout time.Duration + type FundingRateHistory struct + FundingTime int64 + Rate string + Symbol string + type Kline struct + Close string + High string + Low string + Open string + Timestamp int64 + Turnover string + Volume string + type NotFoundError struct + func (e *NotFoundError) Error() string + type OrderBook struct + Asks []OrderBookEntry + Bids []OrderBookEntry + type OrderBookEntry struct + Price string + Size string + type RateLimitError struct + RetryAfter time.Duration + func (e *RateLimitError) Error() string + type Response struct + Raw map[string]json.RawMessage + func (r *Response) Code() int + func (r *Response) Data(v any) error + func (r *Response) ErrorMsg() string + func (r *Response) ID() int + func (r *Response) IsSuccess() bool + func (r *Response) Msg() string + func (r *Response) Result(v any) error + func (r *Response) String() string + type Signer struct + func NewSigner(secret string) *Signer + func (s *Signer) Expiry(offsetSeconds int64) int64 + func (s *Signer) Sign(method, path, queryString string, expiry int64, body string) string + type Ticker24h struct + Close string + High string + Low string + Open string + Symbol string + Timestamp int64 + Turnover string + Volume string + type TimeResponse struct + Timestamp int64 + type Trade struct + Price string + Side string + Size string + Symbol string + Timestamp int64 + type ValidationError struct + func (e *ValidationError) Error() string