Documentation ¶
Index ¶
- Constants
- func InitAccount(apiKey, secretKey string, env Environment) *account
- func InitKLines(env Environment) *klines
- func InitMonitor(env Environment) (*monitor, error)
- func NewBinance(env Environment, path SpotPATH) *binance
- type Environment
- type Interval
- type KLineMonitor
- type KlinesReq
- type Method
- type MiniTickerMonitor
- type MonitorParam
- type Processing
- type SpotAPIURL
- type SpotPATH
- type SpotWSURL
- type Stream
- type Symbol
Constants ¶
View Source
const ( // https://api.binance.com // https://api-gcp.binance.com // https://api1.binance.com // https://api2.binance.com // https://api3.binance.com // https://api4.binance.com MainnetSpotAPI SpotAPIURL = "https://api.binance.com" TestnetSpotAPI SpotAPIURL = "https://testnet.binance.vision" MainnetSpotWSS SpotWSURL = "wss://stream.binance.com:9443/ws" TestnetSpotWSS SpotWSURL = "wss://testnet.binance.vision/ws" )
Variables ¶
This section is empty.
Functions ¶
func InitAccount ¶
func InitAccount(apiKey, secretKey string, env Environment) *account
func InitKLines ¶
func InitKLines(env Environment) *klines
func InitMonitor ¶
func InitMonitor(env Environment) (*monitor, error)
func NewBinance ¶
func NewBinance(env Environment, path SpotPATH) *binance
Types ¶
type Environment ¶
type Environment string
const ( Mainnet Environment = "mainnet" Testnet Environment = "testnet" )
type KLineMonitor ¶
func (KLineMonitor) Symbol ¶
func (M KLineMonitor) Symbol() Symbol
func (KLineMonitor) Value ¶
func (M KLineMonitor) Value() string
type MiniTickerMonitor ¶
type MiniTickerMonitor struct {
S Symbol
}
func (MiniTickerMonitor) Symbol ¶
func (M MiniTickerMonitor) Symbol() Symbol
func (MiniTickerMonitor) Value ¶
func (M MiniTickerMonitor) Value() string
type MonitorParam ¶
type Processing ¶
type Processing interface {
Successful([]byte)
}
type SpotAPIURL ¶
type SpotAPIURL string
type Stream ¶
type Stream struct { Method Method Params MonitorParam }
Click to show internal directories.
Click to hide internal directories.