Versions in this module Expand all Collapse all v0 v0.1.0 Sep 5, 2026 Changes in this version + const DefaultTimeout + const Version + var ErrAuthentication = errors.New("webull: authentication failed") + var ErrInvalidRequest = errors.New("webull: invalid request") + var ErrMissingCredentials = errors.New("webull: AppKey and AppSecret are required") + var ErrNotFound = errors.New("webull: not found") + var ErrPermission = errors.New("webull: permission denied") + var ErrRateLimited = errors.New("webull: rate limited") + var ErrRedirectNotAllowed = transport.ErrRedirectNotAllowed + var ErrServer = errors.New("webull: server error") + func UserAgent() string + type APIError struct + Body []byte + Code string + Message string + RequestID string + RetryAfter time.Duration + StatusCode int + Truncated bool + func (e *APIError) Error() string + func (e *APIError) ErrorCode() string + func (e *APIError) Is(target error) bool + func (e *APIError) Temporary() bool + type AccessToken struct + ExpiresAt time.Time + Status TokenStatus + Token string + func (t *AccessToken) UnmarshalJSON(data []byte) error + type Client struct + Events *events.Client + MarketData *marketdata.Client + Streaming *streaming.Client + Trade *trade.Client + func NewClient(cfg Config) (*Client, error) + func (c *Client) CheckAccessToken(ctx context.Context, token string) (*AccessToken, error) + func (c *Client) CreateAccessToken(ctx context.Context) (*AccessToken, error) + func (c *Client) Environment() Environment + func (c *Client) TokenCheckEnabled(ctx context.Context) (bool, error) + type Config struct + AccessToken string + AppKey string + AppSecret string + EndpointOverrides map[string]string + Environment Environment + HTTPClient *http.Client + UserAgent string + type Environment string + const Production + const Sandbox + func (e Environment) IsProduction() bool + func (e Environment) String() string + func (e Environment) Valid() bool + type TokenStatus string + const TokenExpired + const TokenInvalid + const TokenNormal + const TokenPending