Documentation ¶
Index ¶
- type OkexSwap
- func (b *OkexSwap) AmendOrder(symbol string, id string, price float64, size float64, opts ...OrderOption) (result *Order, err error)
- func (b *OkexSwap) CancelAllOrders(symbol string, opts ...OrderOption) (err error)
- func (b *OkexSwap) CancelOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error)
- func (b *OkexSwap) CloseLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)
- func (b *OkexSwap) CloseShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)
- func (b *OkexSwap) GetBalance(currency string) (result *Balance, err error)
- func (b *OkexSwap) GetContractID() (symbol string, err error)
- func (b *OkexSwap) GetName() (name string)
- func (b *OkexSwap) GetOpenOrders(symbol string, opts ...OrderOption) (result []*Order, err error)
- func (b *OkexSwap) GetOrder(symbol string, id string, opts ...OrderOption) (result *Order, err error)
- func (b *OkexSwap) GetOrderBook(symbol string, depth int) (result *OrderBook, err error)
- func (b *OkexSwap) GetPositions(symbol string) (result []*Position, err error)
- func (b *OkexSwap) GetRecords(symbol string, period string, from int64, end int64, limit int) (records []*Record, err error)
- func (b *OkexSwap) GetTime() (tm int64, err error)
- func (b *OkexSwap) OpenLong(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)
- func (b *OkexSwap) OpenShort(symbol string, orderType OrderType, price float64, size float64) (result *Order, err error)
- func (b *OkexSwap) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64, ...) (result *Order, err error)
- func (b *OkexSwap) SetContractType(currencyPair string, contractType string) (err error)
- func (b *OkexSwap) SetLeverRate(value float64) (err error)
- func (b *OkexSwap) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error
- func (b *OkexSwap) SubscribeOrders(market Market, callback func(orders []*Order)) error
- func (b *OkexSwap) SubscribePositions(market Market, callback func(positions []*Position)) error
- func (b *OkexSwap) SubscribeTrades(market Market, callback func(trades []*Trade)) error
- type SwapWebSocket
- func (s *SwapWebSocket) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error
- func (s *SwapWebSocket) SubscribeOrders(market Market, callback func(orders []*Order)) error
- func (s *SwapWebSocket) SubscribePositions(market Market, callback func(positions []*Position)) error
- func (s *SwapWebSocket) SubscribeTrades(market Market, callback func(trades []*Trade)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OkexSwap ¶
type OkexSwap struct {
// contains filtered or unexported fields
}
OkexSwap the Okex swap exchange
func NewOkexSwap ¶
func NewOkexSwap(params *Parameters) *OkexSwap
func (*OkexSwap) AmendOrder ¶
func (*OkexSwap) CancelAllOrders ¶
func (*OkexSwap) CancelOrder ¶
func (*OkexSwap) CloseShort ¶ added in v1.1.3
func (*OkexSwap) GetBalance ¶
func (*OkexSwap) GetContractID ¶
func (*OkexSwap) GetOpenOrders ¶
func (*OkexSwap) GetOrderBook ¶
func (*OkexSwap) GetPositions ¶
func (*OkexSwap) GetRecords ¶
func (*OkexSwap) PlaceOrder ¶
func (*OkexSwap) SetContractType ¶
设置合约类型
func (*OkexSwap) SubscribeLevel2Snapshots ¶
func (*OkexSwap) SubscribeOrders ¶
func (*OkexSwap) SubscribePositions ¶
func (*OkexSwap) SubscribeTrades ¶
type SwapWebSocket ¶
type SwapWebSocket struct {
// contains filtered or unexported fields
}
func NewSwapWebSocket ¶
func NewSwapWebSocket(params *Parameters) *SwapWebSocket
func (*SwapWebSocket) SubscribeLevel2Snapshots ¶
func (s *SwapWebSocket) SubscribeLevel2Snapshots(market Market, callback func(ob *OrderBook)) error
func (*SwapWebSocket) SubscribeOrders ¶
func (s *SwapWebSocket) SubscribeOrders(market Market, callback func(orders []*Order)) error
func (*SwapWebSocket) SubscribePositions ¶
func (s *SwapWebSocket) SubscribePositions(market Market, callback func(positions []*Position)) error
func (*SwapWebSocket) SubscribeTrades ¶
func (s *SwapWebSocket) SubscribeTrades(market Market, callback func(trades []*Trade)) error
Click to show internal directories.
Click to hide internal directories.