Documentation ¶
Index ¶
- type OKEXFutures
- func (b *OKEXFutures) AmendOrder(symbol string, id string, price float64, size float64) (result Order, err error)
- func (b *OKEXFutures) CancelAllOrders(symbol string) (err error)
- func (b *OKEXFutures) CancelOrder(symbol string, id string) (result Order, err error)
- func (b *OKEXFutures) GetBalance(currency string) (result Balance, err error)
- func (b *OKEXFutures) GetContractID() (symbol string, err error)
- func (b *OKEXFutures) GetName() (name string)
- func (b *OKEXFutures) GetOpenOrders(symbol string) (result []Order, err error)
- func (b *OKEXFutures) GetOrder(symbol string, id string) (result Order, err error)
- func (b *OKEXFutures) GetOrderBook(symbol string, depth int) (result OrderBook, err error)
- func (b *OKEXFutures) GetPositions(symbol string) (result []Position, err error)
- func (b *OKEXFutures) GetRecords(symbol string, period string, from int64, end int64, limit int) (records []Record, err error)
- func (b *OKEXFutures) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64, ...) (result Order, err error)
- func (b *OKEXFutures) RunEventLoopOnce() (err error)
- func (b *OKEXFutures) SetContractType(pair string, contractType string) (err error)
- func (b *OKEXFutures) SetLeverRate(value float64) (err error)
- func (b *OKEXFutures) WS() (ws WebSocket, err error)
- type WS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OKEXFutures ¶
type OKEXFutures struct {
// contains filtered or unexported fields
}
OKEXFutures the OKEX futures broker
func New ¶
func New(params *Parameters) *OKEXFutures
func (*OKEXFutures) AmendOrder ¶
func (*OKEXFutures) CancelAllOrders ¶
func (b *OKEXFutures) CancelAllOrders(symbol string) (err error)
func (*OKEXFutures) CancelOrder ¶
func (b *OKEXFutures) CancelOrder(symbol string, id string) (result Order, err error)
func (*OKEXFutures) GetBalance ¶ added in v1.1.1
func (b *OKEXFutures) GetBalance(currency string) (result Balance, err error)
func (*OKEXFutures) GetContractID ¶
func (b *OKEXFutures) GetContractID() (symbol string, err error)
func (*OKEXFutures) GetName ¶
func (b *OKEXFutures) GetName() (name string)
func (*OKEXFutures) GetOpenOrders ¶
func (b *OKEXFutures) GetOpenOrders(symbol string) (result []Order, err error)
func (*OKEXFutures) GetOrder ¶
func (b *OKEXFutures) GetOrder(symbol string, id string) (result Order, err error)
func (*OKEXFutures) GetOrderBook ¶
func (b *OKEXFutures) GetOrderBook(symbol string, depth int) (result OrderBook, err error)
func (*OKEXFutures) GetPositions ¶ added in v1.0.0
func (b *OKEXFutures) GetPositions(symbol string) (result []Position, err error)
func (*OKEXFutures) GetRecords ¶
func (*OKEXFutures) PlaceOrder ¶
func (*OKEXFutures) RunEventLoopOnce ¶
func (b *OKEXFutures) RunEventLoopOnce() (err error)
func (*OKEXFutures) SetContractType ¶
func (b *OKEXFutures) SetContractType(pair string, contractType string) (err error)
设置合约类型 pair: BTC-USD contractType: W1,W2,Q1,Q2,...
func (*OKEXFutures) SetLeverRate ¶
func (b *OKEXFutures) SetLeverRate(value float64) (err error)
设置杠杆大小
func (*OKEXFutures) WS ¶ added in v1.0.0
func (b *OKEXFutures) WS() (ws WebSocket, err error)
type WS ¶
type WS struct {
// contains filtered or unexported fields
}
func (*WS) SubscribeLevel2Snapshots ¶
func (s *WS) SubscribeLevel2Snapshots(market Market)
func (*WS) SubscribeOrders ¶
func (s *WS) SubscribeOrders(market Market)
func (*WS) SubscribePositions ¶
func (s *WS) SubscribePositions(market Market)
func (*WS) SubscribeTrades ¶
func (s *WS) SubscribeTrades(market Market)
Click to show internal directories.
Click to hide internal directories.