tinkoff

package module
v0.0.0-...-a9f64f7 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 19 Imported by: 1

README

Tinkoff Broker implementation

How to run tests

GOARCH=amd64 go test -gcflags='-N -l'

Documentation

Overview

https://tinkoff.github.io/investAPI/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Money

type Money interface {
	GetUnits() int64
	GetNano() int32
}

type MoneyValue

type MoneyValue struct {
	Money
}

func NewMoneyValue

func NewMoneyValue(v Money) *MoneyValue

func (*MoneyValue) ToFloat

func (v *MoneyValue) ToFloat() float64

type Option

type Option func(*Tinkoff)

func WithAppName

func WithAppName(appName string) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithProtectiveSpread

func WithProtectiveSpread(protectiveSpread float64) Option

type Tinkoff

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

func New

func New(token, accountID, instrumentFIGI string, opts ...Option) (*Tinkoff, error)

func (*Tinkoff) ChangeConditionalOrder

func (t *Tinkoff) ChangeConditionalOrder(
	ctx context.Context,
	action trengin.ChangeConditionalOrderAction,
) (trengin.Position, error)

func (*Tinkoff) ClosePosition

func (*Tinkoff) OpenPosition

func (*Tinkoff) Run

func (t *Tinkoff) Run(ctx context.Context) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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