Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) CancelOrder(orderId uint64) error
- func (c *Client) GetAccountInfo() ([]account.AccountInfo, error)
- func (c *Client) GetPrice(symbol string) (decimal.Decimal, error)
- func (c *Client) GetSpotAccountId() (int64, error)
- func (c *Client) GetSpotBalance() (map[string]decimal.Decimal, error)
- func (c *Client) GetTimestamp() (int, error)
- func (c *Client) PlaceOrder(orderType, symbol, clientOrderId string, price, amount decimal.Decimal) (uint64, error)
- func (c *Client) SubscribeAccountUpdate(ctx context.Context, symbol, clientId string, ...) error
- func (c *Client) SubscribeCandlestick(ctx context.Context, symbol, clientId string, ...)
- func (c *Client) SubscribeCandlestickWithReq(ctx context.Context, symbol, clientId string, ...)
- func (c *Client) SubscribeLast24hCandlestick(ctx context.Context, symbol, clientId string, ...) error
- func (c *Client) SubscribeOrder(ctx context.Context, symbol, clientId string, ...)
- func (c *Client) SubscribeTradeClear(ctx context.Context, symbol, clientId string, ...)
- type Trade
Constants ¶
View Source
const ( OrderTypeBuyMarket = "buy-market" OrderTypeSellMarket = "sell-market" OrderTypeBuyLimit = "buy-limit" OrderTypeSellLimit = "sell-limit" OrderTypeBuyIoc = "buy-ioc" OrderTypeSellIoc = "sell-ioc" OrderTypeBuyLimitMaker = "buy-limit-maker" OrderTypeSellLimitMaker = "sell-limit-maker" OrderTypeBuyStopLimit = "buy-stop-limit" OrderTypeSellStopLimit = "sell-stop-limit" OrderTypeBuyLimitFok = "buy-limit-fok" OrderTypeSellLimitFok = "sell-limit-fok" OrderTypeBuyStopLimitFok = "buy-stop-limit-fok" OrderTypeSellStopLimitFok = "sell-stop-limit-fok" )
View Source
const ( Name = "huobi" DefaultHost = "api.huobi.me" )
View Source
const (
BTC_USDT = "btcusdt"
)
View Source
const CandlestickReqMaxLength = 300
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Label string AccessKey string SecretKey string Host string SpotAccountId int64 }
func (*Client) CancelOrder ¶
func (*Client) GetAccountInfo ¶
func (c *Client) GetAccountInfo() ([]account.AccountInfo, error)
func (*Client) GetSpotAccountId ¶
func (*Client) GetSpotBalance ¶
func (*Client) GetTimestamp ¶
func (*Client) PlaceOrder ¶
func (*Client) SubscribeAccountUpdate ¶
func (c *Client) SubscribeAccountUpdate(ctx context.Context, symbol, clientId string, responseHandler websocketclientbase.ResponseHandler) error
func (*Client) SubscribeCandlestick ¶
func (c *Client) SubscribeCandlestick(ctx context.Context, symbol, clientId string, responseHandler websocketclientbase.ResponseHandler)
func (*Client) SubscribeCandlestickWithReq ¶ added in v0.7.0
func (c *Client) SubscribeCandlestickWithReq(ctx context.Context, symbol, clientId string, responseHandler websocketclientbase.ResponseHandler)
func (*Client) SubscribeLast24hCandlestick ¶
func (c *Client) SubscribeLast24hCandlestick(ctx context.Context, symbol, clientId string, responseHandler websocketclientbase.ResponseHandler) error
func (*Client) SubscribeOrder ¶
func (c *Client) SubscribeOrder(ctx context.Context, symbol, clientId string, responseHandler websocketclientbase.ResponseHandler)
func (*Client) SubscribeTradeClear ¶
func (c *Client) SubscribeTradeClear(ctx context.Context, symbol, clientId string, responseHandler websocketclientbase.ResponseHandler)
type Trade ¶
type Trade struct { Symbol string OrderId int64 OrderSide string OrderType string Aggressor bool Id int64 // trade id Time int64 // trade time Price decimal.Decimal // trade price Volume decimal.Decimal // trade volume TransactFee decimal.Decimal FeeDeduct decimal.Decimal FeeDeductCurrency string }
Trade is the Data object in TradeClear websocket response.
Click to show internal directories.
Click to hide internal directories.