rakutensecurities

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("unauthorized")

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Kind                   string  // 種別
	Code                   string  // 銘柄コード・ティッカー
	Name                   string  // 銘柄
	Account                string  // 口座
	Position               int     // 保有数量 (口)
	AverageCost            float64 // 平均取得価額 (円)
	Price                  int     // 基準価額 (円)
	PriceChange            int     // 基準価額の前日比 (円)
	EstimateAmount         int     // 評価額 (円)
	EstimateProfitLoss     int     // 評価損益 (円)
	EstimateProfitLossRate float64 // 評価損益率 (%)
}

type AssetSummary

type AssetSummary struct {
	Title                         string
	EstimateAmount                int     // 評価額 (円)
	EstimateAmountChange          int     // 評価額の前日比 (円)
	EstimateAmountChangeRate      float64 // 評価額の前日比 (%)
	EstimateAmountMonthChange     int     // 評価額の前月比 (円)
	EstimateAmountMonthChangeRate float64 // 評価額の前月比 (円)
	EstimateProfitLoss            int     // 評価損益 (円)
	EstimateProfitLossRate        float64 // 評価損益率 (%)
	RealizedProfitLoss            int     // 実現損益 (円)
	Dividend                      int     // 配当・分配金 (円)
}

type ExchangeRate

type ExchangeRate struct {
	CurrencyName string
	Rate         float64
	Unit         string
}

type Metrics

type Metrics struct {
	Summaries     []*AssetSummary
	Assets        []*Asset
	ExchangeRates []*ExchangeRate
}

type Plugin

type Plugin struct {
	Username string `toml:"-" env:"RAKUTEN_SECURITIES_USERNAME"`
	Password string `toml:"-" env:"RAKUTEN_SECURITIES_PASSWORD"`
	// contains filtered or unexported fields
}

func (*Plugin) Gather

func (p *Plugin) Gather(accumulator telegraf.Accumulator) error

func (*Plugin) Init

func (p *Plugin) Init() error

func (*Plugin) SampleConfig

func (p *Plugin) SampleConfig() string

type RakutenSecuritiesClient

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

func NewRakutenSecuritiesClient

func NewRakutenSecuritiesClient() (*RakutenSecuritiesClient, error)

func (*RakutenSecuritiesClient) GetMetrics

func (c *RakutenSecuritiesClient) GetMetrics(ctx context.Context) (*Metrics, error)

func (*RakutenSecuritiesClient) Login

func (c *RakutenSecuritiesClient) Login(ctx context.Context, username, password string) error

Jump to

Keyboard shortcuts

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