Documentation ¶
Index ¶
- Constants
- type DepthAPILimit
- type DepthStreamLevel
- type DepthStreamRate
- type Depths
- func (d *Depths) GetAsks() *asks_types.Asks
- func (d *Depths) GetBids() *bids_types.Bids
- func (d *Depths) GetNextDownCoefficient() items_types.PricePercentType
- func (d *Depths) GetNextUpCoefficient() items_types.PricePercentType
- func (d *Depths) IsStreamStarted() bool
- func (d *Depths) Lock()
- func (d *Depths) MarkStreamAsStarted()
- func (d *Depths) MarkStreamAsStopped()
- func (d *Depths) NextPriceDown(percent items_types.PricePercentType, price ...items_types.PriceType) (next items_types.PriceType)
- func (d *Depths) NextPriceUp(percent items_types.PricePercentType, price ...items_types.PriceType) (next items_types.PriceType)
- func (a *Depths) ResetEvent(err error)
- func (d *Depths) SetInit(initCreator func(*Depths) types.InitFunction)
- func (d *Depths) SetStartDepthStream(startDepthStreamCreator func(*Depths) types.StreamFunction)
- func (d *Depths) StreamStart() (err error)
- func (d *Depths) StreamStop() (err error)
- func (d *Depths) Symbol() string
- func (d *Depths) TryLock() bool
- func (d *Depths) Unlock()
- func (a *Depths) UpdateAsk(item *items_types.Ask) bool
- func (a *Depths) UpdateBid(item *items_types.Bid) bool
Constants ¶
View Source
const ( DepthStreamLevel5 DepthStreamLevel = 5 DepthStreamLevel10 DepthStreamLevel = 10 DepthStreamLevel20 DepthStreamLevel = 20 DepthAPILimit5 DepthAPILimit = 5 DepthAPILimit10 DepthAPILimit = 10 DepthAPILimit20 DepthAPILimit = 20 DepthAPILimit50 DepthAPILimit = 50 DepthAPILimit100 DepthAPILimit = 100 DepthAPILimit500 DepthAPILimit = 500 DepthAPILimit1000 DepthAPILimit = 1000 DepthStreamRate100ms DepthStreamRate = DepthStreamRate(100 * time.Millisecond) DepthStreamRate250ms DepthStreamRate = DepthStreamRate(250 * time.Millisecond) DepthStreamRate500ms DepthStreamRate = DepthStreamRate(500 * time.Millisecond) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepthAPILimit ¶
type DepthAPILimit int
type DepthStreamLevel ¶
type DepthStreamLevel int
type DepthStreamRate ¶
type Depths ¶
type Depths struct { LastUpdateID int64 Init types.InitFunction // contains filtered or unexported fields }
func New ¶
func New( degree int, symbol string, startDepthStreamCreator func(*Depths) types.StreamFunction, initCreator func(*Depths) types.InitFunction, stops ...chan struct{}) *Depths
DepthBTree - B-дерево для зберігання стакана заявок
func (*Depths) GetAsks ¶
func (d *Depths) GetAsks() *asks_types.Asks
func (*Depths) GetBids ¶
func (d *Depths) GetBids() *bids_types.Bids
func (*Depths) GetNextDownCoefficient ¶
func (d *Depths) GetNextDownCoefficient() items_types.PricePercentType
func (*Depths) GetNextUpCoefficient ¶
func (d *Depths) GetNextUpCoefficient() items_types.PricePercentType
func (*Depths) IsStreamStarted ¶
func (*Depths) MarkStreamAsStarted ¶
func (d *Depths) MarkStreamAsStarted()
func (*Depths) MarkStreamAsStopped ¶
func (d *Depths) MarkStreamAsStopped()
func (*Depths) NextPriceDown ¶
func (d *Depths) NextPriceDown(percent items_types.PricePercentType, price ...items_types.PriceType) (next items_types.PriceType)
func (*Depths) NextPriceUp ¶
func (d *Depths) NextPriceUp(percent items_types.PricePercentType, price ...items_types.PriceType) (next items_types.PriceType)
func (*Depths) ResetEvent ¶
func (*Depths) SetStartDepthStream ¶
func (d *Depths) SetStartDepthStream(startDepthStreamCreator func(*Depths) types.StreamFunction)
func (*Depths) StreamStart ¶
func (*Depths) StreamStop ¶
Click to show internal directories.
Click to hide internal directories.