bitmex

package
v0.0.0-...-2fde92b Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptCurrencyPairToSymbol

func AdaptCurrencyPairToSymbol(pair CurrencyPair, contract string) string

func AdaptWsSymbol

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

func New

func New(config *APIConfig) *bitmex

Types

type BitmexOrder

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

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

type SwapWs

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

func NewSwapWs

func NewSwapWs() *SwapWs

func (*SwapWs) DepthCallback

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

func (*SwapWs) SubscribeDepth

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

func (*SwapWs) SubscribeTicker

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

func (*SwapWs) SubscribeTrade

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

func (*SwapWs) TickerCallback

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

func (*SwapWs) TradeCallback

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