types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddChannel

type AddChannel struct {
	TelegramID int64 `json:"telegramId" validate:"required"`
}

type AddStrategy

type AddStrategy struct {
	Symbol         string          `json:"symbol" validate:"required"`
	AllowCounter   bool            `json:"allowCounter"`
	Leverage       uint            `json:"leverage,omitempty"`
	TargetStrategy *TargetStrategy `json:"targetStrategy,omitempty"`
	ZoneStrategy   *ZoneStrategy   `json:"zoneStrategy,omitempty"`
}

type AddUser

type AddUser struct {
	Name     string `json:"name" validate:"required"`
	Password string `json:"password" validate:"required,password"`
}

type Channel

type Channel struct {
	ID       uint  `json:"id"`
	Telegram int64 `json:"telegramId"`
}

type Entry

type Entry struct {
	ID               uint    `json:"-"`
	Diff             float64 `json:"diff"`
	TargetStrategyID uint    `json:"-"`
}

type GetUser

type GetUser struct {
	Name string `json:"name"`
	UUID string `json:"identifier"`
}

type GetUserWithID

type GetUserWithID struct {
	ID   uint
	Name string `json:"name"`
	UUID string `json:"identifier"`
}

type SL

type SL struct {
	ID               uint    `json:"-"`
	Diff             float64 `json:"diff"`
	TargetStrategyID uint    `json:"-"`
	ZoneStrategyID   uint    `json:"-"`
}

type Strategy

type Strategy struct {
	ID             uint            `json:"-"`
	AllowCounter   bool            `json:"allowCounter"`
	Symbol         string          `json:"symbol"`
	Leverage       uint            `json:"leverage"`
	TargetStrategy *TargetStrategy `json:"targetStrategy,omitempty"`
	ZoneStrategy   *ZoneStrategy   `json:"zoneStrategy,omitempty"`
	ChannelID      uint            `json:"-"`
}

type TP

type TP struct {
	ID               uint    `json:"-"`
	Diff             float64 `json:"diff"`
	TargetStrategyID uint    `json:"-"`
	ZoneStrategyID   uint    `json:"-"`
}

type TVSignal

type TVSignal struct {
	Symbol    string  `json:"ticker" validate:"required"`
	Price     float64 `json:"price" validate:"required"`
	ChannelID int64   `json:"tgChannel" validate:"required"`
	Direction string  `json:"direction,omitempty"`
	Exchange  string  `json:"exchange"`
	User      string  `json:"user" validate:"required"`
	UUID      string  `json:"uuid" validate:"required"`
}

type TargetStrategy

type TargetStrategy struct {
	ID         uint     `json:"-"`
	Entries    []*Entry `json:"entries"`
	TPs        []*TP    `json:"tps"`
	SL         *SL      `json:"sl"`
	IsBreakout bool     `json:"isBreakout"`
	StrategyID uint     `json:"-"`
}

type UpdateChannel

type UpdateChannel struct {
	Telegram int64 `json:"telegramId" validate:"required"`
}

type UpdateUser

type UpdateUser struct {
	Name     string `json:"name"`
	Password string `json:"password"`
}

type ZoneStrategy

type ZoneStrategy struct {
	ID         uint    `json:"-"`
	EntryStart float64 `json:"entryStart"`
	EntryStop  float64 `json:"entryStop"`
	TPs        []*TP   `json:"tps"`
	SL         *SL     `json:"sl"`
	IsBreakout bool    `json:"isBreakout"`
	StrategyID uint    `json:"-"`
}

Jump to

Keyboard shortcuts

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