gvmbot

package
v0.0.0-...-a30bb73 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange struct {
	UserConfig  *bbgo.Config
	Stream      types.Stream
	Session     *bbgo.ExchangeSession
	SessionName string
	Symbol      string
	ExchangeId  string
	// contains filtered or unexported fields
}

func New

func New(dotenvFile string, configFile string, exchangeId string) *Exchange

func (*Exchange) Cancel

func (e *Exchange) Cancel(id string, args ...any)

func (*Exchange) CancelAll

func (ex *Exchange) CancelAll(args ...any)

* strategy.cancel_all() → void

func (Exchange) CloseOrder

func (ex Exchange) CloseOrder(side u8.Side, options *Options)

func (Exchange) Entry

func (ex Exchange) Entry(id string, side u8.Side, data map[string]interface{})

func (Exchange) Exit

func (ex Exchange) Exit(id string, side u8.Side, data map[string]interface{})

市价平仓

func (Exchange) GetAccount

func (ex Exchange) GetAccount() (err error)

func (Exchange) GetBalance

func (ex Exchange) GetBalance() (balance *types.Balance, ok error)

func (Exchange) GetPostions

func (ex Exchange) GetPostions() (err error)

func (Exchange) GetTrades

func (ex Exchange) GetTrades() (err error)

func (Exchange) OpenOrder

func (ex Exchange) OpenOrder(side u8.Side, options *Options)

func (Exchange) RealPostions

func (ex Exchange) RealPostions() (postionsList []*types.Positions, err error)

func (Exchange) SubKline

func (ex Exchange) SubKline() (err error)

func (Exchange) SubmitOrder

func (ex Exchange) SubmitOrder(createdOrder types.SubmitOrder) (err error)

type Options

type Options struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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