bitmex_broker

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitMEXBroker

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

BitMEXBroker the BitMEX broker

func NewBroker

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

func (*BitMEXBroker) AmendOrder

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

func (*BitMEXBroker) CancelAllOrders

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

func (*BitMEXBroker) CancelOrder

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

func (*BitMEXBroker) GetAccountSummary

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

func (*BitMEXBroker) GetContractID added in v0.9.4

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

func (*BitMEXBroker) GetName added in v0.9.7

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

func (*BitMEXBroker) GetOpenOrders

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

func (*BitMEXBroker) GetOrder

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

func (*BitMEXBroker) GetOrderBook

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

func (*BitMEXBroker) GetPosition

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

func (*BitMEXBroker) GetRecords added in v0.9.8

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

func (*BitMEXBroker) PlaceOrder

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

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

func (*BitMEXBroker) SetContractType

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

func (*BitMEXBroker) SetLeverRate

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

func (*BitMEXBroker) Subscribe

func (b *BitMEXBroker) Subscribe(event string, param string, listener interface{})

Jump to

Keyboard shortcuts

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