tinkoff

package
v0.0.0-...-b12c321 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Tinkoff (TCS) related financial operations available over API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invest

type Invest struct {
	Token string `env:"TINKOFF_INVEST_TOKEN"` // Open-API token
}

Configuration for the tinkof investing Open-API

See https://tinkoffcreditsystems.github.io/invest-openapi/

func DefaultInvest

func DefaultInvest() *Invest

Construct Tinkoff Invest API client using env variables.

TINKOFF_INVEST_TOKEN - is mandatory variable, will panic if empty

func (Invest) Portfolio

func (cfg Invest) Portfolio() (map[string]decimal.Decimal, error)

Get portfolio aggregated by currency with background context

func (Invest) PortfolioContext

func (cfg Invest) PortfolioContext(ctx context.Context) (map[string]decimal.Decimal, error)

Get portfolio aggregated by currency.

API: https://api-invest.tinkoff.ru/

Jump to

Keyboard shortcuts

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