exchange

package
v0.0.0-...-debd72c Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinanceFuture

type BinanceFuture struct {
	Exchange    *binance.Exchange
	MinProfit   fixedpoint.Value
	MaxProfit   fixedpoint.Value
	StopLoss    fixedpoint.Value
	StepProfit  fixedpoint.Value
	Markets     types.MarketMap
	Market      types.Market
	Ctx         context.Context
	Usdt        fixedpoint.Value
	Symbol      string
	CreateOrder *types.Order
	StopOrder   *types.Order

	PostionPrice fixedpoint.Value
	StopPrice    fixedpoint.Value

	ProfitOrder *types.Order
	ProfitPrice fixedpoint.Value
}

func NewBinanceFuture

func NewBinanceFuture() BinanceFuture

func (*BinanceFuture) CheckBalance

func (e *BinanceFuture) CheckBalance()

检测资产

func (*BinanceFuture) GetBinanceSymbols

func (e *BinanceFuture) GetBinanceSymbols() []config.Symbol

func (*BinanceFuture) InitData

func (e *BinanceFuture) InitData(data config.OrderInfo)

预处理数据

func (*BinanceFuture) InitKline

func (e *BinanceFuture) InitKline()

func (*BinanceFuture) Process

func (e *BinanceFuture) Process(price fixedpoint.Value)

func (*BinanceFuture) QueryMarket

func (e *BinanceFuture) QueryMarket() error

检测资产

func (*BinanceFuture) RunWebsocket

func (e *BinanceFuture) RunWebsocket(symbols []string)

func (*BinanceFuture) SubmitOrder

func (e *BinanceFuture) SubmitOrder()

下单

func (*BinanceFuture) SubmitProfitOrder

func (e *BinanceFuture) SubmitProfitOrder(price fixedpoint.Value)

移动止损

func (*BinanceFuture) SubmitStopOrder

func (e *BinanceFuture) SubmitStopOrder(price fixedpoint.Value)

移动止损

func (*BinanceFuture) TickPrice

func (e *BinanceFuture) TickPrice(symbol string)

获取实时价格

type Config

type Config struct {
	MinProfit  fixedpoint.Value
	MaxProfit  fixedpoint.Value
	StopLoss   fixedpoint.Value
	StepProfit fixedpoint.Value
	Market     types.Market
}

Jump to

Keyboard shortcuts

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