ls

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 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 Options

type Options struct {
	adapter.Options
	MACAddress string
}

Options configures LS adapter internals.

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