Versions in this module Expand all Collapse all v1 v1.0.0 Dec 19, 2022 Changes in this version + func FlateDecompress(data []byte) ([]byte, error) + func HmacSha256Base64Signer(message string, secretKey string) (string, error) + type Api struct + ApiKey string + Passphrase string + SecretKey string + func (self *Api) Candles(instId, bar, before string) [][]string + func (self *Api) EstimatedPrice(instId string) []*EstimatedPrice + func (self *Api) ExchangeRate() []*UsdCny + func (self *Api) InitApiKeys(apikey, secretkey, passphrase string) + func (self *Api) Instruments(instType, uly, instId string) []*Instrument + func (self *Api) Order(instId, tdMode, side, posSide string, px, sz float32) []*OrderRes + func (self *Api) PriceLimit(instId string) []*PriceLimit + func (self *Api) SysTime() []*SysTime + func (self *Api) Ticker(instId string) []*Ticker + func (self *Api) Tickers(instType, uly string) []*Ticker + type Balance struct + AdjEq string + Details []struct{ ... } + Imr string + IsoEq string + MgnRatio string + Mmr string + NotionalUsd string + OrdFroz string + TotalEq string + UTime string + type Base struct + func (self *Base) Balance(symbol conset.SYMBOL) float32 + func (self *Base) Init(strings []string) + func (self *Base) Orders(symbol conset.SYMBOL, period conset.PERIOD, direct conset.OPERATION, ...) bool + func (self *Base) Period(period conset.PERIOD) string + func (self *Base) Plat() conset.PLAT + func (self *Base) Price(symbol conset.SYMBOL) float32 + func (self *Base) Pull(symbol conset.SYMBOL, times conset.TIMES, start time.Time) bool + func (self *Base) SetLeverage(symbol conset.SYMBOL, period conset.PERIOD, direct conset.OPERATION, ...) bool + func (self *Base) Side(direct conset.OPERATION) (string, string) + func (self *Base) SubscribeTickers(symbols []conset.SYMBOL, f func(conset.SYMBOL, float32)) + func (self *Base) Symbol(symbol conset.SYMBOL) string + func (self *Base) TdMode(period conset.PERIOD) string + func (self *Base) Times(times conset.TIMES) string + func (self *Base) UsdCny() float32 + type Candle [][]string + type EstimatedPrice struct + InstID string + InstType string + SettlePx string + Ts string + type Instrument struct + Alias string + BaseCcy string + Category string + CtMult string + CtType string + CtVal string + CtValCcy string + ExpTime string + InstID string + InstType string + Lever string + ListTime string + LotSz string + MinSz string + OptType string + QuoteCcy string + SettleCcy string + State string + Stk string + TickSz string + Uly string + type OrderRes struct + ClOrdID string + OrdID string + SCode string + SMsg string + Tag string + type PriceLimit struct + BuyLmt string + InstID string + InstType string + SellLmt string + Ts string + type Response struct + Code string + Data interface{} + Msg string + type SetLeverage struct + InstID string + Lever string + MgnMode string + PosSide string + type SysTime struct + Ts string + type Ticker struct + AskPx string + AskSz string + BidPx string + BidSz string + High24H string + InstID string + InstType string + Last string + LastSz string + Low24H string + Open24H string + SodUtc0 string + SodUtc8 string + Ts string + Vol24H string + VolCcy24H string + type UsdCny struct + UsdCny string + type Ws struct + ApiKey string + Passphrase string + SecretKey string + WsConn *ws.WsConn + func (self *Ws) ConnectWs() + func (self *Ws) InitWsKeys(apikey, secretkey, passphrase string) + func (self *Ws) Subscribe(sub map[string]interface{}) error + func (self *Ws) UUID() string + func (self *Ws) WsTickers(instIds []string, f func(conset.SYMBOL, float32)) error