Versions in this module Expand all Collapse all v1 v1.2.17 Jul 15, 2021 Changes in this version + const StatusOK + type DepthOrderBook struct + func NewDepthOrderBook(symbol string) *DepthOrderBook + func (d *DepthOrderBook) GetOrderBook(depth int) (result OrderBook) + func (d *DepthOrderBook) GetSymbol() string + func (d *DepthOrderBook) Update(data *hbdmswap.WSDepthHF) + type DobItem struct + Amount float64 + Price float64 + func (e DobItem) ExtractKey() float64 + func (e DobItem) String() string + type HbdmSwap struct + func NewHbdmSwap(params *Parameters) *HbdmSwap + func (b *HbdmSwap) AmendOrder(symbol string, id string, price float64, size float64, opts ...OrderOption) (result *Order, err error) + func (b *HbdmSwap) CancelAllOrders(symbol string, opts ...OrderOption) (err error) + func (b *HbdmSwap) CancelOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error) + func (b *HbdmSwap) CloseLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error) + func (b *HbdmSwap) CloseShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error) + func (b *HbdmSwap) GetBalance(currency string) (result *Balance, err error) + func (b *HbdmSwap) GetContractID() (symbol string, err error) + func (b *HbdmSwap) GetName() (name string) + func (b *HbdmSwap) GetOpenOrders(symbol string, opts ...OrderOption) (result []*Order, err error) + func (b *HbdmSwap) GetOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error) + func (b *HbdmSwap) GetOrderBook(symbol string, depth int) (result *OrderBook, err error) + func (b *HbdmSwap) GetPositions(symbol string) (result []*Position, err error) + func (b *HbdmSwap) GetRecords(symbol string, period string, from int64, end int64, limit int) (records []*Record, err error) + func (b *HbdmSwap) GetTime() (tm int64, err error) + func (b *HbdmSwap) IO(name string, params string) (string, error) + func (b *HbdmSwap) OpenLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error) + func (b *HbdmSwap) OpenShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error) + func (b *HbdmSwap) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64, ...) (result *Order, err error) + func (b *HbdmSwap) SetContractType(pair string, contractType string) (err error) + func (b *HbdmSwap) SetLeverRate(value float64) (err error) + func (b *HbdmSwap) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error + func (b *HbdmSwap) SubscribeOrders(market Market, callback func(orders []*Order)) error + func (b *HbdmSwap) SubscribePositions(market Market, callback func(positions []*Position)) error + func (b *HbdmSwap) SubscribeTrades(market Market, callback func(trades []*Trade)) error + type SwapWebSocket struct + func NewSwapWebSocket(params *Parameters) *SwapWebSocket + func (s *SwapWebSocket) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error + func (s *SwapWebSocket) SubscribeOrders(market Market, callback func(orders []*Order)) error + func (s *SwapWebSocket) SubscribePositions(market Market, callback func(positions []*Position)) error + func (s *SwapWebSocket) SubscribeTrades(market Market, callback func(trades []*Trade)) error