Documentation ¶
Index ¶
- Constants
- Variables
- type BTCC
- func (b *BTCC) CancelIcebergOrder(orderID int64, market string)
- func (b *BTCC) CancelOrder(orderID int64, market string)
- func (b *BTCC) CancelStopOrder(orderID int64, market string)
- func (b *BTCC) GetAccountInfo(infoType string) error
- func (b *BTCC) GetDeposits(currency string, pending bool)
- func (b *BTCC) GetExchangeAccountInfo() (exchange.AccountInfo, error)
- func (b *BTCC) GetFee() float64
- func (b *BTCC) GetIcebergOrder(orderID int64, market string)
- func (b *BTCC) GetIcebergOrders(limit, offset int64, market string)
- func (b *BTCC) GetMarketDepth(market string, limit int64)
- func (b *BTCC) GetOrder(orderID int64, market string, detailed bool)
- func (b *BTCC) GetOrderBook(currencyPair string, limit int) (Orderbook, error)
- func (b *BTCC) GetOrderbookEx(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (b *BTCC) GetOrders(openonly bool, market string, limit, offset, since int64, detailed bool)
- func (b *BTCC) GetStopOrder(orderID int64, market string)
- func (b *BTCC) GetStopOrders(status, orderType string, stopPrice float64, limit, offset int64, ...)
- func (b *BTCC) GetTicker(currencyPair string) (Ticker, error)
- func (b *BTCC) GetTickerPrice(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (b *BTCC) GetTradeHistory(currencyPair string, limit, sinceTid int64, time time.Time) ([]Trade, error)
- func (b *BTCC) GetTradesLast24h(currencyPair string) ([]Trade, error)
- func (b *BTCC) GetTransactions(transType string, limit, offset, since int64, sinceType string)
- func (b *BTCC) GetWithdrawal(withdrawalID int64, currency string)
- func (b *BTCC) GetWithdrawals(currency string, pending bool)
- func (b *BTCC) IcebergOrder(buyOrder bool, price, amount, discAmount, variance float64, market string)
- func (b *BTCC) OnConnect(output chan socketio.Message)
- func (b *BTCC) OnDisconnect(output chan socketio.Message)
- func (b *BTCC) OnError()
- func (b *BTCC) OnGroupOrder(message []byte, output chan socketio.Message)
- func (b *BTCC) OnMessage(message []byte, output chan socketio.Message)
- func (b *BTCC) OnTicker(message []byte, output chan socketio.Message)
- func (b *BTCC) OnTrade(message []byte, output chan socketio.Message)
- func (b *BTCC) PlaceOrder(buyOrder bool, price, amount float64, market string)
- func (b *BTCC) PlaceStopOrder(buyOder bool, stopPrice, price, amount, trailingAmt, trailingPct float64, ...)
- func (b *BTCC) RequestWithdrawal(currency string, amount float64)
- func (b *BTCC) Run()
- func (b *BTCC) SendAuthenticatedHTTPRequest(method string, params []interface{}) (err error)
- func (b *BTCC) SetDefaults()
- func (b *BTCC) Setup(exch config.ExchangeConfig)
- func (b *BTCC) Start()
- func (b *BTCC) UpdateOrderbook(p pair.CurrencyPair, assetType string) (orderbook.Base, error)
- func (b *BTCC) UpdateTicker(p pair.CurrencyPair, assetType string) (ticker.Price, error)
- func (b *BTCC) WebsocketClient()
- type BidAsk
- type CurrencyGeneric
- type Deposit
- type Depth
- type IcebergOrder
- type Order
- type OrderDetail
- type Orderbook
- type Profile
- type Response
- type StopOrder
- type Ticker
- type Trade
- type Transaction
- type WebsocketGroupOrder
- type WebsocketOrder
- type WebsocketTicker
- type WebsocketTrade
- type Withdrawal
Constants ¶
const (
BTCC_SOCKETIO_ADDRESS = "https://websocket.btcc.com"
)
Variables ¶
var BTCCSocket *socketio.SocketIO
Functions ¶
This section is empty.
Types ¶
type BTCC ¶
type BTCC struct {
exchange.Base
}
BTCC is the main overaching type across the BTCC package
func (*BTCC) CancelIcebergOrder ¶
func (*BTCC) CancelOrder ¶
func (*BTCC) CancelStopOrder ¶
func (*BTCC) GetAccountInfo ¶
func (*BTCC) GetDeposits ¶
func (*BTCC) GetExchangeAccountInfo ¶
func (b *BTCC) GetExchangeAccountInfo() (exchange.AccountInfo, error)
GetExchangeAccountInfo : Retrieves balances for all enabled currencies for the Kraken exchange - TODO
func (*BTCC) GetIcebergOrder ¶
func (*BTCC) GetIcebergOrders ¶
func (*BTCC) GetMarketDepth ¶
func (*BTCC) GetOrderBook ¶
GetOrderBook returns current market order book currencyPair - Example "btccny", "ltccny" or "ltcbtc" limit - limits the returned trades example "10" if 0 will return full orderbook
func (*BTCC) GetOrderbookEx ¶
GetOrderbookEx returns the orderbook for a currency pair
func (*BTCC) GetStopOrder ¶
func (*BTCC) GetStopOrders ¶
func (*BTCC) GetTicker ¶
GetTicker returns ticker information currencyPair - Example "btccny", "ltccny" or "ltcbtc"
func (*BTCC) GetTickerPrice ¶
GetTickerPrice returns the ticker for a currency pair
func (*BTCC) GetTradeHistory ¶
func (b *BTCC) GetTradeHistory(currencyPair string, limit, sinceTid int64, time time.Time) ([]Trade, error)
GetTradeHistory returns trade history data currencyPair - Example "btccny", "ltccny" or "ltcbtc" limit - limits the returned trades example "10" sinceTid - returns trade records starting from id supplied example "5000" time - returns trade records starting from unix time 1406794449
func (*BTCC) GetTradesLast24h ¶
GetTradesLast24h returns the trades executed on the exchange over the past 24 hours by currency pair currencyPair - Example "btccny", "ltccny" or "ltcbtc"
func (*BTCC) GetTransactions ¶
func (*BTCC) GetWithdrawal ¶
func (*BTCC) GetWithdrawals ¶
func (*BTCC) IcebergOrder ¶
func (*BTCC) OnDisconnect ¶
func (*BTCC) OnGroupOrder ¶
func (*BTCC) PlaceOrder ¶
func (*BTCC) PlaceStopOrder ¶
func (*BTCC) RequestWithdrawal ¶
func (*BTCC) SendAuthenticatedHTTPRequest ¶
func (*BTCC) SetDefaults ¶
func (b *BTCC) SetDefaults()
SetDefaults sets default values for the exchange
func (*BTCC) Setup ¶
func (b *BTCC) Setup(exch config.ExchangeConfig)
Setup is run on startup to setup exchange with config values
func (*BTCC) UpdateOrderbook ¶
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*BTCC) UpdateTicker ¶
UpdateTicker updates and returns the ticker for a currency pair
func (*BTCC) WebsocketClient ¶
func (b *BTCC) WebsocketClient()
type CurrencyGeneric ¶
type CurrencyGeneric struct { Currency string Symbol string Amount string AmountInt int64 `json:"amount_integer"` AmountDecimal float64 `json:"amount_decimal"` }
CurrencyGeneric holds currency information
type Deposit ¶
type Deposit struct { ID int64 Address string Currency string Amount float64 Date int64 Status string }
Deposit holds deposit address information
type IcebergOrder ¶
type IcebergOrder struct { ID int64 Type string Price float64 Market string Amount float64 AmountOrig float64 `json:"amount_original"` DisclosedAmount float64 `json:"disclosed_amount"` Variance float64 Date int64 Status string }
IcebergOrder holds iceberg lettuce
type Order ¶
type Order struct { ID int64 Type string Price float64 Currency string Amount float64 AmountOrig float64 `json:"amount_original"` Date int64 Status string Detail OrderDetail }
Order holds order information
type OrderDetail ¶
OrderDetail holds order detail information
type Orderbook ¶
type Orderbook struct { Bids [][]float64 `json:"bids"` Asks [][]float64 `json:"asks"` Date int64 `json:"date"` }
Orderbook holds orderbook data
type Profile ¶
type Profile struct { Username string TradePasswordEnabled bool `json:"trade_password_enabled,bool"` OTPEnabled bool `json:"otp_enabled,bool"` TradeFee float64 `json:"trade_fee"` TradeFeeCNYLTC float64 `json:"trade_fee_cnyltc"` TradeFeeBTCLTC float64 `json:"trade_fee_btcltc"` DailyBTCLimit float64 `json:"daily_btc_limit"` DailyLTCLimit float64 `json:"daily_ltc_limit"` BTCDespoitAddress string `json:"btc_despoit_address"` BTCWithdrawalAddress string `json:"btc_withdrawal_address"` LTCDepositAddress string `json:"ltc_deposit_address"` LTCWithdrawalAddress string `json:"ltc_withdrawal_request"` APIKeyPermission int64 `json:"api_key_permission"` }
Profile holds profile information
type Response ¶
type Response struct { Ticker Ticker `json:"ticker"` BtcCny Ticker `json:"ticker_btccny"` LtcCny Ticker `json:"ticker_ltccny"` LtcBtc Ticker `json:"ticker_ltcbtc"` }
Response is the generalized response type
type StopOrder ¶
type StopOrder struct { ID int64 Type string StopPrice float64 `json:"stop_price"` TrailingAmt float64 `json:"trailing_amount"` TrailingPct float64 `json:"trailing_percentage"` Price float64 Market string Amount float64 Date int64 Status string OrderID int64 `json:"order_id"` }
StopOrder holds stop order information
type Ticker ¶
type Ticker struct { High float64 `json:"high,string"` Low float64 `json:"low,string"` Buy float64 `json:"buy,string"` Sell float64 `json:"sell,string"` Last float64 `json:"last,string"` Vol float64 `json:"vol,string"` Date int64 `json:"date"` Vwap float64 `json:"vwap,string"` PrevClose float64 `json:"prev_close,string"` Open float64 `json:"open,string"` }
Ticker holds basic ticker information
type Trade ¶
type Trade struct { Date int64 `json:"date,string"` Price float64 `json:"price"` Amount float64 `json:"amount"` TID int64 `json:"tid,string"` Type string `json:"type"` }
Trade holds executed trade data
type Transaction ¶
type Transaction struct { ID int64 Type string BTCAmount float64 `json:"btc_amount"` LTCAmount float64 `json:"ltc_amount"` CNYAmount float64 `json:"cny_amount"` Date int64 }
Transaction holds transaction information
type WebsocketGroupOrder ¶
type WebsocketGroupOrder struct { Asks []WebsocketOrder `json:"ask"` Bids []WebsocketOrder `json:"bid"` Market string `json:"market"` }
WebsocketGroupOrder holds websocket group order book information
type WebsocketOrder ¶
type WebsocketOrder struct { Price float64 `json:"price"` TotalAmount float64 `json:"totalamount"` Type string `json:"type"` }
WebsocketOrder holds websocket order information
type WebsocketTicker ¶
type WebsocketTicker struct { Buy float64 `json:"buy"` Date float64 `json:"date"` High float64 `json:"high"` Last float64 `json:"last"` Low float64 `json:"low"` Market string `json:"market"` Open float64 `json:"open"` PrevClose float64 `json:"prev_close"` Sell float64 `json:"sell"` Volume float64 `json:"vol"` Vwap float64 `json:"vwap"` }
WebsocketTicker holds websocket ticker information