Documentation
¶
Overview ¶
Package display provides a client for the Webull Display Solution API, a separate product from the core Market Data API with its own host, authentication, and endpoint paths.
Display Solution endpoints (Corporate Actions, Screener v2, Fund Data) require a different auth flow: a client-credentials token obtained via HMAC-SHA1 signed request, then used as Authorization: Bearer header.
Reference: https://developer.webull.hk/apis/docs/market-data-api/Hosted-Display-Solution
Stability: Experimental — live verification blocked; requires Display Solution entitlement. The branding host returns HTTP 403. See IMPLEMENTATION_STATUS.md.
Index ¶
- Constants
- type ClientToken
- type Option
- type Service
- func (s *Service) Close() error
- func (s *Service) Do(ctx context.Context, method, path string, query url.Values, body, out any) error
- func (s *Service) EnsureToken(ctx context.Context) (string, error)
- func (s *Service) Get(ctx context.Context, path string, query url.Values, out any) error
- func (s *Service) RefreshClientToken(ctx context.Context, refreshToken string) (*ClientToken, error)
Constants ¶
const ( HKProductionHTTP = "https://co-branding-openapi.webull.hk" HKSandboxHTTP = "https://hk-co-branding-openapi.uat.webullbroker.com" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientToken ¶
type ClientToken struct {
AccessToken string `json:"access_token"`
ExpiresAt int64 `json:"expires_at"`
RefreshToken string `json:"refresh_token"`
RefreshExpiresAt int64 `json:"refresh_expires_at"`
}
ClientToken is an access/refresh token pair issued by the Display Solution.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithBaseURL ¶
func WithHTTPClient ¶
func WithSandbox ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) RefreshClientToken ¶
func (s *Service) RefreshClientToken(ctx context.Context, refreshToken string) (*ClientToken, error)
RefreshClientToken exchanges a refresh token for a new access token using the Client-to-Server credentials.