spread

package
v0.0.0-...-abc9c84 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 3 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"`

	ActiveSellExtOrderID string `json:"active_sell_ext_order_id"`

	PrevBuyOrderID    int64 `json:"prev_buy_order_id"`
	ActiveBuyOrderID  int64 `json:"active_buy_order_id"`
	ActiveSellOrderID int64 `json:"active_sell_order_id"`
	PrevSellOrderID   int64 `json:"prev_sell_order_id"`

	CompletedBuyOrders  int64 `json:"completed_buy_orders"`
	CompletedSellOrders int64 `json:"completed_sell_orders"`

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

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

	IsNeedToCreateBuyOrder  bool `json:"is_need_to_create_buy_order"`
	IsNeedToCreateSellOrder bool `json:"is_need_to_create_sell_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) AddSellOrder

func (s *Session) AddSellOrder(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) GetActiveSellExtOrderID

func (s *Session) GetActiveSellExtOrderID() string

func (*Session) GetActiveSellOrderID

func (s *Session) GetActiveSellOrderID() int64

func (*Session) GetActiveSellOrderRequestID

func (s *Session) GetActiveSellOrderRequestID() 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) GetIsNeedToCreateSellOrder

func (s *Session) GetIsNeedToCreateSellOrder() bool

func (*Session) GetPrevBuyOrderID

func (s *Session) GetPrevBuyOrderID() int64

func (*Session) GetPrevSellOrderID

func (s *Session) GetPrevSellOrderID() int64

func (*Session) GetSellOrders

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

func (*Session) GetSellVolume

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

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) SetActiveSellExtOrderID

func (s *Session) SetActiveSellExtOrderID(extID string)

func (*Session) SetActiveSellOrderID

func (s *Session) SetActiveSellOrderID(oid int64)

func (*Session) SetActiveSellOrderRequestID

func (s *Session) SetActiveSellOrderRequestID(rid string)

func (*Session) SetBuyOrderCancelledFlags

func (s *Session) SetBuyOrderCancelledFlags()

func (*Session) SetBuyOrderDoneFlags

func (s *Session) SetBuyOrderDoneFlags(oid int64, sellVolume *big.Float)

func (*Session) SetBuyTotal

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

func (*Session) SetIsNeedToCreateBuyOrder

func (s *Session) SetIsNeedToCreateBuyOrder(isNeedToCreateBuyOrder bool)

func (*Session) SetIsNeedToCreateSellOrder

func (s *Session) SetIsNeedToCreateSellOrder(isNeedToCreateSellOrder bool)

func (*Session) SetPrevBuyOrderID

func (s *Session) SetPrevBuyOrderID(oid int64)

func (*Session) SetPrevSellOrderID

func (s *Session) SetPrevSellOrderID(oid int64)

func (*Session) SetSellOrderCancelledFlags

func (s *Session) SetSellOrderCancelledFlags()

func (*Session) SetSellOrderDoneFlags

func (s *Session) SetSellOrderDoneFlags()

func (*Session) SetSellVolume

func (s *Session) SetSellVolume(sellVolume *big.Float)

Jump to

Keyboard shortcuts

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