Documentation ¶
Index ¶
- func NewListenKeyBuilder(host, appKey, appSecret string) *listenKeyBuilder
- type AccountCombinedPosition
- type AccountPosition
- type AccountWebsocketClient
- func (u *AccountWebsocketClient) GetCombined(id uint)
- func (u *AccountWebsocketClient) GetSubscribe(id uint)
- func (u *AccountWebsocketClient) SetCombined(b bool, id uint)
- func (u *AccountWebsocketClient) SetHandler(connectHandler binance.ConnectedHandler, ...)
- func (u *AccountWebsocketClient) Subscribe(id uint, params ...string)
- func (u *AccountWebsocketClient) Unsubscribe(id uint, params ...string)
- type BalanceCombinedUpdate
- type BalanceUpdate
- type BalanceWebsocketClient
- func (u *BalanceWebsocketClient) GetCombined(id uint)
- func (u *BalanceWebsocketClient) GetSubscribe(id uint)
- func (u *BalanceWebsocketClient) SetCombined(b bool, id uint)
- func (u *BalanceWebsocketClient) SetHandler(connectHandler binance.ConnectedHandler, ...)
- func (u *BalanceWebsocketClient) Subscribe(id uint, params ...string)
- func (u *BalanceWebsocketClient) Unsubscribe(id uint, params ...string)
- type ExecutionCombinedReport
- type ExecutionReport
- type ListCombinedStatus
- type ListStatus
- type ListenKeyResponse
- type OrderCombinedJudge
- type OrderJudge
- type OrderWebsocketClient
- func (u *OrderWebsocketClient) GetCombined(id uint)
- func (u *OrderWebsocketClient) GetSubscribe(id uint)
- func (u *OrderWebsocketClient) SetCombined(b bool, id uint)
- func (u *OrderWebsocketClient) SetHandler(connectHandler binance.ConnectedHandler, ...)
- func (u *OrderWebsocketClient) Subscribe(id uint, params ...string)
- func (u *OrderWebsocketClient) Unsubscribe(id uint, params ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewListenKeyBuilder ¶
func NewListenKeyBuilder(host, appKey, appSecret string) *listenKeyBuilder
NewListenKeyBuilder Initializer
Types ¶
type AccountCombinedPosition ¶
type AccountCombinedPosition struct { StreamName string `json:"stream"` // Stream Name Data AccountPosition `json:"data"` // data }
AccountCombinedPosition account position
type AccountPosition ¶
type AccountPosition struct { EventType string `json:"e"` EventTime int64 `json:"E"` UpdateTime int64 `json:"u"` Balance []struct { Asset string `json:"a"` AvailableBalance string `json:"f"` FreezeBalance string `json:"l"` } `json:"B"` }
AccountPosition account position
type AccountWebsocketClient ¶
type AccountWebsocketClient struct {
binance.WebsocketClient
}
AccountWebsocketClient responsible to handle market price data from websocket
func NewAccountWebsocketClient ¶
func NewAccountWebsocketClient(streams ...string) *AccountWebsocketClient
NewAccountWebsocketClient Factory function
func (*AccountWebsocketClient) GetCombined ¶
func (u *AccountWebsocketClient) GetCombined(id uint)
GetCombined get combined
func (*AccountWebsocketClient) GetSubscribe ¶
func (u *AccountWebsocketClient) GetSubscribe(id uint)
GetSubscribe get subscribed list
func (*AccountWebsocketClient) SetCombined ¶
func (u *AccountWebsocketClient) SetCombined(b bool, id uint)
SetCombined set combined, it is true when stream's length is greater than one, and false if stream's length is equal to one
func (*AccountWebsocketClient) SetHandler ¶
func (u *AccountWebsocketClient) SetHandler(connectHandler binance.ConnectedHandler, responseHandler binance.ResponseHandler)
SetHandler set callback handler
func (*AccountWebsocketClient) Subscribe ¶
func (u *AccountWebsocketClient) Subscribe(id uint, params ...string)
Subscribe subscribe market price data
func (*AccountWebsocketClient) Unsubscribe ¶
func (u *AccountWebsocketClient) Unsubscribe(id uint, params ...string)
Unsubscribe unsubscribe market price data
type BalanceCombinedUpdate ¶
type BalanceCombinedUpdate struct { StreamName string `json:"stream"` // Stream Name Data BalanceUpdate `json:"data"` // data }
BalanceCombinedUpdate balance update
type BalanceUpdate ¶
type BalanceUpdate struct { EventType string `json:"e"` EventTime int64 `json:"E"` Asset string `json:"a"` BalanceDelta string `json:"d"` ClearTime int64 `json:"T"` }
BalanceUpdate balance update
type BalanceWebsocketClient ¶
type BalanceWebsocketClient struct {
binance.WebsocketClient
}
BalanceWebsocketClient responsible to handle market price data from websocket
func NewBalanceWebsocketClient ¶
func NewBalanceWebsocketClient(streams ...string) *BalanceWebsocketClient
NewBalanceWebsocketClient Factory function
func (*BalanceWebsocketClient) GetCombined ¶
func (u *BalanceWebsocketClient) GetCombined(id uint)
GetCombined get combined
func (*BalanceWebsocketClient) GetSubscribe ¶
func (u *BalanceWebsocketClient) GetSubscribe(id uint)
GetSubscribe get subscribed list
func (*BalanceWebsocketClient) SetCombined ¶
func (u *BalanceWebsocketClient) SetCombined(b bool, id uint)
SetCombined set combined, it is true when stream's length is greater than one, and false if stream's length is equal to one
func (*BalanceWebsocketClient) SetHandler ¶
func (u *BalanceWebsocketClient) SetHandler(connectHandler binance.ConnectedHandler, responseHandler binance.ResponseHandler)
SetHandler set callback handler
func (*BalanceWebsocketClient) Subscribe ¶
func (u *BalanceWebsocketClient) Subscribe(id uint, params ...string)
Subscribe subscribe market price data
func (*BalanceWebsocketClient) Unsubscribe ¶
func (u *BalanceWebsocketClient) Unsubscribe(id uint, params ...string)
Unsubscribe unsubscribe market price data
type ExecutionCombinedReport ¶
type ExecutionCombinedReport struct { StreamName string `json:"stream"` // Stream Name Data ExecutionReport `json:"data"` // data }
ExecutionCombinedReport execution report
type ExecutionReport ¶
type ExecutionReport struct { EventType string `json:"e"` // Event type EventTime int64 `json:"E"` // Event time Symbol string `json:"s"` // Symbol ClientOrderID string `json:"c"` // Client order ID Side string `json:"S"` // Side OrderType string `json:"o"` // Order type TimeInForce string `json:"f"` // Time in force OrderQuantity string `json:"q"` // Order quantity OrderPrice string `json:"p"` // Order price StopPrice string `json:"P"` // Stop price IcebergQuantity string `json:"F"` // Iceberg quantity OrderListID int64 `json:"g"` // OrderListId ClientID string `json:"C"` // Original client order ID; This is the ID of the order being canceled ExecutionType string `json:"x"` // Current execution type OrderStatus string `json:"X"` // Current order status OrderRejectReason string `json:"r"` // Order reject reason; will be an error code. OrderID int `json:"i"` // Order ID LastExecutedQuantity string `json:"l"` // Last executed quantity CumulativeFilledQuantity string `json:"z"` // Cumulative filled quantity LastExecutedPrice string `json:"L"` // Last executed price CommissionAmount string `json:"n"` // Commission amount CommissionAsset interface{} `json:"N"` // Commission asset TransactionTime int64 `json:"T"` // Transaction time TradeID int `json:"t"` // Trade ID UppercaseI int `json:"I"` // Ignore IsOrderOnBook bool `json:"w"` // Is the order on the book? IsMakerSide bool `json:"m"` // Is this trade the maker side? UppercaseM bool `json:"M"` // Ignore OrderCreationTime int64 `json:"O"` // Order creation time CumulativeQuoteAsset string `json:"Z"` // Cumulative quote asset transacted quantity LastQuoteAssetTransactedQuantity string `json:"Y"` // Last quote asset transacted quantity (i.e. lastPrice * lastQty) QuoteOrderQty string `json:"Q"` // Quote Order Qty }
ExecutionReport execution report
type ListCombinedStatus ¶
type ListCombinedStatus struct { StreamName string `json:"stream"` // Stream Name Data ListStatus `json:"data"` // data }
ListCombinedStatus list combined status
type ListStatus ¶
type ListStatus struct { EventType string `json:"e"` EventTime int64 `json:"E"` Symbol string `json:"s"` OrderListID int64 `json:"g"` ContingencyType string `json:"c"` ListStatusType string `json:"l"` ListOrderType string `json:"L"` ListRejectType string `json:"r"` ListClientOrderID string `json:"C"` TransactionTime int64 `json:"T"` Objects []struct { Symbol string `json:"s"` OrderID int64 `json:"i"` ClientOrderID string `json:"c"` } `json:"O"` }
ListStatus list status
type ListenKeyResponse ¶
type ListenKeyResponse struct {
ListenKey string `json:"listenKey"`
}
ListenKeyResponse listen key response
type OrderCombinedJudge ¶
type OrderCombinedJudge struct { StreamName string `json:"stream"` // Stream Name Data OrderJudge `json:"data"` // data }
OrderCombinedJudge order combined judge
type OrderJudge ¶
type OrderJudge struct {
EventType interface{} `json:"e"`
}
OrderJudge order judge
type OrderWebsocketClient ¶
type OrderWebsocketClient struct {
binance.WebsocketClient
}
OrderWebsocketClient responsible to handle market price data from websocket
func NewOrderWebsocketClient ¶
func NewOrderWebsocketClient(streams ...string) *OrderWebsocketClient
NewOrderWebsocketClient Factory function
func (*OrderWebsocketClient) GetCombined ¶
func (u *OrderWebsocketClient) GetCombined(id uint)
GetCombined get combined
func (*OrderWebsocketClient) GetSubscribe ¶
func (u *OrderWebsocketClient) GetSubscribe(id uint)
GetSubscribe get subscribed list
func (*OrderWebsocketClient) SetCombined ¶
func (u *OrderWebsocketClient) SetCombined(b bool, id uint)
SetCombined set combined, it is true when stream's length is greater than one, and false if stream's length is equal to one
func (*OrderWebsocketClient) SetHandler ¶
func (u *OrderWebsocketClient) SetHandler(connectHandler binance.ConnectedHandler, responseHandler binance.ResponseHandler)
SetHandler set callback handler
func (*OrderWebsocketClient) Subscribe ¶
func (u *OrderWebsocketClient) Subscribe(id uint, params ...string)
Subscribe subscribe market price data
func (*OrderWebsocketClient) Unsubscribe ¶
func (u *OrderWebsocketClient) Unsubscribe(id uint, params ...string)
Unsubscribe unsubscribe market price data