deribit

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 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 added in v1.1.5

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

func NewDepthOrderBook added in v1.1.5

func NewDepthOrderBook(symbol string) *DepthOrderBook

func (*DepthOrderBook) GetOrderBook added in v1.1.5

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

func (*DepthOrderBook) GetSymbol added in v1.1.5

func (d *DepthOrderBook) GetSymbol() string

func (*DepthOrderBook) Update added in v1.1.5

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 added in v1.1.3

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

func (*Deribit) CloseShort added in v1.1.3

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 added in v1.1.6

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

func (*Deribit) IO added in v1.2.12

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

func (*Deribit) OpenLong added in v1.1.3

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

func (*Deribit) OpenShort added in v1.1.3

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 added in v1.1.5

type DobItem struct {
	Price  float64
	Amount float64
}

func (DobItem) ExtractKey added in v1.1.5

func (e DobItem) ExtractKey() float64

func (DobItem) String added in v1.1.5

func (e DobItem) String() string

Jump to

Keyboard shortcuts

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