bitmex

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitMEX

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

BitMEX the BitMEX exchange

func NewBitMEX

func NewBitMEX(params *Parameters) *BitMEX

func (*BitMEX) AmendOrder

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

func (*BitMEX) CancelAllOrders

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

func (*BitMEX) CancelOrder

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

func (*BitMEX) CloseLong added in v1.1.3

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

func (*BitMEX) CloseShort added in v1.1.3

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

func (*BitMEX) GetBalance

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

func (*BitMEX) GetContractID

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

func (*BitMEX) GetName

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

func (*BitMEX) GetOpenOrders

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

func (*BitMEX) GetOrder

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

func (*BitMEX) GetOrderBook

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

func (*BitMEX) GetPositions

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

func (*BitMEX) GetRecords

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

func (*BitMEX) GetTime added in v1.1.6

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

func (*BitMEX) OpenLong added in v1.1.3

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

func (*BitMEX) OpenShort added in v1.1.3

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

func (*BitMEX) PlaceOrder

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

func (*BitMEX) SetContractType

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

func (*BitMEX) SetLeverRate

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

func (*BitMEX) SubscribeLevel2Snapshots

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

func (*BitMEX) SubscribeOrders

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

func (*BitMEX) SubscribePositions

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

func (*BitMEX) SubscribeTrades

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

Jump to

Keyboard shortcuts

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