Documentation
¶
Index ¶
- Constants
- type BinanceEndpoint
- func NewBinanceEndpoint(signer Signer, interf Interface) *BinanceEndpoint
- func NewDevBinanceEndpoint(signer Signer) *BinanceEndpoint
- func NewKovanBinanceEndpoint(signer Signer) *BinanceEndpoint
- func NewRealBinanceEndpoint(signer Signer) *BinanceEndpoint
- func NewSimulatedBinanceEndpoint(signer Signer) *BinanceEndpoint
- func (self *BinanceEndpoint) CancelOrder(symbol string, id uint64) (exchange.Binacancel, error)
- func (self *BinanceEndpoint) DepositHistory(startTime, endTime uint64) (exchange.Binadeposits, error)
- func (self *BinanceEndpoint) FetchOnePairData(wg *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64)
- func (self *BinanceEndpoint) GetDepositAddress(asset string) (exchange.Binadepositaddress, error)
- func (self *BinanceEndpoint) GetInfo(timepoint uint64) (exchange.Binainfo, error)
- func (self *BinanceEndpoint) GetResponse(method string, url string, params map[string]string, signNeeded bool, ...) ([]byte, error)
- func (self *BinanceEndpoint) OpenOrdersForOnePair(wg *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64)
- func (self *BinanceEndpoint) OrderStatus(symbol string, id uint64, timepoint uint64) (exchange.Binaorder, error)
- func (self *BinanceEndpoint) QueryOrder(symbol string, id uint64, timepoint uint64) (done float64, remaining float64, finished bool, err error)
- func (self *BinanceEndpoint) Trade(tradeType string, base, quote common.Token, rate, amount float64, ...) (string, float64, float64, bool, error)
- func (self *BinanceEndpoint) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, ...) (string, error)
- func (self *BinanceEndpoint) WithdrawHistory(startTime, endTime uint64) (exchange.Binawithdrawals, error)
- type DevInterface
- type Interface
- type KovanInterface
- type RealInterface
- type Signer
- type SimulatedInterface
Constants ¶
View Source
const EPSILON float64 = 0.0000000001 // 10e-10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinanceEndpoint ¶
type BinanceEndpoint struct {
// contains filtered or unexported fields
}
func NewBinanceEndpoint ¶
func NewBinanceEndpoint(signer Signer, interf Interface) *BinanceEndpoint
func NewDevBinanceEndpoint ¶
func NewDevBinanceEndpoint(signer Signer) *BinanceEndpoint
func NewKovanBinanceEndpoint ¶
func NewKovanBinanceEndpoint(signer Signer) *BinanceEndpoint
func NewRealBinanceEndpoint ¶
func NewRealBinanceEndpoint(signer Signer) *BinanceEndpoint
func NewSimulatedBinanceEndpoint ¶
func NewSimulatedBinanceEndpoint(signer Signer) *BinanceEndpoint
func (*BinanceEndpoint) CancelOrder ¶
func (self *BinanceEndpoint) CancelOrder(symbol string, id uint64) (exchange.Binacancel, error)
func (*BinanceEndpoint) DepositHistory ¶
func (self *BinanceEndpoint) DepositHistory(startTime, endTime uint64) (exchange.Binadeposits, error)
func (*BinanceEndpoint) FetchOnePairData ¶
func (*BinanceEndpoint) GetDepositAddress ¶
func (self *BinanceEndpoint) GetDepositAddress(asset string) (exchange.Binadepositaddress, error)
func (*BinanceEndpoint) GetInfo ¶
func (self *BinanceEndpoint) GetInfo(timepoint uint64) (exchange.Binainfo, error)
func (*BinanceEndpoint) GetResponse ¶
func (*BinanceEndpoint) OpenOrdersForOnePair ¶
func (*BinanceEndpoint) OrderStatus ¶
func (*BinanceEndpoint) QueryOrder ¶
func (*BinanceEndpoint) Trade ¶
func (self *BinanceEndpoint) Trade(tradeType string, base, quote common.Token, rate, amount float64, timepoint uint64) (string, float64, float64, bool, error)
Relevant params: symbol ("%s%s", base, quote) side (BUY/SELL) type (LIMIT/MARKET) timeInForce (GTC/IOC) quantity price
In this version, we only support LIMIT order which means only buy/sell with acceptable price, and GTC time in force which means that the order will be active until it's implicitly canceled
func (*BinanceEndpoint) WithdrawHistory ¶
func (self *BinanceEndpoint) WithdrawHistory(startTime, endTime uint64) (exchange.Binawithdrawals, error)
type DevInterface ¶
type DevInterface struct{}
func NewDevInterface ¶
func NewDevInterface() *DevInterface
func (*DevInterface) AuthenticatedEndpoint ¶
func (self *DevInterface) AuthenticatedEndpoint() string
func (*DevInterface) PublicEndpoint ¶
func (self *DevInterface) PublicEndpoint() string
type KovanInterface ¶
type KovanInterface struct{}
func NewKovanInterface ¶
func NewKovanInterface() *KovanInterface
func (*KovanInterface) AuthenticatedEndpoint ¶
func (self *KovanInterface) AuthenticatedEndpoint() string
func (*KovanInterface) PublicEndpoint ¶
func (self *KovanInterface) PublicEndpoint() 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 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
Click to show internal directories.
Click to hide internal directories.