ftxtrade

package
v0.0.0-...-a129c9c Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Round

func Round(val float64, precision int) float64

func RoundUp

func RoundUp(val float64, precision int) float64

Types

type FtxTrade

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

func New

func New(cfg config.Config, notif notification.Notification, appState state.State) *FtxTrade

func (*FtxTrade) ArbEnd

func (ft *FtxTrade) ArbEnd(subAcc string, spot string)

func (*FtxTrade) ArbStart

func (ft *FtxTrade) ArbStart(subAcc string, name string)

func (*FtxTrade) BuyCoin

func (ft *FtxTrade) BuyCoin(
	subAcc string,
	coin string,
	buyQty float64,
	sellQty float64,
	tp float64,
)

func (*FtxTrade) CheckFuturePosition

func (ft *FtxTrade) CheckFuturePosition(client *ftx.FtxClient, future string) (structs.Position, error)

func (*FtxTrade) CheckSpotBalance

func (ft *FtxTrade) CheckSpotBalance(client *ftx.FtxClient, subAcc string, spot string) (structs.SubaccountBalance, error)

func (*FtxTrade) GetAtr

func (ft *FtxTrade) GetAtr(coin string) (atr float64, close float64, err error)

func (*FtxTrade) Portfolio

func (ft *FtxTrade) Portfolio(subAcc string)

func (*FtxTrade) PortfolioFTX

func (ft *FtxTrade) PortfolioFTX(subAcc string)

signal comes buy with available money

func (*FtxTrade) RunHealthPing

func (ft *FtxTrade) RunHealthPing()

func (*FtxTrade) RunPositionsCheck

func (ft *FtxTrade) RunPositionsCheck()

func (*FtxTrade) TpCoinBull

func (ft *FtxTrade) TpCoinBull(subAcc string, market string, coin string)

func (*FtxTrade) TradeLevCrypto

func (ft *FtxTrade) TradeLevCrypto(
	msg types.JSONMessageBody,
	risk float64,
	side string,
	sideOpposite string,
	subAccType string,
)

type Item

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

type PorftolioItem

type PorftolioItem struct {
	Coin       string  `json:"coin,omitempty"`
	Allocation float64 `json:"allocation,omitempty"`
}

Jump to

Keyboard shortcuts

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