buy

package
v0.0.0-...-a9f4e4b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	ID string `json:"id"`

	ActiveBuyExtOrderID string `json:"active_buy_ext_order_id"`

	PrevBuyOrderID   int64 `json:"prev_buy_order_id"`
	ActiveBuyOrderID int64 `json:"active_buy_order_id"`

	CompletedBuyOrders goAtomic.Int64 `json:"completed_buy_orders"`

	BuyTotal *big.Float `json:"buy_total"`

	BuyOrders map[int64]int64 `json:"buy_orders"`

	IsNeedToCreateBuyOrder bool `json:"is_need_to_create_buy_order"`
	IsDone                 bool `json:"is_done"`
	// contains filtered or unexported fields
}

func NewSession

func NewSession(buyVolume *big.Float) *Session

func (*Session) AddBuyOrder

func (s *Session) AddBuyOrder(oid int64)

func (*Session) GetActiveBuyExtOrderID

func (s *Session) GetActiveBuyExtOrderID() string

func (*Session) GetActiveBuyOrderID

func (s *Session) GetActiveBuyOrderID() int64

func (*Session) GetActiveBuyOrderRequestID

func (s *Session) GetActiveBuyOrderRequestID() string

func (*Session) GetBuyOrders

func (s *Session) GetBuyOrders() map[int64]int64

func (*Session) GetBuyTotal

func (s *Session) GetBuyTotal() *big.Float

func (*Session) GetIsDone

func (s *Session) GetIsDone() bool

func (*Session) GetIsNeedToCreateBuyOrder

func (s *Session) GetIsNeedToCreateBuyOrder() bool

func (*Session) GetPrevBuyOrderID

func (s *Session) GetPrevBuyOrderID() int64

func (*Session) SetActiveBuyExtOrderID

func (s *Session) SetActiveBuyExtOrderID(extID string)

func (*Session) SetActiveBuyOrderID

func (s *Session) SetActiveBuyOrderID(oid int64)

func (*Session) SetActiveBuyOrderRequestID

func (s *Session) SetActiveBuyOrderRequestID(rid string)

func (*Session) SetBuyOrderExecutedFlags

func (s *Session) SetBuyOrderExecutedFlags(oid int64)

func (*Session) SetBuyTotal

func (s *Session) SetBuyTotal(buyTotal *big.Float)

func (*Session) SetIsDone

func (s *Session) SetIsDone(isDone bool)

func (*Session) SetIsNeedToCreateBuyOrder

func (s *Session) SetIsNeedToCreateBuyOrder(isNeedToCreateBuyOrder bool)

func (*Session) SetPrevBuyOrderID

func (s *Session) SetPrevBuyOrderID(oid int64)

Jump to

Keyboard shortcuts

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