display

package
v2.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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 WithBaseURL(baseURL string) Option

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

func WithSandbox

func WithSandbox(v bool) Option

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(appKey, appSecret string, opts ...Option) *Service

func (*Service) Close

func (s *Service) Close() error

func (*Service) Do

func (s *Service) Do(ctx context.Context, method, path string, query url.Values, body, out any) error

func (*Service) EnsureToken

func (s *Service) EnsureToken(ctx context.Context) (string, error)

func (*Service) Get

func (s *Service) Get(ctx context.Context, path string, query url.Values, out any) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL