Documentation
¶
Index ¶
- type Btcc
- func (e *Btcc) AutoSleep()
- func (e *Btcc) CancelOrder(order Order) bool
- func (e *Btcc) GetAccount() interface{}
- func (e *Btcc) GetMinAmount(stock string) float64
- func (e *Btcc) GetName() string
- func (e *Btcc) GetOrder(stockType, id string) interface{}
- func (e *Btcc) GetOrders(stockType string) interface{}
- func (e *Btcc) GetRecords(stockType, period string, sizes ...interface{}) interface{}
- func (e *Btcc) GetTicker(stockType string, sizes ...interface{}) interface{}
- func (e *Btcc) GetTrades(stockType string) interface{}
- func (e *Btcc) GetType() string
- func (e *Btcc) Log(msgs ...interface{})
- func (e *Btcc) SetLimit(times interface{}) float64
- func (e *Btcc) Trade(tradeType string, stockType string, _price, _amount interface{}, ...) interface{}
- type Chbtc
- func (e *Chbtc) AutoSleep()
- func (e *Chbtc) CancelOrder(order Order) bool
- func (e *Chbtc) GetAccount() interface{}
- func (e *Chbtc) GetMinAmount(stock string) float64
- func (e *Chbtc) GetName() string
- func (e *Chbtc) GetOrder(stockType, id string) interface{}
- func (e *Chbtc) GetOrders(stockType string) interface{}
- func (e *Chbtc) GetRecords(stockType, period string, sizes ...interface{}) interface{}
- func (e *Chbtc) GetTicker(stockType string, sizes ...interface{}) interface{}
- func (e *Chbtc) GetTrades(stockType string) interface{}
- func (e *Chbtc) GetType() string
- func (e *Chbtc) Log(msgs ...interface{})
- func (e *Chbtc) SetLimit(times interface{}) float64
- func (e *Chbtc) Trade(tradeType string, stockType string, _price, _amount interface{}, ...) interface{}
- type Exchange
- type Huobi
- func (e *Huobi) AutoSleep()
- func (e *Huobi) CancelOrder(order Order) bool
- func (e *Huobi) GetAccount() interface{}
- func (e *Huobi) GetMinAmount(stock string) float64
- func (e *Huobi) GetName() string
- func (e *Huobi) GetOrder(stockType, id string) interface{}
- func (e *Huobi) GetOrders(stockType string) interface{}
- func (e *Huobi) GetRecords(stockType, period string, sizes ...interface{}) interface{}
- func (e *Huobi) GetTicker(stockType string, sizes ...interface{}) interface{}
- func (e *Huobi) GetTrades(stockType string) interface{}
- func (e *Huobi) GetType() string
- func (e *Huobi) Log(msgs ...interface{})
- func (e *Huobi) SetLimit(times interface{}) float64
- func (e *Huobi) Trade(tradeType string, stockType string, _price, _amount interface{}, ...) interface{}
- type OKCoinCn
- func (e *OKCoinCn) AutoSleep()
- func (e *OKCoinCn) CancelOrder(order Order) bool
- func (e *OKCoinCn) GetAccount() interface{}
- func (e *OKCoinCn) GetMinAmount(stock string) float64
- func (e *OKCoinCn) GetName() string
- func (e *OKCoinCn) GetOrder(stockType, id string) interface{}
- func (e *OKCoinCn) GetOrders(stockType string) interface{}
- func (e *OKCoinCn) GetRecords(stockType, period string, sizes ...interface{}) interface{}
- func (e *OKCoinCn) GetTicker(stockType string, sizes ...interface{}) interface{}
- func (e *OKCoinCn) GetTrades(stockType string) interface{}
- func (e *OKCoinCn) GetType() string
- func (e *OKCoinCn) Log(msgs ...interface{})
- func (e *OKCoinCn) SetLimit(times interface{}) float64
- func (e *OKCoinCn) Trade(tradeType string, stockType string, _price, _amount interface{}, ...) interface{}
- type OKCoinFuture
- func (e *OKCoinFuture) AutoSleep()
- func (e *OKCoinFuture) CancelOrder(order Order) bool
- func (e *OKCoinFuture) GetAccount() interface{}
- func (e *OKCoinFuture) GetMinAmount(stock string) float64
- func (e *OKCoinFuture) GetName() string
- func (e *OKCoinFuture) GetOrder(stockType, id string) interface{}
- func (e *OKCoinFuture) GetOrders(stockType string) interface{}
- func (e *OKCoinFuture) GetPositions(stockType string) interface{}
- func (e *OKCoinFuture) GetRecords(stockType, period string, sizes ...interface{}) interface{}
- func (e *OKCoinFuture) GetTicker(stockType string, sizes ...interface{}) interface{}
- func (e *OKCoinFuture) GetTrades(stockType string) interface{}
- func (e *OKCoinFuture) GetType() string
- func (e *OKCoinFuture) Log(msgs ...interface{})
- func (e *OKCoinFuture) SetLimit(times interface{}) float64
- func (e *OKCoinFuture) Trade(tradeType string, stockType string, _price, _amount interface{}, ...) interface{}
- type OandaV20
- func (e *OandaV20) AutoSleep()
- func (e *OandaV20) CancelOrder(order Order) bool
- func (e *OandaV20) GetAccount() interface{}
- func (e *OandaV20) GetMinAmount(stock string) float64
- func (e *OandaV20) GetName() string
- func (e *OandaV20) GetOrder(stockType, id string) interface{}
- func (e *OandaV20) GetOrders(stockType string) interface{}
- func (e *OandaV20) GetPositions(stockType string) interface{}
- func (e *OandaV20) GetRecords(stockType, period string, sizes ...interface{}) interface{}
- func (e *OandaV20) GetTicker(stockType string, sizes ...interface{}) interface{}
- func (e *OandaV20) GetTrades(stockType string) interface{}
- func (e *OandaV20) GetType() string
- func (e *OandaV20) Log(msgs ...interface{})
- func (e *OandaV20) SetLimit(times interface{}) float64
- func (e *OandaV20) Trade(tradeType string, stockType string, _price, _amount interface{}, ...) interface{}
- type Option
- type Order
- type OrderBook
- type Poloniex
- func (e *Poloniex) AutoSleep()
- func (e *Poloniex) CancelOrder(order Order) bool
- func (e *Poloniex) GetAccount() interface{}
- func (e *Poloniex) GetMinAmount(stock string) float64
- func (e *Poloniex) GetName() string
- func (e *Poloniex) GetOrder(stockType, id string) interface{}
- func (e *Poloniex) GetOrders(stockType string) interface{}
- func (e *Poloniex) GetRecords(stockType, period string, sizes ...interface{}) interface{}
- func (e *Poloniex) GetTicker(stockType string, sizes ...interface{}) interface{}
- func (e *Poloniex) GetTrades(stockType string) interface{}
- func (e *Poloniex) GetType() string
- func (e *Poloniex) Log(msgs ...interface{})
- func (e *Poloniex) SetLimit(times interface{}) float64
- func (e *Poloniex) Trade(tradeType string, stockType string, _price, _amount interface{}, ...) interface{}
- type Position
- type Record
- type Ticker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Btcc ¶
type Btcc struct {
// contains filtered or unexported fields
}
Btcc the exchange struct of btcc.com
func (*Btcc) AutoSleep ¶
func (e *Btcc) AutoSleep()
AutoSleep auto sleep to achieve the limit calls amount per second of this exchange
func (*Btcc) GetAccount ¶
func (e *Btcc) GetAccount() interface{}
GetAccount get the account detail of this exchange
func (*Btcc) GetMinAmount ¶
GetMinAmount get the min trade amonut of this exchange
func (*Btcc) GetRecords ¶
GetRecords get candlestick data
type Chbtc ¶
type Chbtc struct {
// contains filtered or unexported fields
}
Chbtc the exchange struct of chbtc.com
func (*Chbtc) AutoSleep ¶
func (e *Chbtc) AutoSleep()
AutoSleep auto sleep to achieve the limit calls amount per second of this exchange
func (*Chbtc) CancelOrder ¶
CancelOrder cancel an order
func (*Chbtc) GetAccount ¶
func (e *Chbtc) GetAccount() interface{}
GetAccount get the account detail of this exchange
func (*Chbtc) GetMinAmount ¶
GetMinAmount get the min trade amonut of this exchange
func (*Chbtc) GetRecords ¶
GetRecords get candlestick data
type Exchange ¶
type Exchange interface { Log(...interface{}) GetType() string GetName() string SetLimit(times interface{}) float64 AutoSleep() GetMinAmount(stock string) float64 GetAccount() interface{} Trade(tradeType string, stockType string, price, amount interface{}, msgs ...interface{}) interface{} GetOrder(stockType, id string) interface{} GetOrders(stockType string) interface{} GetTrades(stockType string) interface{} CancelOrder(order Order) bool GetTicker(stockType string, sizes ...interface{}) interface{} GetRecords(stockType, period string, sizes ...interface{}) interface{} }
Exchange interface
func NewOKCoinCn ¶
NewOKCoinCn create an exchange struct of okcoin.cn
func NewOKCoinFuture ¶
NewOKCoinFuture create an exchange struct of okcoin.cn
func NewOandaV20 ¶
NewOandaV20 create an exchange struct of okcoin.cn
func NewPoloniex ¶
NewPoloniex create an exchange struct of poloniex
type Huobi ¶
type Huobi struct {
// contains filtered or unexported fields
}
Huobi the exchange struct of huobi.com
func (*Huobi) AutoSleep ¶
func (e *Huobi) AutoSleep()
AutoSleep auto sleep to achieve the limit calls amount per second of this exchange
func (*Huobi) CancelOrder ¶
CancelOrder cancel an order
func (*Huobi) GetAccount ¶
func (e *Huobi) GetAccount() interface{}
GetAccount get the account detail of this exchange
func (*Huobi) GetMinAmount ¶
GetMinAmount get the min trade amonut of this exchange
func (*Huobi) GetRecords ¶
GetRecords get candlestick data
type OKCoinCn ¶
type OKCoinCn struct {
// contains filtered or unexported fields
}
OKCoinCn the exchange struct of okcoin.cn
func (*OKCoinCn) AutoSleep ¶
func (e *OKCoinCn) AutoSleep()
AutoSleep auto sleep to achieve the limit calls amount per second of this exchange
func (*OKCoinCn) CancelOrder ¶
CancelOrder cancel an order
func (*OKCoinCn) GetAccount ¶
func (e *OKCoinCn) GetAccount() interface{}
GetAccount get the account detail of this exchange
func (*OKCoinCn) GetMinAmount ¶
GetMinAmount get the min trade amonut of this exchange
func (*OKCoinCn) GetRecords ¶
GetRecords get candlestick data
type OKCoinFuture ¶
type OKCoinFuture struct {
// contains filtered or unexported fields
}
OKCoinFuture the exchange struct of okcoin.com future
func (*OKCoinFuture) AutoSleep ¶
func (e *OKCoinFuture) AutoSleep()
AutoSleep auto sleep to achieve the limit calls amount per second of this exchange
func (*OKCoinFuture) CancelOrder ¶
func (e *OKCoinFuture) CancelOrder(order Order) bool
CancelOrder cancel an order
func (*OKCoinFuture) GetAccount ¶
func (e *OKCoinFuture) GetAccount() interface{}
GetAccount get the account detail of this exchange
func (*OKCoinFuture) GetMinAmount ¶
func (e *OKCoinFuture) GetMinAmount(stock string) float64
GetMinAmount get the min trade amonut of this exchange
func (*OKCoinFuture) GetName ¶
func (e *OKCoinFuture) GetName() string
GetName get the name of this exchange
func (*OKCoinFuture) GetOrder ¶
func (e *OKCoinFuture) GetOrder(stockType, id string) interface{}
GetOrder get details of an order
func (*OKCoinFuture) GetOrders ¶
func (e *OKCoinFuture) GetOrders(stockType string) interface{}
GetOrders get all unfilled orders
func (*OKCoinFuture) GetPositions ¶
func (e *OKCoinFuture) GetPositions(stockType string) interface{}
GetPositions get the positions detail of this exchange
func (*OKCoinFuture) GetRecords ¶
func (e *OKCoinFuture) GetRecords(stockType, period string, sizes ...interface{}) interface{}
GetRecords get candlestick data
func (*OKCoinFuture) GetTicker ¶
func (e *OKCoinFuture) GetTicker(stockType string, sizes ...interface{}) interface{}
GetTicker get market ticker & depth
func (*OKCoinFuture) GetTrades ¶
func (e *OKCoinFuture) GetTrades(stockType string) interface{}
GetTrades get all filled orders recently
func (*OKCoinFuture) GetType ¶
func (e *OKCoinFuture) GetType() string
GetType get the type of this exchange
func (*OKCoinFuture) Log ¶
func (e *OKCoinFuture) Log(msgs ...interface{})
Log print something to console
func (*OKCoinFuture) SetLimit ¶
func (e *OKCoinFuture) SetLimit(times interface{}) float64
SetLimit set the limit calls amount per second of this exchange
func (*OKCoinFuture) Trade ¶
func (e *OKCoinFuture) Trade(tradeType string, stockType string, _price, _amount interface{}, msgs ...interface{}) interface{}
Trade place an order
type OandaV20 ¶
type OandaV20 struct {
// contains filtered or unexported fields
}
OandaV20 the exchange struct of oanda.com v20
func (*OandaV20) AutoSleep ¶
func (e *OandaV20) AutoSleep()
AutoSleep auto sleep to achieve the limit calls amount per second of this exchange
func (*OandaV20) CancelOrder ¶
CancelOrder cancel an order
func (*OandaV20) GetAccount ¶
func (e *OandaV20) GetAccount() interface{}
GetAccount get the account detail of this exchange
func (*OandaV20) GetMinAmount ¶
GetMinAmount get the min trade amonut of this exchange
func (*OandaV20) GetPositions ¶
GetPositions get the positions detail of this exchange
func (*OandaV20) GetRecords ¶
GetRecords get candlestick data
type Order ¶
type Order struct { ID string Price float64 Amount float64 DealAmount float64 Fee float64 TradeType string StockType string }
Order struct
type Poloniex ¶
type Poloniex struct {
// contains filtered or unexported fields
}
Poloniex the exchange struct of poloniex
func (*Poloniex) AutoSleep ¶
func (e *Poloniex) AutoSleep()
AutoSleep auto sleep to achieve the limit calls amount per second of this exchange
func (*Poloniex) CancelOrder ¶
CancelOrder cancel an order
func (*Poloniex) GetAccount ¶
func (e *Poloniex) GetAccount() interface{}
GetAccount get the account detail of this exchange
func (*Poloniex) GetMinAmount ¶
GetMinAmount get the min trade amonut of this exchange
func (*Poloniex) GetRecords ¶
GetRecords get candlestick data
type Position ¶
type Position struct { Price float64 Leverage int Amount float64 ConfirmAmount float64 FrozenAmount float64 Profit float64 ContractType string TradeType string StockType string }
Position struct