okex_futures_broker

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 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 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 (b *OKEXSwapBroker) AmendOrder(symbol string, id string, price float64, size float64) (result Order, err error)

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

func (*OKEXSwapBroker) PlaceOrder

func (b *OKEXSwapBroker) 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 (*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)

设置杠杆大小

Jump to

Keyboard shortcuts

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