bybit_broker

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 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 BybitBroker

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

BybitBroker the Bybit broker

func NewBroker

func NewBroker(addr string, accessKey string, secretKey string) *BybitBroker

func (*BybitBroker) AmendOrder

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

func (*BybitBroker) CancelAllOrders

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

func (*BybitBroker) CancelOrder

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

func (*BybitBroker) GetAccountSummary

func (b *BybitBroker) GetAccountSummary(currency string) (result AccountSummary, err error)

func (*BybitBroker) GetContractID added in v0.9.4

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

func (*BybitBroker) GetName added in v0.9.7

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

func (*BybitBroker) GetOpenOrders

func (b *BybitBroker) GetOpenOrders(symbol string) (result []Order, err error)

func (*BybitBroker) GetOrder

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

func (*BybitBroker) GetOrderBook

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

func (*BybitBroker) GetPosition

func (b *BybitBroker) GetPosition(symbol string) (result Position, err error)

func (*BybitBroker) GetRecords added in v0.9.8

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

func (*BybitBroker) PlaceOrder

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

func (b *BybitBroker) RunEventLoopOnce() (err error)

func (*BybitBroker) SetContractType

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

func (*BybitBroker) SetLeverRate

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

Jump to

Keyboard shortcuts

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