deribit_broker

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 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 DiribitBroker

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

DiribitBroker the deribit broker

func NewBroker

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

func (*DiribitBroker) AmendOrder

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

func (*DiribitBroker) CancelAllOrders

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

func (*DiribitBroker) CancelOrder

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

func (*DiribitBroker) GetAccountSummary

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

func (*DiribitBroker) GetContractID added in v0.9.4

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

func (*DiribitBroker) GetName added in v0.9.7

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

func (*DiribitBroker) GetOpenOrders

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

func (*DiribitBroker) GetOrder

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

func (*DiribitBroker) GetOrderBook

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

func (*DiribitBroker) GetPosition

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

func (*DiribitBroker) PlaceOrder

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

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

func (*DiribitBroker) SetContractType

func (b *DiribitBroker) SetContractType(pair string, contractType string) (err error)

func (*DiribitBroker) SetLeverRate

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

func (*DiribitBroker) Subscribe

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

type OrderBookLocal

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

func NewOrderBookLocal

func NewOrderBookLocal(symbol string) *OrderBookLocal

func (*OrderBookLocal) GetOrderbook

func (o *OrderBookLocal) GetOrderbook() (ob OrderBook)

func (*OrderBookLocal) Key

func (o *OrderBookLocal) Key(price float64) string

func (*OrderBookLocal) Update

func (o *OrderBookLocal) Update(newOrderBook *models.OrderBookNotification)

type OrderBookManager

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

func NewOrderBookManager

func NewOrderBookManager() *OrderBookManager

func (*OrderBookManager) GetOrderBook

func (m *OrderBookManager) GetOrderBook(instrumentName string) (ob OrderBook, ok bool)

func (*OrderBookManager) Update

func (m *OrderBookManager) Update(newOrderBook *models.OrderBookNotification)

Jump to

Keyboard shortcuts

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