Documentation ¶
Index ¶
- type OKEXFuturesBroker
- func (b *OKEXFuturesBroker) AmendOrder(symbol string, id string, price float64, size float64) (result Order, err error)
- func (b *OKEXFuturesBroker) CancelAllOrders(symbol string) (err error)
- func (b *OKEXFuturesBroker) CancelOrder(symbol string, id string) (result Order, err error)
- func (b *OKEXFuturesBroker) GetAccountSummary(currency string) (result AccountSummary, err error)
- func (b *OKEXFuturesBroker) GetContractID() (symbol string, err error)
- func (b *OKEXFuturesBroker) GetName() (name string)
- func (b *OKEXFuturesBroker) GetOpenOrders(symbol string) (result []Order, err error)
- func (b *OKEXFuturesBroker) GetOrder(symbol string, id string) (result Order, err error)
- func (b *OKEXFuturesBroker) GetOrderBook(symbol string, depth int) (result OrderBook, err error)
- func (b *OKEXFuturesBroker) GetPosition(symbol string) (result Position, err error)
- func (b *OKEXFuturesBroker) GetRecords(symbol string, period string, from int64, end int64, limit int) (records []Record, err error)
- func (b *OKEXFuturesBroker) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64, ...) (result Order, err error)
- func (b *OKEXFuturesBroker) RunEventLoopOnce() (err error)
- func (b *OKEXFuturesBroker) SetContractType(pair string, contractType string) (err error)
- func (b *OKEXFuturesBroker) SetLeverRate(value float64) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OKEXFuturesBroker ¶
type OKEXFuturesBroker struct {
// contains filtered or unexported fields
}
OKEXFuturesBroker the OKEX futures broker
func NewBroker ¶
func NewBroker(addr string, accessKey string, secretKey string, passphrase string) *OKEXFuturesBroker
addr: https://www.okex.com/
func (*OKEXFuturesBroker) AmendOrder ¶
func (*OKEXFuturesBroker) CancelAllOrders ¶
func (b *OKEXFuturesBroker) CancelAllOrders(symbol string) (err error)
func (*OKEXFuturesBroker) CancelOrder ¶
func (b *OKEXFuturesBroker) CancelOrder(symbol string, id string) (result Order, err error)
func (*OKEXFuturesBroker) GetAccountSummary ¶
func (b *OKEXFuturesBroker) GetAccountSummary(currency string) (result AccountSummary, err error)
func (*OKEXFuturesBroker) GetContractID ¶
func (b *OKEXFuturesBroker) GetContractID() (symbol string, err error)
func (*OKEXFuturesBroker) GetName ¶ added in v0.9.7
func (b *OKEXFuturesBroker) GetName() (name string)
func (*OKEXFuturesBroker) GetOpenOrders ¶
func (b *OKEXFuturesBroker) GetOpenOrders(symbol string) (result []Order, err error)
func (*OKEXFuturesBroker) GetOrder ¶
func (b *OKEXFuturesBroker) GetOrder(symbol string, id string) (result Order, err error)
func (*OKEXFuturesBroker) GetOrderBook ¶
func (b *OKEXFuturesBroker) GetOrderBook(symbol string, depth int) (result OrderBook, err error)
func (*OKEXFuturesBroker) GetPosition ¶
func (b *OKEXFuturesBroker) GetPosition(symbol string) (result Position, err error)
func (*OKEXFuturesBroker) GetRecords ¶ added in v0.9.8
func (*OKEXFuturesBroker) PlaceOrder ¶
func (*OKEXFuturesBroker) RunEventLoopOnce ¶
func (b *OKEXFuturesBroker) RunEventLoopOnce() (err error)
func (*OKEXFuturesBroker) SetContractType ¶
func (b *OKEXFuturesBroker) SetContractType(pair string, contractType string) (err error)
设置合约类型 pair: BTC-USD contractType: W1,W2,Q1,Q2,...
func (*OKEXFuturesBroker) SetLeverRate ¶
func (b *OKEXFuturesBroker) SetLeverRate(value float64) (err error)
设置杠杆大小
Click to show internal directories.
Click to hide internal directories.