Documentation ¶
Index ¶
- Constants
- func GetPair(coin1 string, coin2 string) string
- type BinanceWS
- func (b *BinanceWS) Emit(event interface{}, arguments ...interface{}) *emission.Emitter
- func (ex *BinanceWS) GetBalance() WalletBalance
- func (b *BinanceWS) Off(event interface{}, listener interface{}) *emission.Emitter
- func (b *BinanceWS) On(event interface{}, listener interface{}) *emission.Emitter
- func (b *BinanceWS) Send(msg string) (err error)
- func (b *BinanceWS) SendCmd(cmd Cmd)
- func (b *BinanceWS) Start() error
- func (b *BinanceWS) Subscribe(channel string, coin string)
- type BookTicker
- type Cmd
- type Configuration
- type WalletBalance
Constants ¶
View Source
const (
ChannelTicker = "@bookTicker"
)
View Source
const (
HostMainnetPublicTopics = "wss://stream.binance.com:9443/ws"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BinanceWS ¶
type BinanceWS struct {
// contains filtered or unexported fields
}
func New ¶
func New(config *Configuration) *BinanceWS
func (*BinanceWS) GetBalance ¶
func (ex *BinanceWS) GetBalance() WalletBalance
func (*BinanceWS) SendCmd ¶
отправка команды на сервер в отдельной функции для того, чтобы при переподключении быстро подписаться на все предыдущие каналы
type BookTicker ¶
type Configuration ¶
type WalletBalance ¶
type WalletBalance struct { MakerCommission int `json:"makerCommission"` TakerCommission int `json:"takerCommission"` BuyerCommission int `json:"buyerCommission"` SellerCommission int `json:"sellerCommission"` CanTrade bool `json:"canTrade"` CanWithdraw bool `json:"canWithdraw"` CanDeposit bool `json:"canDeposit"` Brokered bool `json:"brokered"` UpdateTime int `json:"updateTime"` AccountType string `json:"accountType"` Balances []balance `json:"balances"` Permissions []string `json:"permissions"` }
Click to show internal directories.
Click to hide internal directories.