bitfinex

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitfinexEndpoint

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

func NewBitfinexEndpoint

func NewBitfinexEndpoint(signer Signer, interf Interface) *BitfinexEndpoint

func NewRealBitfinexEndpoint

func NewRealBitfinexEndpoint(signer Signer) *BitfinexEndpoint

func NewSimulatedBitfinexEndpoint

func NewSimulatedBitfinexEndpoint(signer Signer) *BitfinexEndpoint

func (*BitfinexEndpoint) FetchOnePairData

func (self *BitfinexEndpoint) FetchOnePairData(
	wg *sync.WaitGroup,
	pair common.TokenPair,
	data *sync.Map,
	timepoint uint64)

func (*BitfinexEndpoint) GetInfo

func (self *BitfinexEndpoint) GetInfo(timepoint uint64) (exchange.Bitfinfo, error)

func (*BitfinexEndpoint) Trade

func (self *BitfinexEndpoint) Trade(tradeType string, base, quote common.Token, rate, amount float64, timepoint uint64) (done float64, remaining float64, finished bool, err error)

func (*BitfinexEndpoint) Withdraw

func (self *BitfinexEndpoint) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, timepoint uint64) error

type Interface

type Interface interface {
	PublicEndpoint() string
	AuthenticatedEndpoint() string
}

type RealInterface

type RealInterface struct{}

func NewRealInterface

func NewRealInterface() *RealInterface

func (*RealInterface) AuthenticatedEndpoint

func (self *RealInterface) AuthenticatedEndpoint() string

func (*RealInterface) PublicEndpoint

func (self *RealInterface) PublicEndpoint() string

type Signer

type Signer interface {
	GetBitfinexKey() string
	BitfinexSign(msg string) string
}

type SimulatedInterface

type SimulatedInterface struct{}

func NewSimulatedInterface

func NewSimulatedInterface() *SimulatedInterface

func (*SimulatedInterface) AuthenticatedEndpoint

func (self *SimulatedInterface) AuthenticatedEndpoint() string

func (*SimulatedInterface) PublicEndpoint

func (self *SimulatedInterface) PublicEndpoint() string

Jump to

Keyboard shortcuts

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