Documentation ¶
Index ¶
- Constants
- func Sym2duo(pair string) q.D
- type Hitbtc
- func (hitbtc *Hitbtc) AllTicker(SymPair map[string]q.D) (mdt *sync.Map, err error)
- func (hitbtc *Hitbtc) Balances() (availables, frozens *sync.Map, err error)
- func (hitbtc *Hitbtc) CancelOrder(orderId string, currency cons.CurrencyPair) (bool, error)
- func (hitbtc *Hitbtc) Fee() float64
- func (hitbtc *Hitbtc) GetAccount() (*exws.Account, error)
- func (hitbtc *Hitbtc) GetAttr() (a q.Attr)
- func (hitbtc *Hitbtc) GetDepth(size int, currency cons.CurrencyPair) (*exws.Depth, error)
- func (hitbtc *Hitbtc) GetKline(currencyPair cons.CurrencyPair, period string, size, since int64) ([]exws.Kline, error)
- func (hitbtc *Hitbtc) GetKlineRecords(currency cons.CurrencyPair, period cons.KlinePeriod, size int, ...) ([]exws.Kline, error)
- func (hitbtc *Hitbtc) GetOneOrder(orderId string, currency cons.CurrencyPair) (*q.Order, error)
- func (hitbtc *Hitbtc) GetOrderHistorys(currency cons.CurrencyPair, optional ...exws.OptionalParameter) ([]q.Order, error)
- func (hitbtc *Hitbtc) GetSymbols() ([]cons.CurrencyPair, error)
- func (hitbtc *Hitbtc) GetTicker(currency cons.CurrencyPair) (*exws.Ticker, error)
- func (hitbtc *Hitbtc) GetTrades(currencyPair cons.CurrencyPair, since int64) ([]q.Trade, error)
- func (hitbtc *Hitbtc) GetUnfinishedOrders(currency cons.CurrencyPair) ([]q.Order, error)
- func (hitbtc *Hitbtc) LimitBuy(amount, price string, currency cons.CurrencyPair, ...) (*q.Order, error)
- func (hitbtc *Hitbtc) LimitSell(amount, price string, currency cons.CurrencyPair, ...) (*q.Order, error)
- func (hitbtc *Hitbtc) MarketBuy(amount, price string, currency cons.CurrencyPair) (*q.Order, error)
- func (hitbtc *Hitbtc) MarketSell(amount, price string, currency cons.CurrencyPair) (*q.Order, error)
- func (hitbtc *Hitbtc) OneTicker(d q.D) (ticker q.Bbo, err error)
- func (hitbtc *Hitbtc) PairArray() (sm map[string]q.D, prec map[q.D]q.P, err error)
- func (hitbtc *Hitbtc) PlaceOrders(places [3]q.Order) (orders [3]q.Order, err error)
- func (hitbtc *Hitbtc) String() string
- func (hitbtc *Hitbtc) Test() bool
- func (hitbtc *Hitbtc) TradeFee() (map[string]q.TradeFee, error)
- func (hitbtc *Hitbtc) WithdrawFee() (sf []q.NetworkWithdraw, err error)
Constants ¶
View Source
const ( EXCHANGE_NAME = "hitbtc.com" API_BASE_URL = "https://api.hitbtc.com/" API_V2 = "api/2/" SYMBOLS_URI = "public/symbol" TICKER_URI = "public/ticker/" BALANCE_URI = "account/balance" ORDER_URI = "order" DEPTH_URI = "public/orderbook" TRADES_URI = "public/trades" KLINE_URI = "public/candles" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hitbtc ¶
type Hitbtc struct {
// contains filtered or unexported fields
}
func (*Hitbtc) CancelOrder ¶
func (*Hitbtc) GetAccount ¶
func (*Hitbtc) GetDepth ¶
https://api.hitbtc.com/#orderbook
{ "ask": [ { "price": "0.046002", "size": "0.088" }, { "price": "0.046800", "size": "0.200" } ], "bid": [ { "price": "0.046001", "size": "0.005" }, { "price": "0.046000", "size": "0.200" } ] }
func (*Hitbtc) GetKline ¶
func (hitbtc *Hitbtc) GetKline(currencyPair cons.CurrencyPair, period string, size, since int64) ([]exws.Kline, error)
https://api.hitbtc.com/#candles
curl "https://api.hitbtc.com/api/2/public/candles/ETHBTC?period=M30" [
{ "timestamp": "2017-10-20T20:00:00.000Z", "open": "0.050459", "close": "0.050087", "min": "0.050000", "max": "0.050511", "volume": "1326.628", "volumeQuote": "66.555987736" }, { "timestamp": "2017-10-20T20:30:00.000Z", "open": "0.050108", "close": "0.050139", "min": "0.050068", "max": "0.050223", "volume": "87.515", "volumeQuote": "4.386062831" }
]
func (*Hitbtc) GetKlineRecords ¶
func (hitbtc *Hitbtc) GetKlineRecords(currency cons.CurrencyPair, period cons.KlinePeriod, size int, opt ...exws.OptionalParameter) ([]exws.Kline, error)
func (*Hitbtc) GetOneOrder ¶
func (*Hitbtc) GetOrderHistorys ¶
func (hitbtc *Hitbtc) GetOrderHistorys(currency cons.CurrencyPair, optional ...exws.OptionalParameter) ([]q.Order, error)
func (*Hitbtc) GetSymbols ¶
func (hitbtc *Hitbtc) GetSymbols() ([]cons.CurrencyPair, error)
https://api.hitbtc.com/#symbols
curl "https://api.hitbtc.com/api/2/public/symbol" [
{ "id": "ETHBTC", "baseCurrency": "ETH", "quoteCurrency": "BTC", "quantityIncrement": "0.001", "tickSize": "0.000001", "takeLiquidityRate": "0.001", "provideLiquidityRate": "-0.0001", "feeCurrency": "BTC" }
]
func (*Hitbtc) GetTicker ¶
https://api.hitbtc.com/#tickers
curl "https://api.hitbtc.com/api/2/public/ticker" [
{ "ask": "0.050043", "bid": "0.050042", "last": "0.050042", "open": "0.047800", "low": "0.047052", "high": "0.051679", "volume": "36456.720", "volumeQuote": "1782.625000", "timestamp": "2017-05-12T14:57:19.999Z", "symbol": "ETHBTC" }
]
func (*Hitbtc) GetTrades ¶
https://api.hitbtc.com/#trades
curl "https://api.hitbtc.com/api/2/public/trades/ETHBTC?from=2018-05-22T07:22:00&limit=2" [
{ "id" : 297604734, "timestamp" : "2018-05-22T07:23:06.556Z", "quantity" : "6.551", "side" : "sell", "price" : "0.083421" }, { "side" : "sell", "price" : "0.083401", "quantity" : "0.021", "timestamp" : "2018-05-22T07:23:05.908Z", "id" : 297604724 },
]
func (*Hitbtc) GetUnfinishedOrders ¶
func (*Hitbtc) LimitBuy ¶
func (hitbtc *Hitbtc) LimitBuy(amount, price string, currency cons.CurrencyPair, opt ...cons.LimitOrderOptionalParameter) (*q.Order, error)
func (*Hitbtc) LimitSell ¶
func (hitbtc *Hitbtc) LimitSell(amount, price string, currency cons.CurrencyPair, opt ...cons.LimitOrderOptionalParameter) (*q.Order, error)
func (*Hitbtc) MarketSell ¶
func (*Hitbtc) PlaceOrders ¶
func (*Hitbtc) WithdrawFee ¶
func (hitbtc *Hitbtc) WithdrawFee() (sf []q.NetworkWithdraw, err error)
Click to show internal directories.
Click to hide internal directories.