Documentation
¶
Index ¶
- Constants
- Variables
- type Hitbtc
- func (hitbtc *Hitbtc) CancelOrder(orderId string, currency goex.CurrencyPair) (bool, error)
- func (hitbtc *Hitbtc) GetAccount() (*goex.Account, error)
- func (hitbtc *Hitbtc) GetDepth(size int, currency goex.CurrencyPair) (*goex.Depth, error)
- func (hitbtc *Hitbtc) GetExchangeName() string
- func (hitbtc *Hitbtc) GetKline(currencyPair goex.CurrencyPair, period string, size, since int64) ([]goex.Kline, error)
- func (hitbtc *Hitbtc) GetKlineRecords(currency goex.CurrencyPair, period, size, since int) ([]goex.Kline, error)
- func (hitbtc *Hitbtc) GetOneOrder(orderId string, currency goex.CurrencyPair) (*goex.Order, error)
- func (hitbtc *Hitbtc) GetOrderHistorys(currency goex.CurrencyPair, currentPage, pageSize int) ([]goex.Order, error)
- func (hitbtc *Hitbtc) GetSymbols() ([]goex.CurrencyPair, error)
- func (hitbtc *Hitbtc) GetTicker(currency goex.CurrencyPair) (*goex.Ticker, error)
- func (hitbtc *Hitbtc) GetTrades(currencyPair goex.CurrencyPair, since int64) ([]goex.Trade, error)
- func (hitbtc *Hitbtc) GetUnfinishOrders(currency goex.CurrencyPair) ([]goex.Order, error)
- func (hitbtc *Hitbtc) LimitBuy(amount, price string, currency goex.CurrencyPair) (*goex.Order, error)
- func (hitbtc *Hitbtc) LimitSell(amount, price string, currency goex.CurrencyPair) (*goex.Order, error)
- func (hitbtc *Hitbtc) MarketBuy(amount, price string, currency goex.CurrencyPair) (*goex.Order, error)
- func (hitbtc *Hitbtc) MarketSell(amount, price string, currency goex.CurrencyPair) (*goex.Order, 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 ¶
View Source
var ( YCC = goex.Currency{"YCC", "Yuan Chain New"} BTC = goex.Currency{"BTC", "Bitcoin"} YCC_BTC = goex.CurrencyPair{YCC, BTC} )
Functions ¶
This section is empty.
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) GetExchangeName ¶
func (*Hitbtc) GetKline ¶
func (hitbtc *Hitbtc) GetKline(currencyPair goex.CurrencyPair, period string, size, since int64) ([]goex.Kline, error)
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) GetOneOrder ¶
func (*Hitbtc) GetOrderHistorys ¶
func (*Hitbtc) GetSymbols ¶
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 ¶
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 ¶
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) GetUnfinishOrders ¶
func (*Hitbtc) MarketSell ¶
Click to show internal directories.
Click to hide internal directories.