model

package
v0.0.0-...-f9f454f Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllTraders       = "AllTraders"
	SimulatedTraders = "SimulatedTraders"
	RealTraders      = "RealTraders"
)
View Source
const (
	FullAccess           = 100
	HistoricalDataAccess = 50
	CurrentAccess        = 40
)

Users access levels

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	ID             primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	CurrentSession Session            `json:"currentsession,omitempty" bson:"currentSession"`
	SessionHistory []Session          `json:"sessionhistory,omitempty" bson:"sessionHistory"`
}

Bot stores usage info about a specific bot identified by BotID

func (*Bot) FilterPublicInfo

func (bot *Bot) FilterPublicInfo()

FilterPublicInfo Resets non public info

type Bots

type Bots []Bot

Bots is a slice of Bot

type Session

type Session struct {
	StartedAt        int                 `json:"startedat,omitempty" bson:"startedAt"`
	UpTime           int                 `json:"uptime,omitempty" bson:"upTime"`
	Version          string              `json:"version,omitempty" bson:"version"`
	Simulator        bool                `json:"simulator,omitempty" bson:"simulator"`
	Trader           bool                `json:"trader,omitempty" bson:"trader"`
	EvalConfig       []string            `json:"evalconfig,omitempty" bson:"evalConfig"`
	Pairs            []string            `json:"pairs,omitempty" bson:"pairs"`
	Exchanges        []string            `json:"exchanges,omitempty" bson:"exchanges"`
	ExchangeTypes    []string            `json:"exchangetypes,omitempty" bson:"exchangeTypes"`
	Notifications    []string            `json:"notifications,omitempty" bson:"notifications"`
	Type             string              `json:"type,omitempty" bson:"type"`
	Platform         string              `json:"platform,omitempty" bson:"platform"`
	ReferenceMaket   string              `json:"referencemarket,omitempty" bson:"referenceMarket"`
	PortfolioValue   float32             `json:"portfoliovalue,omitempty" bson:"portfolioValue"`
	Profitability    float32             `json:"profitability,omitempty" bson:"profitability"`
	TradedVolumes    map[string]float32  `json:"tradedvolumes,omitempty" bson:"tradedVolumes"`
	Supports         map[string][]string `json:"supports,omitempty" bson:"supports"`
	SignalEmitter    bool                `json:"signalemitter,omitempty" bson:"signalEmitter"`
	SignalReceiver   bool                `json:"signalreceiver,omitempty" bson:"signalReceiver"`
	CommunityBotType string              `json:"communitybottype,omitempty" bson:"communityBotType"`
	ProfileId        string              `json:"profileid,omitempty" bson:"profileId"`
	ProfileName      string              `json:"profilename,omitempty" bson:"profileName"`
	ProfileImported  bool                `json:"profileimported,omitempty" bson:"profileImported"`
}

Session stores data about a bot session

func (*Session) FilterPublicInfo

func (session *Session) FilterPublicInfo()

FilterPublicInfo Resets non public info

type Top

type Top struct {
	Name  string `json:"name" bson:"_id"`
	Count int    `json:"count" bson:"count"`
}

Top stores data about a ranking

type User

type User struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	APIKey      string             `json:"apikey,omitempty" bson:"apiKey"`
	AccessLevel int8               `json:"accesslevel,omitempty" bson:"accessLevel"`
}

User stores usage info about a specific user identified by Api-Key

Jump to

Keyboard shortcuts

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