olymptrade

package
v0.0.0-...-ffe04fe Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorDefault = "\x1b[39m"

	ColorRed   = "\x1b[91m"
	ColorGreen = "\x1b[32m"
	ColorBlue  = "\x1b[94m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder ...

func (*Builder) Build

func (b *Builder) Build() WebsocketServiceClient

Build ...

func (*Builder) SetAccountID

func (b *Builder) SetAccountID(accountID string)

SetAccountID ...

func (*Builder) SetAccountMode

func (b *Builder) SetAccountMode(accountMode string)

SetAccountMode ...

func (*Builder) SetBuilder

func (b *Builder) SetBuilder(builder WebsocketServiceClient)

SetBuilder ...

func (*Builder) SetEmitter

func (b *Builder) SetEmitter(emitter *emission.Emitter)

SetEmitter ...

func (*Builder) SetPair

func (b *Builder) SetPair(pair string)

SetPair ...

func (*Builder) SetWebsocket

func (b *Builder) SetWebsocket(websocket gowebsocket.Socket)

SetWebsocket ...

type Candle

type Candle struct {
	Time  int64   `json:"t"`
	Open  float64 `json:"open"`
	Low   float64 `json:"low"`
	High  float64 `json:"high"`
	Close float64 `json:"close"`
}

type DataFrame

type DataFrame []struct {
	Frames []Frame `json:"d"`
}

type Frame

type Frame struct {
	Pair      string   `json:"p"`
	Timeframe int      `json:"tf"`
	Candles   []Candle `json:"candles"`
}

type Options

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

type Service

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

Service ...

func (*Service) Analysis

func (s *Service) Analysis(ctx context.Context, df DataFrame)

Analysis ...

func (*Service) Buy

func (s *Service) Buy(ctx context.Context, dir string)

Buy ...

func (*Service) SetOptions

func (s *Service) SetOptions(options Options)

SetOptions ...

func (*Service) StartCandleStream

func (s *Service) StartCandleStream(ctx context.Context)

StartCandleStream ...

type WebsocketServiceClient

type WebsocketServiceClient interface {
	// SetOptions ...
	SetOptions(options Options)

	// StartCandleStream ...
	StartCandleStream(ctx context.Context)

	// Analysis ...
	Analysis(ctx context.Context, df DataFrame)

	// Buy ...
	Buy(ctx context.Context, dir string)
}

WebsocketServiceClient ...

Jump to

Keyboard shortcuts

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