bybit

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 6 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 broker

func New

func New(addr string, accessKey string, secretKey string) *Bybit

func (*Bybit) AmendOrder

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

func (*Bybit) CancelAllOrders

func (b *Bybit) CancelAllOrders(symbol string) (err error)

func (*Bybit) CancelOrder

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

func (*Bybit) GetAccountSummary

func (b *Bybit) GetAccountSummary(currency string) (result AccountSummary, 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) (result []Order, err error)

func (*Bybit) GetOrder

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

func (*Bybit) GetOrderBook

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

func (*Bybit) GetPosition

func (b *Bybit) GetPosition(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) PlaceOrder

func (b *Bybit) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64,
	stopPx float64, size float64, postOnly bool, reduceOnly bool, params map[string]interface{}) (result Order, err error)

func (*Bybit) RunEventLoopOnce

func (b *Bybit) RunEventLoopOnce() (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)

Jump to

Keyboard shortcuts

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