Versions in this module Expand all Collapse all v0 v0.2.0 Jan 13, 2025 Changes in this version + const BaseUrl + func Sym2duo(pair string) q.D + type EventMap map[int64]SubscribeEvent + type Gate struct + func New(client *http.Client, accesskey, secretkey string) *Gate + func (g *Gate) AllTicker(SymPair map[string]q.D) (mdt *sync.Map, err error) + func (g *Gate) AllTickerV2(SymPair map[string]q.D) (mdt *sync.Map, err error) + func (g *Gate) Balances() (availables, frozens *sync.Map, err error) + func (g *Gate) CancelOrder(orderId string, currency CurrencyPair) (bool, error) + func (g *Gate) Fee() float64 + func (g *Gate) GetAccount() (*Account, error) + func (g *Gate) GetAttr() (a q.Attr) + func (g *Gate) GetDepth(size int, currency CurrencyPair) (*Depth, error) + func (g *Gate) GetKlineRecords(currency CurrencyPair, period KlinePeriod, size int, ...) ([]Kline, error) + func (g *Gate) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error) + func (g *Gate) GetOrderHistorys(currency CurrencyPair, para ...OptionalParameter) ([]Order, error) + func (g *Gate) GetTicker(currency CurrencyPair) (*Ticker, error) + func (g *Gate) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error) + func (g *Gate) GetUnfinishedOrders(currency CurrencyPair) ([]Order, error) + func (g *Gate) LimitBuy(amount, price string, currency CurrencyPair, ...) (*Order, error) + func (g *Gate) LimitSell(amount, price string, currency CurrencyPair, ...) (*Order, error) + func (g *Gate) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error) + func (g *Gate) MarketSell(amount, price string, currency CurrencyPair) (*Order, error) + func (g *Gate) OneTicker(d q.D) (ticker q.Bbo, err error) + func (g *Gate) PairArray() (sm map[string]q.D, ps map[q.D]q.P, err error) + func (g *Gate) PlaceOrders(places [3]q.Order) (orders [3]q.Order, err error) + func (g *Gate) String() string + func (g *Gate) Test() bool + type SubscribeEvent struct + ChanID int64 + Channel string + Event string + Frequency string + Key string + Len string + Pair string + Precision string + SubID string + Symbol string + type Ws struct + func NewWs() *Ws + func (ws *Ws) BBOCallback(bboCallback func(*Bbo)) + func (ws *Ws) DepthCallback(depthCallback func(*Depth)) + func (ws *Ws) SubscribeBBO(sm []string) (err error) + func (ws *Ws) SubscribeDepth(pair CurrencyPair) error + func (ws *Ws) SubscribeTicker(pair CurrencyPair) error + func (ws *Ws) SubscribeTrade(pair CurrencyPair) error + func (ws *Ws) TickerCallback(tickerCallback func(*Ticker)) + func (ws *Ws) TradeCallback(tradeCallback func(*Trade))