coinex

package
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCoinexSpotWsSingle

func NewCoinexSpotWsSingle(wsURL, proxyURL string) (sw SpotWebsocket, err error)

func NewSpotAPI

func NewSpotAPI(client *http.Client, apiKey, secretKey string) SpotAPI

func NewSpotWebsocket

func NewSpotWebsocket(wsURL, proxyURL string) (sw SpotWebsocket, err error)

Types

type CoinEx

type CoinEx struct {
	// contains filtered or unexported fields
}

func (*CoinEx) Cancel

func (coinex *CoinEx) Cancel(orderId string, pair CurrencyPair) (bool, error)

func (*CoinEx) GetAccount

func (coinex *CoinEx) GetAccount() (*Account, error)

func (*CoinEx) GetAllCurrencyPair

func (coinex *CoinEx) GetAllCurrencyPair() (map[string]SymbolSetting, error)

获取支持的交易对

func (*CoinEx) GetAllCurrencyStatus

func (coinex *CoinEx) GetAllCurrencyStatus() (map[string]CurrencyStatus, error)

获取所有币种是否可以充提币

func (*CoinEx) GetAllTicker

func (coinex *CoinEx) GetAllTicker() ([]Ticker, error)

func (*CoinEx) GetCurrencyStatus

func (coinex *CoinEx) GetCurrencyStatus(currency Currency) (CurrencyStatus, error)

获取此币种是否可以充提币

func (*CoinEx) GetDepth

func (coinex *CoinEx) GetDepth(pair CurrencyPair, size int, step int) (*Depth, error)

func (*CoinEx) GetExchangeName

func (coinex *CoinEx) GetExchangeName() string

func (*CoinEx) GetFinishedOrders

func (coinex *CoinEx) GetFinishedOrders(pair CurrencyPair) ([]Order, error)

func (*CoinEx) GetKlineRecords

func (coinex *CoinEx) GetKlineRecords(pair CurrencyPair, period KlinePeriod, size, since int) ([]Kline, error)

func (*CoinEx) GetOrder

func (coinex *CoinEx) GetOrder(orderId string, pair CurrencyPair) (*Order, error)

func (*CoinEx) GetOrderDeal

func (coinex *CoinEx) GetOrderDeal(orderId string, pair CurrencyPair) ([]OrderDeal, error)

func (*CoinEx) GetPendingOrders

func (coinex *CoinEx) GetPendingOrders(pair CurrencyPair) ([]Order, error)

func (*CoinEx) GetTicker

func (coinex *CoinEx) GetTicker(pair CurrencyPair) (*Ticker, error)

func (*CoinEx) GetTrades

func (coinex *CoinEx) GetTrades(pair CurrencyPair, size int) ([]Trade, error)

非个人,整个交易所的交易记录

func (*CoinEx) GetURL

func (coinex *CoinEx) GetURL() string

func (*CoinEx) GetUserTrades

func (coinex *CoinEx) GetUserTrades(pair CurrencyPair) ([]Trade, error)

func (*CoinEx) LimitBuy

func (coinex *CoinEx) LimitBuy(pair CurrencyPair, price, amount string) (*Order, error)

func (*CoinEx) LimitSell

func (coinex *CoinEx) LimitSell(pair CurrencyPair, price, amount string) (*Order, error)

func (*CoinEx) MarketBuy

func (coinex *CoinEx) MarketBuy(pair CurrencyPair, amount string) (*Order, error)

func (*CoinEx) MarketSell

func (coinex *CoinEx) MarketSell(pair CurrencyPair, amount string) (*Order, error)

func (*CoinEx) SetURL

func (coinex *CoinEx) SetURL(exurl string)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL