Documentation ¶
Index ¶
- Constants
- func Sym2duo(pair string) q.D
- type EventMap
- type 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 ...wstrader.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
- type 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))
Constants ¶
View Source
const BaseUrl = "https://api.gateio.ws/api/v4"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventMap ¶
type EventMap map[int64]SubscribeEvent
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
func (*Gate) AllTickerV2 ¶
func (*Gate) CancelOrder ¶
func (*Gate) GetAccount ¶
func (*Gate) GetKlineRecords ¶
func (*Gate) GetOneOrder ¶
func (*Gate) GetOrderHistorys ¶
func (g *Gate) GetOrderHistorys(currency CurrencyPair, para ...wstrader.OptionalParameter) ([]Order, error)
func (*Gate) GetUnfinishedOrders ¶
func (*Gate) MarketSell ¶
func (*Gate) PlaceOrders ¶
type SubscribeEvent ¶
type SubscribeEvent struct { Event string `json:"event"` SubID string `json:"subId"` Channel string `json:"channel"` ChanID int64 `json:"chanId"` Symbol string `json:"symbol"` Precision string `json:"prec,omitempty"` Frequency string `json:"freq,omitempty"` Key string `json:"key,omitempty"` Len string `json:"len,omitempty"` Pair string `json:"pair"` }
type Ws ¶
func (*Ws) BBOCallback ¶
func (ws *Ws) BBOCallback(bboCallback func(*Bbo))
func (*Ws) DepthCallback ¶
func (ws *Ws) DepthCallback(depthCallback func(*Depth))
func (*Ws) SubscribeBBO ¶
func (*Ws) SubscribeDepth ¶
func (*Ws) SubscribeTicker ¶
func (*Ws) SubscribeTrade ¶
func (*Ws) TickerCallback ¶
func (ws *Ws) TickerCallback(tickerCallback func(*Ticker))
func (*Ws) TradeCallback ¶
func (ws *Ws) TradeCallback(tradeCallback func(*Trade))
Click to show internal directories.
Click to hide internal directories.