brokers

package
v0.0.0-...-9e6d8ee Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDealDirectionString

func GetDealDirectionString(res DealDirection) (cs string)

GetDealDirectionString -

func GetResultString

func GetResultString(res DealResult) (cs string)

GetResultString -

func GetStatusString

func GetStatusString(res DealStatus) (cs string)

GetStatusString -

Types

type Balances

type Balances struct {
	Real float64 `json:"real"`
	Demo float64 `json:"demo"`
}

Balances -

type DealDirection

type DealDirection int

DealDirection -

const (
	//Call -
	Call DealDirection = iota + 1
	//Put -
	Put
)

type DealResult

type DealResult int

DealResult -

const (
	//DealResultWin -
	DealResultWin DealResult = iota + 1
	//DealResultLose -
	DealResultLose
	//DealResultDraw -
	DealResultDraw
)

type DealStatus

type DealStatus int

DealStatus -

const (
	//DealStatusOpen -
	DealStatusOpen DealStatus = iota + 1
	//DealStatusClose -
	DealStatusClose
	//DealStatusWaiting -
	DealStatusWaiting
	//DealStatusRejected -
	DealStatusRejected
)

type SendStatus

type SendStatus struct {
	ID          string        `json:"id"`
	ProviderID  string        `json:"providerId"`
	IsConnected bool          `json:"isConnected"`
	IsLoginIn   bool          `json:"isLoginIn"`
	ServerTime  time.Time     `json:"serverTime"`
	Balances    Balances      `json:"balances"`
	Tasks       []TasksStatus `json:"tasks"`
}

SendStatus -

type Stores

type Stores struct {
	Provider        sync.Map
	ProviderPlugins sync.Map
	ProviderAssets  sync.Map
	ProviderConfig  sync.Map
}

Stores -

type TasksStatus

type TasksStatus struct {
	ID          string    `json:"id"`
	IsConnected bool      `json:"isConnected"`
	IsLoginIn   bool      `json:"isLoginIn"`
	ServerTime  time.Time `json:"serverTime"`
}

TasksStatus -

type Transactions

type Transactions struct {
	ID              int64         `json:"id"`
	LocalTime       time.Time     `json:"localTime"`
	ProviderID      string        `json:"providerId"`
	AssetID         string        `json:"assetId"`
	UserID          string        `json:"userId"`
	Direction       DealDirection `json:"direction"`
	TasksID         string        `json:"tasksId"`
	Type            int           `json:"type"`
	BalanceType     int           `json:"balanceType"`
	BalanceID       int64         `json:"balanceId"`
	AssetProviderID int           `json:"assetProviderID"`
	OpenTime        time.Time     `json:"openTime"`
	CloseTime       time.Time     `json:"closeTime"`
	Expired         time.Time     `json:"expired"`
	Amount          float64       `json:"amount"`
	ResultAmount    float64       `json:"resultAmount"`
	Value           float64       `json:"value"`
	CloseValue      float64       `json:"closeValue"`
	Status          DealStatus    `json:"status"`
	Result          DealResult    `json:"result"`
	Options         interface{}   `json:"options"`
	ProfitPercent   float64       `json:"profitPercent"`
}

Transactions -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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