Documentation ¶
Index ¶
- Variables
- type KlineInterval
- type SecurityType
- type SpotClient
- func (s *SpotClient) GenHeaders(t SecurityType) (map[string]string, error)
- func (s *SpotClient) GetBaseURL() string
- func (s *SpotClient) GetDebug() bool
- func (s *SpotClient) GetKey() string
- func (s *SpotClient) GetRecvWindow() int
- func (s *SpotClient) GetSecret() string
- func (s *SpotClient) NeedSignature(t SecurityType) bool
- func (s *SpotClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)
- type SpotClientCfg
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BaseURL = "https://api.binance.com"
)
Functions ¶
This section is empty.
Types ¶
type KlineInterval ¶
type KlineInterval string
var ( Second1 KlineInterval = "1s" Minute1 KlineInterval = "1m" Minute3 KlineInterval = "3m" Minute5 KlineInterval = "5m" Minute15 KlineInterval = "15m" Minute30 KlineInterval = "30m" Hour1 KlineInterval = "1h" Hour2 KlineInterval = "2h" Hour4 KlineInterval = "4h" Hour6 KlineInterval = "6h" Hour8 KlineInterval = "8h" Hour12 KlineInterval = "12h" Day1 KlineInterval = "1d" Day3 KlineInterval = "3d" Week1 KlineInterval = "1w" Month1 KlineInterval = "1M" )
type SecurityType ¶
type SecurityType string
var ( NONE SecurityType = "NONE" TRADE SecurityType = "TRADE" MARGIN SecurityType = "MARGIN" USER_DATA SecurityType = "USER_DATA" USER_STREAM SecurityType = "USER_STREAM" MARKET_DATA SecurityType = "MARKET_DATA" )
type SpotClient ¶
type SpotClient struct {
// contains filtered or unexported fields
}
func NewSpotClient ¶
func NewSpotClient(cfg *SpotClientCfg) (*SpotClient, error)
func (*SpotClient) GenHeaders ¶
func (s *SpotClient) GenHeaders(t SecurityType) (map[string]string, error)
func (*SpotClient) GetBaseURL ¶
func (s *SpotClient) GetBaseURL() string
func (*SpotClient) GetDebug ¶
func (s *SpotClient) GetDebug() bool
func (*SpotClient) GetKey ¶
func (s *SpotClient) GetKey() string
func (*SpotClient) GetRecvWindow ¶
func (s *SpotClient) GetRecvWindow() int
func (*SpotClient) GetSecret ¶
func (s *SpotClient) GetSecret() string
func (*SpotClient) NeedSignature ¶
func (s *SpotClient) NeedSignature(t SecurityType) bool
func (*SpotClient) SendHTTPRequest ¶
func (s *SpotClient) SendHTTPRequest(ctx context.Context, req utils.HTTPRequest) (*utils.ApiResponse, error)
Click to show internal directories.
Click to hide internal directories.