deribit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 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 Diribit

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

Diribit the deribit broker

func New

func New(accessKey string, secretKey string, testnet bool) *Diribit

func (*Diribit) AmendOrder

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

func (*Diribit) CancelAllOrders

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

func (*Diribit) CancelOrder

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

func (*Diribit) GetAccountSummary

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

func (*Diribit) GetContractID

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

func (*Diribit) GetName

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

func (*Diribit) GetOpenOrders

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

func (*Diribit) GetOrder

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

func (*Diribit) GetOrderBook

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

func (*Diribit) GetPositions added in v1.0.0

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

func (*Diribit) GetRecords

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

func (*Diribit) PlaceOrder

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

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

func (*Diribit) SetContractType

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

func (*Diribit) SetLeverRate

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

func (*Diribit) Subscribe

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

func (*Diribit) WS added in v1.0.0

func (b *Diribit) WS() (ws WebSocket, err error)

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