Documentation ¶
Index ¶
- Constants
- Variables
- func IsTimeAligned(now int64, duration int64) bool
- func SortDurations(durations []int64) []int64
- func Truncate(f float64, unit float64) float64
- type Bar
- func (s *Bar) Ask() *Candle
- func (s *Bar) Bid() *Candle
- func (s *Bar) Bytes() []byte
- func (s *Bar) Clone() *Bar
- func (s *Bar) Greeks() *Greeks
- func (s *Bar) Liquidations() *Liquidations
- func (s *Bar) MarshalBinary() ([]byte, error)
- func (s *Bar) MarshalBinaryTo(b []byte) []byte
- func (s *Bar) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Bar) Mut() *BarMut
- func (s *Bar) Precision() float64
- func (s *Bar) Price() *Candle
- func (s *Bar) Read(b []byte) (n int, err error)
- func (s *Bar) ReadFrom(r io.Reader) (int64, error)
- func (s *Bar) Spread() *Spread
- func (s *Bar) String() string
- func (s *Bar) Ticks() int64
- func (s *Bar) Time() *Time
- func (s *Bar) Trades() *Trades
- func (s *Bar) UnmarshalBinary(b []byte) error
- func (s *Bar) Volume() *Volume
- func (s *Bar) WriteTo(w io.Writer) (int64, error)
- type BarMut
- func (s *BarMut) Ask() *CandleMut
- func (s *BarMut) Bid() *CandleMut
- func (s *BarMut) Clone() *BarMut
- func (s *BarMut) Freeze() *Bar
- func (s *BarMut) Greeks() *GreeksMut
- func (s *BarMut) Liquidations() *LiquidationsMut
- func (s *BarMut) Price() *CandleMut
- func (s *BarMut) SetAsk(v *Candle) *BarMut
- func (s *BarMut) SetBid(v *Candle) *BarMut
- func (s *BarMut) SetGreeks(v *Greeks) *BarMut
- func (s *BarMut) SetLiquidations(v *Liquidations) *BarMut
- func (s *BarMut) SetPrecision(v float64) *BarMut
- func (s *BarMut) SetPrice(v *Candle) *BarMut
- func (s *BarMut) SetSpread(v *Spread) *BarMut
- func (s *BarMut) SetTicks(v int64) *BarMut
- func (s *BarMut) SetTime(v *Time) *BarMut
- func (s *BarMut) SetTrades(v *Trades) *BarMut
- func (s *BarMut) SetVolume(v *Volume) *BarMut
- func (s *BarMut) Spread() *SpreadMut
- func (s *BarMut) Time() *TimeMut
- func (s *BarMut) Trades() *TradesMut
- func (b *BarMut) Truncate() *BarMut
- func (s *BarMut) Volume() *VolumeMut
- type Candle
- func (s *Candle) Bytes() []byte
- func (s *Candle) Clone() *Candle
- func (s *Candle) Close() float64
- func (s *Candle) High() float64
- func (s *Candle) Low() float64
- func (s *Candle) MarshalBinary() ([]byte, error)
- func (s *Candle) MarshalBinaryTo(b []byte) []byte
- func (s *Candle) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Candle) Mut() *CandleMut
- func (s *Candle) Open() float64
- func (s *Candle) Read(b []byte) (n int, err error)
- func (s *Candle) ReadFrom(r io.Reader) (int64, error)
- func (s *Candle) String() string
- func (s *Candle) UnmarshalBinary(b []byte) error
- func (s *Candle) WriteTo(w io.Writer) (int64, error)
- type CandleMut
- func (c *CandleMut) AddPrice(price float64)
- func (c *CandleMut) Append(o *Candle)
- func (c *CandleMut) Clone() *CandleMut
- func (c *CandleMut) Freeze() *Candle
- func (c *CandleMut) SetClose(v float64) *CandleMut
- func (c *CandleMut) SetHigh(v float64) *CandleMut
- func (c *CandleMut) SetLow(v float64) *CandleMut
- func (c *CandleMut) SetOpen(v float64) *CandleMut
- func (c *CandleMut) Truncate(precision float64)
- type Duration
- type Greeks
- func (s *Greeks) Bytes() []byte
- func (s *Greeks) Clone() *Greeks
- func (s *Greeks) Delta() float64
- func (s *Greeks) Gamma() float64
- func (s *Greeks) Iv() float64
- func (s *Greeks) MarshalBinary() ([]byte, error)
- func (s *Greeks) MarshalBinaryTo(b []byte) []byte
- func (s *Greeks) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Greeks) Mut() *GreeksMut
- func (s *Greeks) Read(b []byte) (n int, err error)
- func (s *Greeks) ReadFrom(r io.Reader) (int64, error)
- func (s *Greeks) Rho() float64
- func (s *Greeks) String() string
- func (s *Greeks) Theta() float64
- func (s *Greeks) UnmarshalBinary(b []byte) error
- func (s *Greeks) Vega() float64
- func (s *Greeks) WriteTo(w io.Writer) (int64, error)
- type GreeksMut
- func (s *GreeksMut) Clone() *GreeksMut
- func (s *GreeksMut) Freeze() *Greeks
- func (s *GreeksMut) SetDelta(v float64) *GreeksMut
- func (s *GreeksMut) SetGamma(v float64) *GreeksMut
- func (s *GreeksMut) SetIv(v float64) *GreeksMut
- func (s *GreeksMut) SetRho(v float64) *GreeksMut
- func (s *GreeksMut) SetTheta(v float64) *GreeksMut
- func (s *GreeksMut) SetVega(v float64) *GreeksMut
- type Liquidations
- func (s *Liquidations) Avg() float64
- func (s *Liquidations) Buys() float64
- func (s *Liquidations) Bytes() []byte
- func (s *Liquidations) Clone() *Liquidations
- func (s *Liquidations) MarshalBinary() ([]byte, error)
- func (s *Liquidations) MarshalBinaryTo(b []byte) []byte
- func (s *Liquidations) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Liquidations) Max() float64
- func (s *Liquidations) Min() float64
- func (s *Liquidations) Mut() *LiquidationsMut
- func (s *Liquidations) Read(b []byte) (n int, err error)
- func (s *Liquidations) ReadFrom(r io.Reader) (int64, error)
- func (s *Liquidations) Sells() float64
- func (s *Liquidations) String() string
- func (s *Liquidations) Trades() int64
- func (s *Liquidations) UnmarshalBinary(b []byte) error
- func (s *Liquidations) Value() float64
- func (s *Liquidations) WriteTo(w io.Writer) (int64, error)
- type LiquidationsMut
- func (s *LiquidationsMut) Clone() *LiquidationsMut
- func (s *LiquidationsMut) Freeze() *Liquidations
- func (s *LiquidationsMut) SetAvg(v float64) *LiquidationsMut
- func (s *LiquidationsMut) SetBuys(v float64) *LiquidationsMut
- func (s *LiquidationsMut) SetMax(v float64) *LiquidationsMut
- func (s *LiquidationsMut) SetMin(v float64) *LiquidationsMut
- func (s *LiquidationsMut) SetSells(v float64) *LiquidationsMut
- func (s *LiquidationsMut) SetTrades(v int64) *LiquidationsMut
- func (s *LiquidationsMut) SetValue(v float64) *LiquidationsMut
- type Spread
- func (s *Spread) Bytes() []byte
- func (s *Spread) Clone() *Spread
- func (s *Spread) High() float64
- func (s *Spread) Low() float64
- func (s *Spread) MarshalBinary() ([]byte, error)
- func (s *Spread) MarshalBinaryTo(b []byte) []byte
- func (s *Spread) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Spread) Mid() float64
- func (s *Spread) Mut() *SpreadMut
- func (s *Spread) Read(b []byte) (n int, err error)
- func (s *Spread) ReadFrom(r io.Reader) (int64, error)
- func (s *Spread) String() string
- func (s *Spread) UnmarshalBinary(b []byte) error
- func (s *Spread) WriteTo(w io.Writer) (int64, error)
- type SpreadMut
- func (s *SpreadMut) Add(v float64) *SpreadMut
- func (s *SpreadMut) Append(v *Spread) *SpreadMut
- func (s *SpreadMut) Clone() *SpreadMut
- func (s *SpreadMut) Freeze() *Spread
- func (s *SpreadMut) SetHigh(v float64) *SpreadMut
- func (s *SpreadMut) SetLow(v float64) *SpreadMut
- func (s *SpreadMut) SetMid(v float64) *SpreadMut
- func (s *SpreadMut) Truncate(precision float64) *SpreadMut
- type Time
- func (s *Time) Bytes() []byte
- func (s *Time) Clone() *Time
- func (s *Time) Duration() int64
- func (s *Time) End() int64
- func (s *Time) MarshalBinary() ([]byte, error)
- func (s *Time) MarshalBinaryTo(b []byte) []byte
- func (s *Time) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Time) Mut() *TimeMut
- func (s *Time) Read(b []byte) (n int, err error)
- func (s *Time) ReadFrom(r io.Reader) (int64, error)
- func (s *Time) Start() int64
- func (s *Time) String() string
- func (s *Time) UnmarshalBinary(b []byte) error
- func (s *Time) WriteTo(w io.Writer) (int64, error)
- type TimeMut
- type Trades
- func (s *Trades) Bytes() []byte
- func (s *Trades) Clone() *Trades
- func (s *Trades) Count() int64
- func (s *Trades) MarshalBinary() ([]byte, error)
- func (s *Trades) MarshalBinaryTo(b []byte) []byte
- func (s *Trades) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Trades) Max() int64
- func (s *Trades) Min() int64
- func (s *Trades) Mut() *TradesMut
- func (s *Trades) Read(b []byte) (n int, err error)
- func (s *Trades) ReadFrom(r io.Reader) (int64, error)
- func (s *Trades) String() string
- func (s *Trades) UnmarshalBinary(b []byte) error
- func (s *Trades) WriteTo(w io.Writer) (int64, error)
- type TradesMut
- type Volume
- func (s *Volume) Buy() *VolumeSide
- func (s *Volume) Bytes() []byte
- func (s *Volume) Clone() *Volume
- func (s *Volume) MarshalBinary() ([]byte, error)
- func (s *Volume) MarshalBinaryTo(b []byte) []byte
- func (s *Volume) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *Volume) Mut() *VolumeMut
- func (s *Volume) Read(b []byte) (n int, err error)
- func (s *Volume) ReadFrom(r io.Reader) (int64, error)
- func (s *Volume) Sell() *VolumeSide
- func (s *Volume) String() string
- func (s *Volume) Total() float64
- func (s *Volume) UnmarshalBinary(b []byte) error
- func (s *Volume) WriteTo(w io.Writer) (int64, error)
- type VolumeMut
- func (s *VolumeMut) Buy() *VolumeSideMut
- func (s *VolumeMut) Clone() *VolumeMut
- func (v *VolumeMut) Finish()
- func (s *VolumeMut) Freeze() *Volume
- func (s *VolumeMut) Sell() *VolumeSideMut
- func (s *VolumeMut) SetBuy(v *VolumeSide) *VolumeMut
- func (s *VolumeMut) SetSell(v *VolumeSide) *VolumeMut
- func (s *VolumeMut) SetTotal(v float64) *VolumeMut
- type VolumeSide
- func (s *VolumeSide) Bytes() []byte
- func (s *VolumeSide) Clone() *VolumeSide
- func (s *VolumeSide) Interest() float64
- func (s *VolumeSide) MarshalBinary() ([]byte, error)
- func (s *VolumeSide) MarshalBinaryTo(b []byte) []byte
- func (s *VolumeSide) MarshalMap(m map[string]interface{}) map[string]interface{}
- func (s *VolumeSide) Mut() *VolumeSideMut
- func (s *VolumeSide) Percent() float64
- func (s *VolumeSide) Read(b []byte) (n int, err error)
- func (s *VolumeSide) ReadFrom(r io.Reader) (int64, error)
- func (s *VolumeSide) String() string
- func (s *VolumeSide) Total() float64
- func (s *VolumeSide) UnmarshalBinary(b []byte) error
- func (s *VolumeSide) WriteTo(w io.Writer) (int64, error)
- type VolumeSideMut
Constants ¶
Variables ¶
Functions ¶
func IsTimeAligned ¶
func SortDurations ¶
Types ¶
type Bar ¶
type Bar struct {
// contains filtered or unexported fields
}
func (*Bar) Liquidations ¶
func (s *Bar) Liquidations() *Liquidations
func (*Bar) MarshalBinary ¶
func (*Bar) MarshalBinaryTo ¶
func (*Bar) MarshalMap ¶
func (*Bar) UnmarshalBinary ¶
type BarMut ¶
type BarMut struct {
Bar
}
func (*BarMut) Liquidations ¶
func (s *BarMut) Liquidations() *LiquidationsMut
func (*BarMut) SetLiquidations ¶
func (s *BarMut) SetLiquidations(v *Liquidations) *BarMut
func (*BarMut) SetPrecision ¶
type Candle ¶
type Candle struct {
// contains filtered or unexported fields
}
Candlestick
func (*Candle) MarshalBinary ¶
func (*Candle) MarshalBinaryTo ¶
func (*Candle) MarshalMap ¶
func (*Candle) UnmarshalBinary ¶
type Greeks ¶
type Greeks struct {
// contains filtered or unexported fields
}
Greeks are financial measures of the sensitivity of an option’s price to its underlying determining parameters, such as volatility or the price of the underlying asset. The Greeks are utilized in the analysis of an options portfolio and in sensitivity analysis of an option or portfolio of options. The measures are considered essential by many investors for making informed decisions in options trading.
Delta, Gamma, Vega, Theta, and Rho are the key option Greeks. However, there are many other option Greeks that can be derived from those mentioned above.
func (*Greeks) MarshalBinary ¶
func (*Greeks) MarshalBinaryTo ¶
func (*Greeks) MarshalMap ¶
func (*Greeks) UnmarshalBinary ¶
type GreeksMut ¶
type GreeksMut struct {
Greeks
}
Greeks are financial measures of the sensitivity of an option’s price to its underlying determining parameters, such as volatility or the price of the underlying asset. The Greeks are utilized in the analysis of an options portfolio and in sensitivity analysis of an option or portfolio of options. The measures are considered essential by many investors for making informed decisions in options trading.
Delta, Gamma, Vega, Theta, and Rho are the key option Greeks. However, there are many other option Greeks that can be derived from those mentioned above.
type Liquidations ¶
type Liquidations struct {
// contains filtered or unexported fields
}
func (*Liquidations) Avg ¶
func (s *Liquidations) Avg() float64
func (*Liquidations) Buys ¶
func (s *Liquidations) Buys() float64
func (*Liquidations) Bytes ¶
func (s *Liquidations) Bytes() []byte
func (*Liquidations) Clone ¶
func (s *Liquidations) Clone() *Liquidations
func (*Liquidations) MarshalBinary ¶
func (s *Liquidations) MarshalBinary() ([]byte, error)
func (*Liquidations) MarshalBinaryTo ¶
func (s *Liquidations) MarshalBinaryTo(b []byte) []byte
func (*Liquidations) MarshalMap ¶
func (s *Liquidations) MarshalMap(m map[string]interface{}) map[string]interface{}
func (*Liquidations) Max ¶
func (s *Liquidations) Max() float64
func (*Liquidations) Min ¶
func (s *Liquidations) Min() float64
func (*Liquidations) Mut ¶
func (s *Liquidations) Mut() *LiquidationsMut
func (*Liquidations) Sells ¶
func (s *Liquidations) Sells() float64
func (*Liquidations) String ¶
func (s *Liquidations) String() string
func (*Liquidations) Trades ¶
func (s *Liquidations) Trades() int64
func (*Liquidations) UnmarshalBinary ¶
func (s *Liquidations) UnmarshalBinary(b []byte) error
func (*Liquidations) Value ¶
func (s *Liquidations) Value() float64
type LiquidationsMut ¶
type LiquidationsMut struct {
Liquidations
}
func (*LiquidationsMut) Clone ¶
func (s *LiquidationsMut) Clone() *LiquidationsMut
func (*LiquidationsMut) Freeze ¶
func (s *LiquidationsMut) Freeze() *Liquidations
func (*LiquidationsMut) SetAvg ¶
func (s *LiquidationsMut) SetAvg(v float64) *LiquidationsMut
func (*LiquidationsMut) SetBuys ¶
func (s *LiquidationsMut) SetBuys(v float64) *LiquidationsMut
func (*LiquidationsMut) SetMax ¶
func (s *LiquidationsMut) SetMax(v float64) *LiquidationsMut
func (*LiquidationsMut) SetMin ¶
func (s *LiquidationsMut) SetMin(v float64) *LiquidationsMut
func (*LiquidationsMut) SetSells ¶
func (s *LiquidationsMut) SetSells(v float64) *LiquidationsMut
func (*LiquidationsMut) SetTrades ¶
func (s *LiquidationsMut) SetTrades(v int64) *LiquidationsMut
func (*LiquidationsMut) SetValue ¶
func (s *LiquidationsMut) SetValue(v float64) *LiquidationsMut
type Spread ¶
type Spread struct {
// contains filtered or unexported fields
}
func (*Spread) MarshalBinary ¶
func (*Spread) MarshalBinaryTo ¶
func (*Spread) MarshalMap ¶
func (*Spread) UnmarshalBinary ¶
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
func (*Time) MarshalBinary ¶
func (*Time) MarshalBinaryTo ¶
func (*Time) MarshalMap ¶
func (*Time) UnmarshalBinary ¶
type Trades ¶
type Trades struct {
// contains filtered or unexported fields
}
func (*Trades) MarshalBinary ¶
func (*Trades) MarshalBinaryTo ¶
func (*Trades) MarshalMap ¶
func (*Trades) UnmarshalBinary ¶
type Volume ¶
type Volume struct {
// contains filtered or unexported fields
}
func (*Volume) Buy ¶
func (s *Volume) Buy() *VolumeSide
func (*Volume) MarshalBinary ¶
func (*Volume) MarshalBinaryTo ¶
func (*Volume) MarshalMap ¶
func (*Volume) Sell ¶
func (s *Volume) Sell() *VolumeSide
func (*Volume) UnmarshalBinary ¶
type VolumeMut ¶
type VolumeMut struct {
Volume
}
func (*VolumeMut) Buy ¶
func (s *VolumeMut) Buy() *VolumeSideMut
func (*VolumeMut) Sell ¶
func (s *VolumeMut) Sell() *VolumeSideMut
func (*VolumeMut) SetBuy ¶
func (s *VolumeMut) SetBuy(v *VolumeSide) *VolumeMut
func (*VolumeMut) SetSell ¶
func (s *VolumeMut) SetSell(v *VolumeSide) *VolumeMut
type VolumeSide ¶
type VolumeSide struct {
// contains filtered or unexported fields
}
func (*VolumeSide) Bytes ¶
func (s *VolumeSide) Bytes() []byte
func (*VolumeSide) Clone ¶
func (s *VolumeSide) Clone() *VolumeSide
func (*VolumeSide) Interest ¶
func (s *VolumeSide) Interest() float64
func (*VolumeSide) MarshalBinary ¶
func (s *VolumeSide) MarshalBinary() ([]byte, error)
func (*VolumeSide) MarshalBinaryTo ¶
func (s *VolumeSide) MarshalBinaryTo(b []byte) []byte
func (*VolumeSide) MarshalMap ¶
func (s *VolumeSide) MarshalMap(m map[string]interface{}) map[string]interface{}
func (*VolumeSide) Mut ¶
func (s *VolumeSide) Mut() *VolumeSideMut
func (*VolumeSide) Percent ¶
func (s *VolumeSide) Percent() float64
func (*VolumeSide) String ¶
func (s *VolumeSide) String() string
func (*VolumeSide) Total ¶
func (s *VolumeSide) Total() float64
func (*VolumeSide) UnmarshalBinary ¶
func (s *VolumeSide) UnmarshalBinary(b []byte) error
type VolumeSideMut ¶
type VolumeSideMut struct {
VolumeSide
}
func (*VolumeSideMut) Clone ¶
func (s *VolumeSideMut) Clone() *VolumeSideMut
func (*VolumeSideMut) Freeze ¶
func (s *VolumeSideMut) Freeze() *VolumeSide
func (*VolumeSideMut) SetInterest ¶
func (s *VolumeSideMut) SetInterest(v float64) *VolumeSideMut
func (*VolumeSideMut) SetPercent ¶
func (s *VolumeSideMut) SetPercent(v float64) *VolumeSideMut
func (*VolumeSideMut) SetTotal ¶
func (s *VolumeSideMut) SetTotal(v float64) *VolumeSideMut