Documentation ¶
Index ¶
- Constants
- func Milli2Time(ts int64) time.Time
- func Time2Milli(ts time.Time) int64
- func TradeParam(symbol string, st int64, et int64, fid int64, limit int) url.Values
- type APIError
- type APIIF
- type CallResult
- type CodeC
- type GetRestReq
- type ListenKeyClient
- type NotifyClient
- func (nc *NotifyClient) Handle(ctx context.Context, notify *rpc.Notify)
- func (nc *NotifyClient) Push(ch string, data interface{})
- func (wcl *NotifyClient) Subscribe(ctx context.Context, channels ...exchange.Channel) error
- func (wcl *NotifyClient) UnSubscribe(ctx context.Context, channels ...exchange.Channel) error
- type RestClient
- type RestReq
- type SubscribeRequest
- type WSClient
Constants ¶
View Source
const ( MethodSubscibe = "SUBSCRIBE" MethodUnSubscribe = "UNSUBSCRIBE" )
View Source
const (
Exchange = "binance"
)
Variables ¶
This section is empty.
Functions ¶
func Milli2Time ¶ added in v0.5.8
func Time2Milli ¶ added in v0.5.8
Types ¶
type CallResult ¶ added in v0.5.8
type CallResult struct { Result interface{} `json:"result"` ID int64 `json:"id"` }
type CodeC ¶ added in v0.5.8
type CodeC struct {
// contains filtered or unexported fields
}
CodeC common codec for spot swap notify
func (*CodeC) DecodeByCB ¶ added in v0.5.8
type GetRestReq ¶ added in v0.5.4
type ListenKeyClient ¶ added in v0.5.4
type NotifyClient ¶ added in v0.5.8
func NewNotifyClient ¶ added in v0.5.8
func (*NotifyClient) Handle ¶ added in v0.5.8
func (nc *NotifyClient) Handle(ctx context.Context, notify *rpc.Notify)
func (*NotifyClient) Push ¶ added in v0.5.8
func (nc *NotifyClient) Push(ch string, data interface{})
func (*NotifyClient) UnSubscribe ¶ added in v0.5.8
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
Binance Rest client instance
func NewRestClient ¶
func NewRestClient(key, secret, host string) *RestClient
func (*RestClient) GetRequest ¶ added in v0.5.4
func (rc *RestClient) GetRequest(ctx context.Context, endPoint string, req GetRestReq, sign bool, dst interface{}) error
GetRequest helper method to send http GET request
type RestReq ¶ added in v0.5.4
RestReq basic binance rest request instance add recvWindow param support
func NewRestReq ¶ added in v0.5.4
func NewRestReq() *RestReq
func (*RestReq) RecvWindow ¶ added in v0.5.4
type SubscribeRequest ¶ added in v0.5.8
type WSClient ¶ added in v0.5.4
WSClient common private wsclient for binance
func NewWSClient ¶ added in v0.5.4
Source Files ¶
Click to show internal directories.
Click to hide internal directories.