Documentation
¶
Index ¶
- func AdaptCurrencyPairToSymbol(pair CurrencyPair, contract string) string
- func AdaptWsSymbol(symbol string) (pair CurrencyPair, contract string)
- func Sym2duo(pair string) q.D
- type Bitmex
- func (bm *Bitmex) AllTicker(SymPair map[string]q.D) (mdt *sync.Map, err error)
- func (bm *Bitmex) Balances() (availables, frozens *sync.Map, err error)
- func (bm *Bitmex) Fee() float64
- func (bm *Bitmex) FeeMap() (map[string]q.TradeFee, error)
- func (bm *Bitmex) FutureCancelOrder(currencyPair CurrencyPair, contractType, orderId string) (bool, error)
- func (bm *Bitmex) GetAttr() (a q.Attr)
- func (bm *Bitmex) GetContractValue(currencyPair CurrencyPair) (float64, error)
- func (bm *Bitmex) GetDeliveryTime() (int, int, int, int)
- func (bm *Bitmex) GetFee() (float64, error)
- func (bm *Bitmex) GetFutureDepth(currencyPair CurrencyPair, contractType string, size int) (*Depth, error)
- func (bm *Bitmex) GetFutureEstimatedPrice(currencyPair CurrencyPair) (float64, error)
- func (bm *Bitmex) GetFutureIndex(currencyPair CurrencyPair) (float64, error)
- func (bm *Bitmex) GetFutureOrder(orderId string, currencyPair CurrencyPair, contractType string) (*FutureOrder, error)
- func (bm *Bitmex) GetFutureOrderHistory(pair CurrencyPair, contractType string, optional ...OptionalParameter) ([]FutureOrder, error)
- func (bm *Bitmex) GetFutureOrders(orderIds []string, currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
- func (bm *Bitmex) GetFuturePosition(currencyPair CurrencyPair, contractType string) ([]FuturePosition, error)
- func (bm *Bitmex) GetFutureTicker(currencyPair CurrencyPair, contractType string) (*Ticker, error)
- func (bm *Bitmex) GetFutureUserinfo(currencyPair ...CurrencyPair) (*FutureAccount, error)
- func (bm *Bitmex) GetIndicativeFundingRate(symbol string) (float64, *time.Time, error)
- func (bm *Bitmex) GetKlineRecords(contract_type string, currency CurrencyPair, period KlinePeriod, size int, ...) ([]FutureKline, error)
- func (bm *Bitmex) GetTrades(contract_type string, currency CurrencyPair, since int64) ([]Trade, error)
- func (bm *Bitmex) GetUnfinishFutureOrders(currencyPair CurrencyPair, contractType string) ([]FutureOrder, error)
- func (bm *Bitmex) LimitFuturesOrder(currencyPair CurrencyPair, contractType, price, amount string, openType int, ...) (*FutureOrder, error)
- func (bm *Bitmex) MarketFuturesOrder(currencyPair CurrencyPair, contractType, amount string, openType int) (*FutureOrder, error)
- func (bm *Bitmex) OneTicker(d q.D) (ticker q.Bbo, err error)
- func (bm *Bitmex) PairArray() (map[string]q.D, map[q.D]q.P, error)
- func (bm *Bitmex) PlaceFutureOrder(currencyPair CurrencyPair, contractType, price, amount string, ...) (string, error)
- func (bm *Bitmex) PlaceFutureOrder2(currencyPair CurrencyPair, contractType, price, amount string, ...) (*FutureOrder, error)
- func (bm *Bitmex) PlaceOrders(places [3]q.Order) (orders [3]q.Order, err error)
- func (bm *Bitmex) String() string
- func (bm *Bitmex) Test() bool
- func (bm *Bitmex) WithdrawFee() (sf []q.NetworkWithdraw, err error)
- type BitmexOrder
- type SubscribeOp
- type SwapWs
- func (s *SwapWs) DepthCallback(f func(depth *Depth))
- func (s *SwapWs) SubscribeDepth(pair CurrencyPair, contractType string) error
- func (s *SwapWs) SubscribeTicker(pair CurrencyPair, contractType string) error
- func (s *SwapWs) SubscribeTrade(pair CurrencyPair, contractType string) error
- func (s *SwapWs) TickerCallback(f func(ticker *FutureTicker))
- func (s *SwapWs) TradeCallback(f func(trade *Trade, contract string))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdaptWsSymbol ¶
Types ¶
type Bitmex ¶
type Bitmex struct {
*APIConfig
}
func (*Bitmex) FutureCancelOrder ¶
func (*Bitmex) GetContractValue ¶
func (*Bitmex) GetFutureDepth ¶
func (*Bitmex) GetFutureEstimatedPrice ¶
func (*Bitmex) GetFutureIndex ¶
func (*Bitmex) GetFutureOrder ¶
func (*Bitmex) GetFutureOrderHistory ¶
func (*Bitmex) GetFutureOrders ¶
func (*Bitmex) GetFuturePosition ¶
func (*Bitmex) GetFutureTicker ¶
func (*Bitmex) GetFutureUserinfo ¶
func (*Bitmex) GetIndicativeFundingRate ¶
func (*Bitmex) GetKlineRecords ¶
func (*Bitmex) GetUnfinishFutureOrders ¶
func (*Bitmex) LimitFuturesOrder ¶
func (*Bitmex) MarketFuturesOrder ¶
func (*Bitmex) PlaceFutureOrder ¶
func (*Bitmex) PlaceFutureOrder2 ¶
func (*Bitmex) PlaceOrders ¶
func (*Bitmex) WithdrawFee ¶
func (bm *Bitmex) WithdrawFee() (sf []q.NetworkWithdraw, err error)
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 SwapWs ¶
type SwapWs struct {
// contains filtered or unexported fields
}
func (*SwapWs) DepthCallback ¶
func (s *SwapWs) DepthCallback(f func(depth *Depth))
func (*SwapWs) SubscribeDepth ¶
func (*SwapWs) SubscribeTicker ¶
func (*SwapWs) SubscribeTrade ¶
func (*SwapWs) TickerCallback ¶
func (s *SwapWs) TickerCallback(f func(ticker *FutureTicker))
func (*SwapWs) TradeCallback ¶
Click to show internal directories.
Click to hide internal directories.