Versions in this module Expand all Collapse all v1 v1.0.23 Feb 17, 2022 v1.0.22 Feb 16, 2022 v1.0.21 Feb 16, 2022 v1.0.20 Feb 16, 2022 v1.0.19 Feb 5, 2022 v1.0.18 Feb 4, 2022 v1.0.17 Feb 4, 2022 v1.0.16 Feb 3, 2022 v1.0.15 Feb 3, 2022 v1.0.14 Feb 3, 2022 v1.0.13 Feb 3, 2022 v1.0.12 Feb 3, 2022 v1.0.11 Feb 3, 2022 Changes in this version + type OrderBookL2Snapshot struct + OrderBook []*OrderBookL2 v1.0.10 Feb 2, 2022 v1.0.9 Feb 2, 2022 v1.0.8 Feb 1, 2022 v1.0.7 Feb 1, 2022 v1.0.6 Jan 31, 2022 v0 v0.1.0 Jan 31, 2022 Changes in this version + const HostReal + const HostTestnet + const MaxTryTimes + const WSDisconnected + const WSExecution + const WSInstrument + const WSInsurance + const WSKLine + const WSOrder + const WSOrderBook25L1 + const WSPosition + const WSTrade + type ByBitWS struct + Ended bool + func New(config *Configuration) *ByBitWS + func (b *ByBitWS) Auth() error + func (b *ByBitWS) CloseAndReconnect() + func (b *ByBitWS) Emit(event interface{}, arguments ...interface{}) *emission.Emitter + func (b *ByBitWS) IsConnected() bool + func (b *ByBitWS) Off(event interface{}, listener interface{}) *emission.Emitter + func (b *ByBitWS) On(event interface{}, listener interface{}) *emission.Emitter + func (b *ByBitWS) Send(msg string) (err error) + func (b *ByBitWS) SendCmd(cmd Cmd) error + func (b *ByBitWS) Start() error + func (b *ByBitWS) Subscribe(arg string) + type Cmd struct + Args []interface{} + Op string + type Configuration struct + Addr string + ApiKey string + AutoReconnect bool + DebugMode bool + SecretKey string + type Execution struct + ExecFee float64 + ExecID string + ExecQty float64 + ExecType string + IsMaker bool + LeavesQty float64 + OrderID string + OrderLinkID string + OrderQty float64 + Price float64 + Side string + Symbol string + TradeTime time.Time + type Instrument struct + IndexPrice float64 + MarkPrice float64 + Symbol string + type Insurance struct + Currency string + Timestamp time.Time + WalletBalance int64 + type Item struct + Amount float64 + Price float64 + type KLine struct + Close float64 + High float64 + ID int64 + Interval string + Low float64 + Open float64 + OpenTime int64 + Symbol string + Turnover float64 + Volume float64 + type Order struct + CancelType string + CreateType string + CumExecFee float64 + CumExecQty float64 + CumExecValue float64 + LastExecPrice float64 + LeavesQty float64 + OrderID string + OrderLinkID string + OrderStatus string + OrderType string + Price float64 + Qty float64 + Side string + StopLoss float64 + Symbol string + TakeProfit float64 + TimeInForce string + Timestamp time.Time + TrailingStop float64 + type OrderBook struct + Asks []Item + Bids []Item + Timestamp time.Time + type OrderBookL2 struct + ID int64 + Price float64 + Side string + Size int64 + Symbol string + func (o *OrderBookL2) Key() string + type OrderBookL2Delta struct + Delete []*OrderBookL2 + Insert []*OrderBookL2 + Update []*OrderBookL2 + type OrderBookLocal struct + func NewOrderBookLocal() *OrderBookLocal + func (o *OrderBookLocal) GetOrderBook() (ob OrderBook) + func (o *OrderBookLocal) LoadSnapshot(newOrderbook []*OrderBookL2) error + func (o *OrderBookLocal) Update(delta *OrderBookL2Delta) + type Position struct + AutoAddMargin int + AvailableBalance float64 + BustPrice float64 + CumRealisedPnl float64 + EntryPrice float64 + Leverage float64 + LiqPrice float64 + OccClosingFee float64 + OccFundingFee float64 + OrderMargin float64 + PositionMargin float64 + PositionSeq int64 + PositionStatus string + PositionValue float64 + RealisedPnl float64 + RiskID int + Side string + Size float64 + StopLoss float64 + Symbol string + TakeProfit float64 + TrailingActive float64 + TrailingStop float64 + UserID int64 + WalletBalance float64 + type Trade struct + CrossSeq int + Price float64 + Side string + Size int + Symbol string + TickDirection string + Timestamp time.Time + TradeID string