Documentation
¶
Index ¶
- func NewCoinexSpotWsSingle(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 CoinEx
- func (coinex *CoinEx) Cancel(orderId string, pair CurrencyPair) (bool, error)
- func (coinex *CoinEx) GetAccount() (*Account, error)
- func (coinex *CoinEx) GetAllCurrencyPair() (map[string]SymbolSetting, error)
- func (coinex *CoinEx) GetAllCurrencyStatus() (map[string]CurrencyStatus, error)
- func (coinex *CoinEx) GetAllTicker() ([]Ticker, error)
- func (coinex *CoinEx) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)
- func (coinex *CoinEx) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)
- func (coinex *CoinEx) GetExchangeName() string
- func (coinex *CoinEx) GetFinishedOrders(pair CurrencyPair) ([]Order, error)
- func (coinex *CoinEx) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)
- func (coinex *CoinEx) GetOrder(orderId string, pair CurrencyPair) (*Order, error)
- func (coinex *CoinEx) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)
- func (coinex *CoinEx) GetPendingOrders(pair CurrencyPair) ([]Order, error)
- func (coinex *CoinEx) GetTicker(pair CurrencyPair) (*Ticker, error)
- func (coinex *CoinEx) GetTrades(pair CurrencyPair, size int) ([]Trade, error)
- func (coinex *CoinEx) GetURL() string
- func (coinex *CoinEx) GetUserTrades(pair CurrencyPair) ([]Trade, error)
- func (coinex *CoinEx) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)
- func (coinex *CoinEx) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)
- func (coinex *CoinEx) MarketBuy(pair CurrencyPair, amount string) (*Order, error)
- func (coinex *CoinEx) MarketSell(pair CurrencyPair, amount string) (*Order, error)
- func (coinex *CoinEx) SetURL(exurl string)
- type CoinexSpotWs
- func (ws *CoinexSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
- func (ws *CoinexSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
- func (ws *CoinexSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
- func (ws *CoinexSpotWs) GetExchangeName() string
- func (ws *CoinexSpotWs) OnMessage(data []byte) (err error)
- func (ws *CoinexSpotWs) SubDepth(pair CurrencyPair, cb func(*Depth) error) (err error)
- func (ws *CoinexSpotWs) SubTicker(pair CurrencyPair, cb func(*Ticker) error) (err error)
- func (ws *CoinexSpotWs) SubTrade(pair CurrencyPair, cb func([]Trade) error) (err error)
- type CoinexSpotWsSingle
- func (ws *CoinexSpotWsSingle) FormatTopicName(topic string, pair CurrencyPair) string
- func (ws *CoinexSpotWsSingle) FormatTopicSubData(topic string, pair CurrencyPair) []byte
- func (ws *CoinexSpotWsSingle) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
- func (ws *CoinexSpotWsSingle) GetExchangeName() string
- func (ws *CoinexSpotWsSingle) OnMessage(data []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCoinexSpotWsSingle ¶
func NewSpotAPI ¶
func NewSpotWebsocket ¶
Types ¶
type CoinEx ¶
type CoinEx struct {
// contains filtered or unexported fields
}
func (*CoinEx) GetAccount ¶
func (*CoinEx) GetAllCurrencyPair ¶
获取支持的交易对
func (*CoinEx) GetAllCurrencyStatus ¶
获取所有币种是否可以充提币
func (*CoinEx) GetAllTicker ¶
func (*CoinEx) GetCurrencyStatus ¶
获取此币种是否可以充提币
func (*CoinEx) GetExchangeName ¶
func (*CoinEx) GetFinishedOrders ¶
func (*CoinEx) GetKlineRecords ¶
func (*CoinEx) GetOrderDeal ¶
func (*CoinEx) GetPendingOrders ¶
func (*CoinEx) GetUserTrades ¶
func (*CoinEx) MarketSell ¶
type CoinexSpotWs ¶
type CoinexSpotWs struct { SpotWsBase // contains filtered or unexported fields }
func (*CoinexSpotWs) FormatTopicName ¶
func (ws *CoinexSpotWs) FormatTopicName(topic string, pair CurrencyPair) string
格式化流名称
func (*CoinexSpotWs) FormatTopicSubData ¶
func (ws *CoinexSpotWs) FormatTopicSubData(topic string, pair CurrencyPair) []byte
格式化流订阅消息
func (*CoinexSpotWs) FormatTopicUnsubData ¶
func (ws *CoinexSpotWs) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
格式化流取消订阅消息
func (*CoinexSpotWs) GetExchangeName ¶
func (ws *CoinexSpotWs) GetExchangeName() string
func (*CoinexSpotWs) OnMessage ¶
func (ws *CoinexSpotWs) OnMessage(data []byte) (err error)
func (*CoinexSpotWs) SubDepth ¶
func (ws *CoinexSpotWs) SubDepth(pair CurrencyPair, cb func(*Depth) error) (err error)
func (*CoinexSpotWs) SubTicker ¶
func (ws *CoinexSpotWs) SubTicker(pair CurrencyPair, cb func(*Ticker) error) (err error)
func (*CoinexSpotWs) SubTrade ¶
func (ws *CoinexSpotWs) SubTrade(pair CurrencyPair, cb func([]Trade) error) (err error)
type CoinexSpotWsSingle ¶
type CoinexSpotWsSingle struct {
SpotWsBase
}
func (*CoinexSpotWsSingle) FormatTopicName ¶
func (ws *CoinexSpotWsSingle) FormatTopicName(topic string, pair CurrencyPair) string
格式化流名称
func (*CoinexSpotWsSingle) FormatTopicSubData ¶
func (ws *CoinexSpotWsSingle) FormatTopicSubData(topic string, pair CurrencyPair) []byte
格式化流订阅消息
func (*CoinexSpotWsSingle) FormatTopicUnsubData ¶
func (ws *CoinexSpotWsSingle) FormatTopicUnsubData(topic string, pair CurrencyPair) []byte
格式化流取消订阅消息
func (*CoinexSpotWsSingle) GetExchangeName ¶
func (ws *CoinexSpotWsSingle) GetExchangeName() string
func (*CoinexSpotWsSingle) OnMessage ¶
func (ws *CoinexSpotWsSingle) OnMessage(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.