bybit

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bybit

type Bybit struct {
	// contains filtered or unexported fields
}

Bybit the Bybit exchange

func NewBybit

func NewBybit(params *Parameters) *Bybit

func (*Bybit) AmendOrder

func (b *Bybit) AmendOrder(symbol string, id string, price float64, size float64, opts ...OrderOption) (result *Order, err error)

func (*Bybit) CancelAllOrders

func (b *Bybit) CancelAllOrders(symbol string, opts ...OrderOption) (err error)

func (*Bybit) CancelOrder

func (b *Bybit) CancelOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error)

func (*Bybit) CloseLong

func (b *Bybit) CloseLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Bybit) CloseShort

func (b *Bybit) CloseShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Bybit) GetBalance

func (b *Bybit) GetBalance(currency string) (result *Balance, err error)

func (*Bybit) GetContractID

func (b *Bybit) GetContractID() (symbol string, err error)

func (*Bybit) GetName

func (b *Bybit) GetName() (name string)

func (*Bybit) GetOpenOrders

func (b *Bybit) GetOpenOrders(symbol string, opts ...OrderOption) (result []*Order, err error)

func (*Bybit) GetOrder

func (b *Bybit) GetOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error)

func (*Bybit) GetOrderBook

func (b *Bybit) GetOrderBook(symbol string, depth int) (result *OrderBook, err error)

func (*Bybit) GetPositions

func (b *Bybit) GetPositions(symbol string) (result []*Position, err error)

func (*Bybit) GetRecords

func (b *Bybit) GetRecords(symbol string, period string, from int64, end int64, limit int) (records []*Record, err error)

func (*Bybit) GetTime

func (b *Bybit) GetTime() (tm int64, err error)

func (*Bybit) IO

func (b *Bybit) IO(name string, params string) (string, error)

func (*Bybit) OpenLong

func (b *Bybit) OpenLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Bybit) OpenShort

func (b *Bybit) OpenShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Bybit) PlaceOrder

func (b *Bybit) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64,
	size float64, opts ...PlaceOrderOption) (result *Order, err error)

func (*Bybit) SetContractType

func (b *Bybit) SetContractType(currencyPair string, contractType string) (err error)

func (*Bybit) SetLeverRate

func (b *Bybit) SetLeverRate(value float64) (err error)

func (*Bybit) SubscribeLevel2Snapshots

func (b *Bybit) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error

func (*Bybit) SubscribeOrders

func (b *Bybit) SubscribeOrders(market Market, callback func(orders []*Order)) error

func (*Bybit) SubscribePositions

func (b *Bybit) SubscribePositions(market Market, callback func(positions []*Position)) error

func (*Bybit) SubscribeTrades

func (b *Bybit) SubscribeTrades(market Market, callback func(trades []*Trade)) error

type BybitWebSocket

type BybitWebSocket struct {
	// contains filtered or unexported fields
}

func NewBybitWebSocket

func NewBybitWebSocket(params *Parameters) *BybitWebSocket

func (*BybitWebSocket) SubscribeLevel2Snapshots

func (s *BybitWebSocket) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error

func (*BybitWebSocket) SubscribeOrders

func (s *BybitWebSocket) SubscribeOrders(market Market, callback func(orders []*Order)) error

func (*BybitWebSocket) SubscribePositions

func (s *BybitWebSocket) SubscribePositions(market Market, callback func(positions []*Position)) error

func (*BybitWebSocket) SubscribeTrades

func (s *BybitWebSocket) SubscribeTrades(market Market, callback func(trades []*Trade)) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL