bots

package
v0.0.0-...-a6dfd3b Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRecords

func ConvertRecords(_base, _quote []model.Record) []model.Record

func GenerateReport

func GenerateReport(_b IBot, _records []model.Record, _bridge []model.Record) float64

func LoadData

func LoadData(_b IBot) map[string]map[string][]model.Record

func SaveData

func SaveData(_b IBot)

for example, _quote: usdt, _bridge: bnb

func SortCoins

func SortCoins(_b IBot, _quote string, _bridge string)

Types

type BinanceBot

type BinanceBot struct {
	Bot
	// contains filtered or unexported fields
}

func (*BinanceBot) GetPairs

func (_b *BinanceBot) GetPairs() map[string][]string

func (*BinanceBot) GetRecords

func (_b *BinanceBot) GetRecords(_base, _quote string) (records []model.Record, err error)

func (*BinanceBot) Init

func (_b *BinanceBot) Init()

type Bot

type Bot struct {
	IBot
	Fee   float64
	Limit int
	Name  string
}

func (*Bot) GetFee

func (_b *Bot) GetFee() float64

func (*Bot) GetName

func (_b *Bot) GetName() string

func (*Bot) Init

func (_b *Bot) Init(_name string, _fee float64)

type IBot

type IBot interface {
	Init()
	GetRecords(_base string, _quote string) ([]model.Record, error)
	GetPairs() map[string][]string
	GetFee() float64
	GetName() string
}

type OkBot

type OkBot struct {
	Bot
	// contains filtered or unexported fields
}

func (*OkBot) GetRecords

func (_b *OkBot) GetRecords(_base, _quote string) (records []model.Record, err error)

func (*OkBot) Init

func (_b *OkBot) Init()

type ZbBot

type ZbBot struct {
	Bot
	// contains filtered or unexported fields
}

func (*ZbBot) GetPairs

func (_b *ZbBot) GetPairs() map[string][]string

func (*ZbBot) GetRecords

func (_b *ZbBot) GetRecords(_base, _quote string) (records []model.Record, err error)

func (*ZbBot) Init

func (_b *ZbBot) Init()

Jump to

Keyboard shortcuts

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