okex_futures_broker

package
v0.9.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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 (b *OKEXFuturesBroker) AmendOrder(symbol string, id string, price float64, size float64) (result Order, err error)

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 (b *OKEXFuturesBroker) GetRecords(symbol string, period string, from int64, end int64, limit int) (records []Record, err error)

func (*OKEXFuturesBroker) PlaceOrder

func (b *OKEXFuturesBroker) PlaceOrder(symbol string, direction Direction, orderType OrderType, price float64,
	stopPx float64, size float64, postOnly bool, reduceOnly bool, params map[string]interface{}) (result Order, err error)

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)

设置杠杆大小

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL