deribit

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepthOrderBook

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

func NewDepthOrderBook

func NewDepthOrderBook(symbol string) *DepthOrderBook

func (*DepthOrderBook) GetOrderBook

func (d *DepthOrderBook) GetOrderBook(depth int) (result OrderBook)

func (*DepthOrderBook) GetSymbol

func (d *DepthOrderBook) GetSymbol() string

func (*DepthOrderBook) Update

type Deribit

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

Deribit the deribit exchange

func NewDeribit

func NewDeribit(params *Parameters) *Deribit

func (*Deribit) AmendOrder

func (b *Deribit) AmendOrder(symbol string, id string, price float64, size float64, opts ...OrderOption) (result *Order, err error)

func (*Deribit) CancelAllOrders

func (b *Deribit) CancelAllOrders(symbol string, opts ...OrderOption) (err error)

func (*Deribit) CancelOrder

func (b *Deribit) CancelOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error)

func (*Deribit) CloseLong

func (b *Deribit) CloseLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Deribit) CloseShort

func (b *Deribit) CloseShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Deribit) GetBalance

func (b *Deribit) GetBalance(currency string) (result *Balance, err error)

func (*Deribit) GetContractID

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

func (*Deribit) GetName

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

func (*Deribit) GetOpenOrders

func (b *Deribit) GetOpenOrders(symbol string, opts ...OrderOption) (result []*Order, err error)

func (*Deribit) GetOrder

func (b *Deribit) GetOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error)

func (*Deribit) GetOrderBook

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

func (*Deribit) GetPositions

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

func (*Deribit) GetRecords

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

func (*Deribit) GetTime

func (b *Deribit) GetTime() (tm int64, err error)

func (*Deribit) IO

func (b *Deribit) IO(name string, params string) (string, error)

func (*Deribit) OpenLong

func (b *Deribit) OpenLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Deribit) OpenShort

func (b *Deribit) OpenShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)

func (*Deribit) PlaceOrder

func (b *Deribit) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64,
	size float64, opts ...PlaceOrderOption) (result *Order, err error)

func (*Deribit) SetContractType

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

func (*Deribit) SetLeverRate

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

func (*Deribit) SubscribeLevel2Snapshots

func (b *Deribit) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error

func (*Deribit) SubscribeOrders

func (b *Deribit) SubscribeOrders(market Market, callback func(orders []*Order)) error

func (*Deribit) SubscribePositions

func (b *Deribit) SubscribePositions(market Market, callback func(positions []*Position)) error

func (*Deribit) SubscribeTrades

func (b *Deribit) SubscribeTrades(market Market, callback func(trades []*Trade)) error

type DobItem

type DobItem struct {
	Price  float64
	Amount float64
}

func (DobItem) ExtractKey

func (e DobItem) ExtractKey() float64

func (DobItem) String

func (e DobItem) String() string

Jump to

Keyboard shortcuts

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