trade

package
v0.0.0-...-5ed304f Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExchange

func NewExchange(exchangeID types.ExchangeID, apiKey, secretKey, secretPassphrase string) (types.Exchange, error)

Types

type Client

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

func New

func New(
	pooldbClient *dbcl.Client,
	redisClient *redis.Client,
	nodes []types.PayoutNode,
	exchanges []types.Exchange,
	telegramClient *telegram.Client,
) *Client

func (*Client) CheckForNewBatches

func (c *Client) CheckForNewBatches() error

func (*Client) ConfirmDeposits

func (c *Client) ConfirmDeposits(batchID uint64, exchange types.Exchange) error

func (*Client) ConfirmTradeStage

func (c *Client) ConfirmTradeStage(batchID uint64, exchange types.Exchange, stage int) error

func (*Client) ConfirmWithdrawals

func (c *Client) ConfirmWithdrawals(batchID uint64, exchange types.Exchange) error

func (*Client) CreditWithdrawals

func (c *Client) CreditWithdrawals(batchID uint64) error

func (*Client) InitiateDeposits

func (c *Client) InitiateDeposits(batchID uint64, exchange types.Exchange) error

func (*Client) InitiateTradeStage

func (c *Client) InitiateTradeStage(batchID uint64, exchange types.Exchange, stage int) error

func (*Client) InitiateTrades

func (c *Client) InitiateTrades(batchID uint64, exchange types.Exchange) error

func (*Client) InitiateWithdrawals

func (c *Client) InitiateWithdrawals(batchID uint64, exchange types.Exchange) error

func (*Client) ProcessBatch

func (c *Client) ProcessBatch(batchID uint64) error

func (*Client) RegisterDeposits

func (c *Client) RegisterDeposits(batchID uint64, exchange types.Exchange) error

type Status

type Status int
const (
	BatchInactive Status = iota
	DepositsActive
	DepositsRegistered
	DepositsComplete
	TradesInactive
	TradesActiveStageOne
	TradesCompleteStageOne
	TradesActiveStageTwo
	TradesCompleteStageTwo
	TradesActiveStageThree
	TradesCompleteStageThree
	WithdrawalsActive
	WithdrawalsComplete
	BatchComplete
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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