bitmex

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptCurrencyPairToSymbol added in v1.3.3

func AdaptCurrencyPairToSymbol(pair CurrencyPair, contract string) string

func AdaptWsSymbol added in v1.3.3

func AdaptWsSymbol(symbol string) (pair CurrencyPair, contract string)

func New

func New(config *APIConfig) *bitmex

Types

type BitmexOrder added in v1.0.2

type BitmexOrder struct {
	Symbol      string    `json:"symbol"`
	OrderID     string    `json:"OrderID"`
	ClOrdID     string    `json:"clOrdID"`
	Price       float64   `json:"price,omitempty"`
	OrderQty    int       `json:"orderQty"`
	CumQty      int       `json:"cumQty"`
	AvgPx       float64   `json:"avgPx"`
	OrdType     string    `json:"ordType"`
	Text        string    `json:"text"`
	TimeInForce string    `json:"timeInForce,omitempty"`
	Side        string    `json:"side"`
	OrdStatus   string    `json:"ordStatus"`
	Timestamp   time.Time `json:"timestamp"`
}

type SubscribeOp added in v1.3.3

type SubscribeOp struct {
	Op   string   `json:"op"`
	Args []string `json:"args"`
}

type SwapWs added in v1.3.3

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

func NewSwapWs added in v1.3.3

func NewSwapWs() *SwapWs

func (*SwapWs) DepthCallback added in v1.3.3

func (s *SwapWs) DepthCallback(f func(depth *Depth))

func (*SwapWs) SubscribeDepth added in v1.3.3

func (s *SwapWs) SubscribeDepth(pair CurrencyPair, contractType string) error

func (*SwapWs) SubscribeTicker added in v1.3.3

func (s *SwapWs) SubscribeTicker(pair CurrencyPair, contractType string) error

func (*SwapWs) SubscribeTrade added in v1.3.3

func (s *SwapWs) SubscribeTrade(pair CurrencyPair, contractType string) error

func (*SwapWs) TickerCallback added in v1.3.3

func (s *SwapWs) TickerCallback(f func(ticker *FutureTicker))

func (*SwapWs) TradeCallback added in v1.3.3

func (s *SwapWs) TradeCallback(f func(trade *Trade, contract string))

Jump to

Keyboard shortcuts

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