Documentation ¶
Index ¶
Constants ¶
View Source
const (
TickConst = -1
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepthManager ¶
type DepthManager struct { BuyDepth DepthRecordList SellDepth DepthRecordList // contains filtered or unexported fields }
func NewDepthManager ¶
func NewDepthManager(exchange, symbol string) *DepthManager
func (*DepthManager) Handle ¶
func (manager *DepthManager) Handle( action int, depList []*model.DepthRecord, ch chan api.MsgData)
type DepthRecordList ¶
type DepthRecordList []*model.DepthRecord
func (DepthRecordList) Len ¶
func (s DepthRecordList) Len() int
func (DepthRecordList) Less ¶
func (s DepthRecordList) Less(i, j int) bool
func (DepthRecordList) Swap ¶
func (s DepthRecordList) Swap(i, j int)
type FundingManager ¶
type FundingManager struct { Funding *model.Funding Service *model.FundingService // contains filtered or unexported fields }
func NewFundingManager ¶
func NewFundingManager( exchange, symbol string, db *storage.MongoProxy) *FundingManager
type Kline ¶
type Kline struct { KlineService *model.KlineService Data []*model.Kline // contains filtered or unexported fields }
func (*Kline) LoadKlines ¶
func (kline *Kline) LoadKlines()
type KlineManager ¶
type KlineManager struct { Klines map[string]*Kline TradeCh chan model.Trade // contains filtered or unexported fields }
func NewKlineManager ¶
func (*KlineManager) Start ¶
func (manager *KlineManager) Start(ch chan api.MsgData)
func (*KlineManager) Stop ¶
func (manager *KlineManager) Stop()
type LiquidationManager ¶
type LiquidationManager struct { Liqs []*model.Liquidation LiquidationService *model.LiquidationService // contains filtered or unexported fields }
func NewLiquidationManager ¶
func NewLiquidationManager( exchange, symbol string, db *storage.MongoProxy) *LiquidationManager
func (*LiquidationManager) Handle ¶
func (manager *LiquidationManager) Handle( action int, liq []*model.Liquidation, ch chan api.MsgData)
type MessageManager ¶
type MessageManager struct { Tz *time.Location TradeManagers map[string]*TradeManager QuoteManagers map[string]*QuoteManager PositionManagers map[string]*PositionManager OrderManagers map[string]*OrderManager DepthManagers map[string]*DepthManager FundingManagers map[string]*FundingManager KlineManager map[int]*KlineManager MsgCh chan api.MsgData SendCh chan api.MsgData DB *storage.MongoProxy // contains filtered or unexported fields }
func NewMsgManager ¶
func NewMsgManager( ctx context.Context, interval []int, exchange string, symbols []string, tz string, mongoCfg *baseconfig.MongoConfig) *MessageManager
func (*MessageManager) SetExchangeAPI ¶
func (manager *MessageManager) SetExchangeAPI(ex api.ExchangeAPI)
func (*MessageManager) Start ¶
func (manager *MessageManager) Start()
func (*MessageManager) Stop ¶
func (manager *MessageManager) Stop()
type OrderManager ¶
func NewOrderManager ¶
func NewOrderManager( tz *time.Location, exchange, symbol string) *OrderManager
type PositionManager ¶
type PositionManager struct { Positions []*model.Position // contains filtered or unexported fields }
func NewPositionManager ¶
func NewPositionManager(exchange, symbol string) *PositionManager
type QuoteManager ¶
func NewQuoteManager ¶
func NewQuoteManager(exchange, symbol string) *QuoteManager
type TradeManager ¶
func NewTradeManger ¶
func NewTradeManger( exchange, symbol string, km map[int]*KlineManager, db *storage.MongoProxy) *TradeManager
Click to show internal directories.
Click to hide internal directories.