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