ls

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package ls exposes the public LS Securities adapter, including realtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileTokenManager

func NewFileTokenManager() tokencache.Manager

NewFileTokenManager creates a file-backed LS token manager.

func NewFileTokenManagerWithDir

func NewFileTokenManagerWithDir(dir string) tokencache.Manager

NewFileTokenManagerWithDir creates a file-backed LS token manager with a fixed directory.

func OverseasRealtimeKey

func OverseasRealtimeKey(exchange, symbol string) (string, error)

OverseasRealtimeKey returns the fixed-width realtime key used by LS GSC/GSH.

Types

type Adapter

type Adapter interface {
	adapter.Adapter
	CallEndpoint(ctx context.Context, method, path, trCD string, request any) (any, error)
	ConnectRealtime(ctx context.Context) (*RealtimeConn, error)
	BuildTradeSubscriptions(ctx context.Context) ([]RealtimeSubscription, error)
	BuildOverseasTradeSubscriptions(ctx context.Context, market string, maxRows int) ([]RealtimeSubscription, error)
}

Adapter is the public LS adapter contract.

func NewAdapterWithOptions

func NewAdapterWithOptions(sandbox bool, accountID string, opts Options) Adapter

NewAdapterWithOptions creates an LS adapter with injectable options.

type Continuation added in v0.28.0

type Continuation = internal.Continuation

Continuation holds LS continuation request and response headers.

type EndpointPage added in v0.28.0

type EndpointPage = internal.EndpointPage

EndpointPage is a raw payload together with its continuation metadata.

type Options

type Options struct {
	adapter.Options
	MACAddress string
}

Options configures LS adapter internals.

type PageCaller added in v0.28.0

type PageCaller interface {
	CallEndpointPage(ctx context.Context, method, path, trCD string, request any, continuation Continuation) (*EndpointPage, error)
}

PageCaller is the optional REST pagination extension implemented by built-in adapters.

type RealtimeConn

type RealtimeConn = internal.RealtimeConn

RealtimeConn is a live LS websocket connection.

type RealtimeMessage

type RealtimeMessage = internal.RealtimeMessage

RealtimeMessage is a single message received over a realtime connection.

type RealtimeSubscription

type RealtimeSubscription = internal.RealtimeSubscription

RealtimeSubscription describes one tr_cd+key realtime subscription.

Directories

Path Synopsis
Package specs holds the generated documented LS endpoint specs and their shared runtime helpers.
Package specs holds the generated documented LS endpoint specs and their shared runtime helpers.

Jump to

Keyboard shortcuts

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