Documentation ¶
Index ¶
- func NewGateSpotWsSingle(wsURL, proxyURL string) (sw SpotWebsocket, err error)
- func NewSpotAPI(client *http.Client, apiKey, secretKey string) SpotAPI
- func NewSpotWebsocket(wsURL, proxyURL string) (sw SpotWebsocket, err error)
- type Gate
- func (gate *Gate) Cancel(orderId string, pair CurrencyPair) (bool, error)
- func (gate *Gate) GetAccount() (*Account, error)
- func (gate *Gate) GetAllCurrencyPair() (map[string]SymbolSetting, error)
- func (gate *Gate) GetAllCurrencyStatus() (all map[string]CurrencyStatus, err error)
- func (gate *Gate) GetAllTicker() ([]Ticker, error)
- func (gate *Gate) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)
- func (gate *Gate) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)
- func (gate *Gate) GetExchangeName() string
- func (gate *Gate) GetFinishedOrders(pair CurrencyPair) ([]Order, error)
- func (gate *Gate) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)
- func (gate *Gate) GetOrder(orderId string, pair CurrencyPair) (*Order, error)
- func (gate *Gate) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)
- func (gate *Gate) GetPendingOrders(pair CurrencyPair) ([]Order, error)
- func (gate *Gate) GetTicker(pair CurrencyPair) (*Ticker, error)
- func (gate *Gate) GetTrades(pair CurrencyPair, size int) ([]Trade, error)
- func (gate *Gate) GetURL() string
- func (gate *Gate) GetUserTrades(pair CurrencyPair) ([]Trade, error)
- func (gate *Gate) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)
- func (gate *Gate) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)
- func (gate *Gate) MarketBuy(pair CurrencyPair, amount string) (*Order, error)
- func (gate *Gate) MarketSell(pair CurrencyPair, amount string) (*Order, error)
- func (gate *Gate) SetURL(exurl string)
- type GateSpotWs
- func (ws *GateSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
- func (ws *GateSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
- func (ws *GateSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
- func (ws *GateSpotWs) GetExchangeName() string
- func (ws *GateSpotWs) OnMessage(data []byte) (err error)
- func (ws *GateSpotWs) SubDepth(pair CurrencyPair, cb func(*Depth) error) (err error)
- func (ws *GateSpotWs) SubTicker(pair CurrencyPair, cb func(*Ticker) error) (err error)
- func (ws *GateSpotWs) SubTrade(pair CurrencyPair, cb func([]Trade) error) (err error)
- type GateSpotWsSingle
- func (ws *GateSpotWsSingle) FormatTopicName(topic string, pair CurrencyPair) string
- func (ws *GateSpotWsSingle) FormatTopicSubData(topic string, pair CurrencyPair) []byte
- func (ws *GateSpotWsSingle) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
- func (ws *GateSpotWsSingle) GetExchangeName() string
- func (ws *GateSpotWsSingle) OnMessage(data []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGateSpotWsSingle ¶
func NewSpotAPI ¶
func NewSpotWebsocket ¶
Types ¶
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
func (*Gate) GetAccount ¶
func (*Gate) GetAllCurrencyPair ¶
func (*Gate) GetAllCurrencyStatus ¶
func (*Gate) GetAllTicker ¶
func (*Gate) GetCurrencyStatus ¶
func (*Gate) GetExchangeName ¶
func (*Gate) GetFinishedOrders ¶
func (*Gate) GetKlineRecords ¶
func (*Gate) GetOrderDeal ¶
func (*Gate) GetPendingOrders ¶
func (*Gate) GetUserTrades ¶
func (*Gate) MarketSell ¶
type GateSpotWs ¶
type GateSpotWs struct { SpotWsBase // contains filtered or unexported fields }
func (*GateSpotWs) FormatTopicName ¶
func (ws *GateSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
格式化流名称
func (*GateSpotWs) FormatTopicSubData ¶
func (ws *GateSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
格式化流订阅消息
func (*GateSpotWs) FormatTopicUnsubData ¶
func (ws *GateSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
格式化流取消订阅消息
func (*GateSpotWs) GetExchangeName ¶
func (ws *GateSpotWs) GetExchangeName() string
func (*GateSpotWs) OnMessage ¶
func (ws *GateSpotWs) OnMessage(data []byte) (err error)
func (*GateSpotWs) SubDepth ¶
func (ws *GateSpotWs) SubDepth(pair CurrencyPair, cb func(*Depth) error) (err error)
func (*GateSpotWs) SubTicker ¶
func (ws *GateSpotWs) SubTicker(pair CurrencyPair, cb func(*Ticker) error) (err error)
func (*GateSpotWs) SubTrade ¶
func (ws *GateSpotWs) SubTrade(pair CurrencyPair, cb func([]Trade) error) (err error)
type GateSpotWsSingle ¶
type GateSpotWsSingle struct { SpotWsBase // contains filtered or unexported fields }
func (*GateSpotWsSingle) FormatTopicName ¶
func (ws *GateSpotWsSingle) FormatTopicName(topic string, pair CurrencyPair) string
格式化流名称
func (*GateSpotWsSingle) FormatTopicSubData ¶
func (ws *GateSpotWsSingle) FormatTopicSubData(topic string, pair CurrencyPair) []byte
格式化流订阅消息
func (*GateSpotWsSingle) FormatTopicUnsubData ¶
func (ws *GateSpotWsSingle) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
格式化流取消订阅消息
func (*GateSpotWsSingle) GetExchangeName ¶
func (ws *GateSpotWsSingle) GetExchangeName() string
func (*GateSpotWsSingle) OnMessage ¶
func (ws *GateSpotWsSingle) OnMessage(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.