Versions in this module Expand all Collapse all v1 v1.0.1 Apr 6, 2021 v1.0.0 Apr 6, 2021 Changes in this version + const API_BASE + const Interval1Hour + const Interval30Minutes + const TransferTypeBankToExchange + const TransferTypeExchangeToBank + func NewClient(apiKey, apiSecret string) (c *client) + func NewClientWithCustomHttpConfig(apiKey, apiSecret string, httpClient *http.Client) (c *client) + func NewClientWithCustomTimeout(apiKey, apiSecret string, timeout time.Duration) (c *client) + type Balance struct + Available float64 + Currency string + Reserved float64 + type Currency struct + Crypto bool + FullName string + Id string + PayinConfirmations uint + PayinEnabled bool + PayinPaymentId bool + PayoutEnabled bool + PayoutIsPaymentId bool + TransferEnabled bool + type HitBtc struct + func New(apiKey, apiSecret string) *HitBtc + func NewWithCustomHttpClient(apiKey, apiSecret string, httpClient *http.Client) *HitBtc + func NewWithCustomTimeout(apiKey, apiSecret string, timeout time.Duration) *HitBtc + func (b *HitBtc) CancelOrder(currencyPair string) (orders []Order, err error) + func (b *HitBtc) GetAllTicker() (tickers Tickers, err error) + func (b *HitBtc) GetBalance(currency string) (balance Balance, err error) + func (b *HitBtc) GetBalances() (balances []Balance, err error) + func (b *HitBtc) GetCurrencies() (currencies []Currency, err error) + func (b *HitBtc) GetOpenOrders() (orders []Order, err error) + func (b *HitBtc) GetOrder(orderId string) (orders []Order, err error) + func (b *HitBtc) GetOrderHistory() (orders []Order, err error) + func (b *HitBtc) GetOrderbook(market string) (orderbook Orderbook, err error) + func (b *HitBtc) GetSymbols() (symbols []Symbol, err error) + func (b *HitBtc) GetTicker(market string) (ticker Ticker, err error) + func (b *HitBtc) GetTrades(currencyPair string) (trades []Trade, err error) + func (b *HitBtc) GetTransactions(start uint64, end uint64, limit uint32) (transactions []Transaction, err error) + func (b *HitBtc) PlaceOrder(requestOrder Order) (responseOrder Order, err error, outputString string) + func (b *HitBtc) SetDebug(enable bool) + func (b *HitBtc) TransferBalance(currency string, amount float64, transferType transferType) (transferID string, err error) + func (b *HitBtc) Withdraw(address string, currency string, amount float64) (withdrawID string, err error) + type Order struct + AvgPrice float64 + ClientOrderId string + Created time.Time + CumQuantity float64 + Expire time.Time + Price float64 + Quantity float64 + Side string + Status string + StopPrice float64 + Symbol string + TimeInForce string + Type string + Updated time.Time + func (t *Order) UnmarshalJSON(data []byte) error + type OrderBookItem struct + Price float64 + Size float64 + type Orderbook struct + Ask []OrderBookItem + Bid []OrderBookItem + func (t *Orderbook) UnmarshalJSON(data []byte) error + type Symbol struct + BaseCurrency string + FeeCurrency string + Id string + ProvideLiquidityRate float64 + QuantityIncrement float64 + QuoteCurrency string + TakeLiquidityRate float64 + TickSize float64 + type Ticker struct + Ask float64 + Bid float64 + High float64 + Last float64 + Low float64 + Open float64 + Symbol string + Timestamp time.Time + Volume float64 + VolumeQuote float64 + func (t *Ticker) UnmarshalJSON(data []byte) error + type Tickers []Ticker + type Trade struct + ClientOrderId string + Fee float64 + Id uint64 + OrderId uint64 + Price float64 + Quantity float64 + Symbol string + Timestamp time.Time + Type string + func (t *Trade) UnmarshalJSON(data []byte) error + type Transaction struct + Address string + Amount float64 + Created time.Time + Currency string + Fee float64 + Hash string + Id string + Index uint64 + NetworkFee float64 + Status string + Type string + Updated time.Time + func (t *Transaction) UnmarshalJSON(data []byte) error + type WSCandles struct + Close string + Max string + Min string + Open string + Timestamp time.Time + Volume string + VolumeQuote string + type WSCandlesSubscriptionRequest struct + Period string + Symbol string + type WSClient struct + func NewWSClient() (*WSClient, error) + func (c *WSClient) Close() + func (c *WSClient) GetCurrencyInfo(symbol string) (*WSGetCurrencyResponse, error) + func (c *WSClient) GetSymbol(symbol string) (*WSGetSymbolResponse, error) + func (c *WSClient) GetTrades(symbol string) (*WSGetTradesResponse, error) + func (c *WSClient) SubscribeCandles(symbol string, timeframe string) (<-chan WSNotificationCandlesUpdate, <-chan WSNotificationCandlesSnapshot, ...) + func (c *WSClient) SubscribeOrderbook(symbol string) (<-chan WSNotificationOrderbookUpdate, <-chan WSNotificationOrderbookSnapshot, ...) + func (c *WSClient) SubscribeTicker(symbol string) (<-chan WSNotificationTickerResponse, error) + func (c *WSClient) SubscribeTrades(symbol string) (<-chan WSNotificationTradesUpdate, <-chan WSNotificationTradesSnapshot, error) + func (c *WSClient) UnsubscribeCandles(symbol string, timeframe string) error + func (c *WSClient) UnsubscribeOrderbook(symbol string) error + func (c *WSClient) UnsubscribeTicker(symbol string) error + func (c *WSClient) UnsubscribeTrades(symbol string) error + type WSGetCurrencyRequest struct + Currency string + type WSGetCurrencyResponse struct + Crypto bool + Delisted bool + FullName string + ID string + PayinConfirmations int + PayinEnabled bool + PayinPaymentID bool + PayoutEnabled bool + PayoutFee string + PayoutIsPaymentID bool + TransferEnabled bool + type WSGetSymbolRequest struct + Symbol string + type WSGetSymbolResponse struct + BaseCurrency string + FeeCurrency string + ID string + ProvideLiquidityRate string + QuantityIncrement string + QuoteCurrency string + TakeLiquidityRate string + TickSize string + type WSGetTradesRequest struct + By string + From *time.Time + Limit int + Offset *string + Sort string + Symbol string + Till *time.Time + type WSGetTradesResponse struct + Data []WSTrades + type WSNotificationCandlesSnapshot struct + Data []WSCandles + Period string + Symbol string + type WSNotificationCandlesUpdate struct + Data WSCandles + Period string + Symbol string + type WSNotificationOrderbookSnapshot struct + Ask []WSSubtypeTrade + Bid []WSSubtypeTrade + Sequence int64 + Symbol string + type WSNotificationOrderbookUpdate struct + Ask []WSSubtypeTrade + Bid []WSSubtypeTrade + Sequence int64 + Symbol string + type WSNotificationTickerResponse struct + Ask string + Bid string + High string + Last string + Low string + Open string + Symbol string + Timestamp string + Volume string + VolumeQuote string + type WSNotificationTradesSnapshot struct + Data []WSTrades + Symbol string + type WSNotificationTradesUpdate struct + Data WSTrades + Symbol string + type WSSubscriptionRequest struct + Symbol string + type WSSubtypeTrade struct + Price string + Size string + type WSTrades struct + ID int + Price string + Quantity string + Side string + Timestamp string