exchanges

package
v0.0.202 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExchange

func GetExchange() (model.Exchange, error)

Types

type Binance

type Binance struct {
	*model.ExchangeInfo
}

func (*Binance) Aggregate

func (self *Binance) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*Binance) Buy

func (self *Binance) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*Binance) Cancel

func (self *Binance) Cancel(client interface{}, market string, side model.OrderSide) error

func (*Binance) Coalesce added in v0.0.202

func (self *Binance) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*Binance) FormatMarket

func (self *Binance) FormatMarket(base, quote string) string

func (*Binance) Get24h

func (self *Binance) Get24h(client interface{}, market string) (*model.Stats, error)

func (*Binance) GetBook

func (self *Binance) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*Binance) GetClient

func (self *Binance) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*Binance) GetClosed

func (self *Binance) GetClosed(client interface{}, market string) (model.Orders, error)

func (*Binance) GetInfo

func (self *Binance) GetInfo() *model.ExchangeInfo

func (*Binance) GetMarkets

func (self *Binance) GetMarkets(cached, sandbox bool, blacklist []string) ([]model.Market, error)

func (*Binance) GetMaxSize

func (self *Binance) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*Binance) GetOpened

func (self *Binance) GetOpened(client interface{}, market string) (model.Orders, error)

func (*Binance) GetPricePrec

func (self *Binance) GetPricePrec(client interface{}, market string) (int, error)

func (*Binance) GetSizePrec

func (self *Binance) GetSizePrec(client interface{}, market string) (int, error)

func (*Binance) GetTicker

func (self *Binance) GetTicker(client interface{}, market string) (float64, error)

func (*Binance) HasAlgoOrder

func (self *Binance) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*Binance) IsLeveragedToken

func (self *Binance) IsLeveragedToken(name string) bool

func (*Binance) OCO

func (self *Binance) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*Binance) Order

func (self *Binance) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*Binance) Sell

func (self *Binance) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*Binance) StopLoss

func (self *Binance) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type Bitstamp

type Bitstamp struct {
	*model.ExchangeInfo
}

func (*Bitstamp) Aggregate

func (self *Bitstamp) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*Bitstamp) Buy

func (self *Bitstamp) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*Bitstamp) Cancel

func (self *Bitstamp) Cancel(client interface{}, market string, side model.OrderSide) error

func (*Bitstamp) Coalesce added in v0.0.202

func (self *Bitstamp) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*Bitstamp) FormatMarket

func (self *Bitstamp) FormatMarket(base, quote string) string

func (*Bitstamp) Get24h

func (self *Bitstamp) Get24h(client interface{}, market string) (*model.Stats, error)

func (*Bitstamp) GetBook

func (self *Bitstamp) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*Bitstamp) GetClient

func (self *Bitstamp) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*Bitstamp) GetClosed

func (self *Bitstamp) GetClosed(client interface{}, market string) (model.Orders, error)

func (*Bitstamp) GetInfo

func (self *Bitstamp) GetInfo() *model.ExchangeInfo

func (*Bitstamp) GetMarkets

func (self *Bitstamp) GetMarkets(cached, sandbox bool, blacklist []string) ([]model.Market, error)

func (*Bitstamp) GetMaxSize

func (self *Bitstamp) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*Bitstamp) GetOpened

func (self *Bitstamp) GetOpened(client interface{}, market string) (model.Orders, error)

func (*Bitstamp) GetPricePrec

func (self *Bitstamp) GetPricePrec(client interface{}, marketName string) (int, error)

func (*Bitstamp) GetSizePrec

func (self *Bitstamp) GetSizePrec(client interface{}, marketName string) (int, error)

func (*Bitstamp) GetTicker

func (self *Bitstamp) GetTicker(client interface{}, market string) (float64, error)

func (*Bitstamp) HasAlgoOrder

func (self *Bitstamp) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*Bitstamp) IsLeveragedToken

func (self *Bitstamp) IsLeveragedToken(name string) bool

func (*Bitstamp) OCO

func (self *Bitstamp) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*Bitstamp) Order

func (self *Bitstamp) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*Bitstamp) Sell

func (self *Bitstamp) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*Bitstamp) StopLoss

func (self *Bitstamp) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type Bittrex

type Bittrex struct {
	*model.ExchangeInfo
	// contains filtered or unexported fields
}

func (*Bittrex) Aggregate

func (self *Bittrex) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*Bittrex) Buy

func (self *Bittrex) Buy(client interface{}, cancel bool, market1 string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*Bittrex) Cancel

func (self *Bittrex) Cancel(client interface{}, market1 string, side model.OrderSide) error

func (*Bittrex) Coalesce added in v0.0.202

func (self *Bittrex) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*Bittrex) FormatMarket

func (self *Bittrex) FormatMarket(base, quote string) string

func (*Bittrex) Get24h

func (self *Bittrex) Get24h(client interface{}, market1 string) (*model.Stats, error)

func (*Bittrex) GetBook

func (self *Bittrex) GetBook(client interface{}, market1 string, side model.BookSide) (interface{}, error)

func (*Bittrex) GetClient

func (self *Bittrex) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*Bittrex) GetClosed

func (self *Bittrex) GetClosed(client interface{}, market1 string) (model.Orders, error)

func (*Bittrex) GetInfo

func (self *Bittrex) GetInfo() *model.ExchangeInfo

func (*Bittrex) GetMarkets

func (self *Bittrex) GetMarkets(cached, sandbox bool, ignore []string) ([]model.Market, error)

func (*Bittrex) GetMaxSize

func (self *Bittrex) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*Bittrex) GetOpened

func (self *Bittrex) GetOpened(client interface{}, market1 string) (model.Orders, error)

func (*Bittrex) GetPricePrec

func (self *Bittrex) GetPricePrec(client interface{}, market1 string) (int, error)

func (*Bittrex) GetSizePrec

func (self *Bittrex) GetSizePrec(client interface{}, market string) (int, error)

func (*Bittrex) GetTicker

func (self *Bittrex) GetTicker(client interface{}, market1 string) (float64, error)

func (*Bittrex) HasAlgoOrder

func (self *Bittrex) HasAlgoOrder(client interface{}, market1 string) (bool, error)

func (*Bittrex) IsLeveragedToken

func (self *Bittrex) IsLeveragedToken(name string) bool

func (*Bittrex) OCO

func (self *Bittrex) OCO(client interface{}, market1 string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*Bittrex) Order

func (self *Bittrex) Order(
	client interface{},
	side model.OrderSide,
	market1 string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*Bittrex) Sell

func (self *Bittrex) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*Bittrex) StopLoss

func (self *Bittrex) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type BittrexSessionInfo

type BittrexSessionInfo struct {
	Cooldown bool            `json:"cooldown"`
	Calls    []exchange.Call `json:"calls"`
}

type CexIo

type CexIo struct {
	*model.ExchangeInfo
}

func (*CexIo) Aggregate

func (self *CexIo) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*CexIo) Buy

func (self *CexIo) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*CexIo) Cancel

func (self *CexIo) Cancel(client interface{}, market string, side model.OrderSide) error

func (*CexIo) Coalesce added in v0.0.202

func (self *CexIo) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*CexIo) FormatMarket

func (self *CexIo) FormatMarket(base, quote string) string

func (*CexIo) Get24h

func (self *CexIo) Get24h(client interface{}, market string) (*model.Stats, error)

func (*CexIo) GetBook

func (self *CexIo) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*CexIo) GetClient

func (self *CexIo) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*CexIo) GetClosed

func (self *CexIo) GetClosed(client interface{}, market string) (model.Orders, error)

func (*CexIo) GetInfo

func (self *CexIo) GetInfo() *model.ExchangeInfo

func (*CexIo) GetMarkets

func (self *CexIo) GetMarkets(cached, sandbox bool, ignore []string) ([]model.Market, error)

func (*CexIo) GetMaxSize

func (self *CexIo) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*CexIo) GetOpened

func (self *CexIo) GetOpened(client interface{}, market string) (model.Orders, error)

func (*CexIo) GetSizePrec

func (self *CexIo) GetSizePrec(client interface{}, market string) (int, error)

func (*CexIo) GetTicker

func (self *CexIo) GetTicker(client interface{}, market string) (float64, error)

func (*CexIo) HasAlgoOrder

func (self *CexIo) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*CexIo) IsLeveragedToken

func (self *CexIo) IsLeveragedToken(name string) bool

func (*CexIo) OCO

func (self *CexIo) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*CexIo) Order

func (self *CexIo) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*CexIo) Sell

func (self *CexIo) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*CexIo) StopLoss

func (self *CexIo) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type CryptoDotCom

type CryptoDotCom struct {
	*model.ExchangeInfo
	// contains filtered or unexported fields
}

func (*CryptoDotCom) Aggregate

func (self *CryptoDotCom) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*CryptoDotCom) Buy

func (self *CryptoDotCom) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*CryptoDotCom) Cancel

func (self *CryptoDotCom) Cancel(client interface{}, market string, side model.OrderSide) error

func (*CryptoDotCom) Coalesce added in v0.0.202

func (self *CryptoDotCom) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*CryptoDotCom) FormatMarket

func (self *CryptoDotCom) FormatMarket(base, quote string) string

func (*CryptoDotCom) Get24h

func (self *CryptoDotCom) Get24h(client interface{}, market string) (*model.Stats, error)

func (*CryptoDotCom) GetBook

func (self *CryptoDotCom) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*CryptoDotCom) GetClient

func (self *CryptoDotCom) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*CryptoDotCom) GetClosed

func (self *CryptoDotCom) GetClosed(client interface{}, market string) (model.Orders, error)

func (*CryptoDotCom) GetInfo

func (self *CryptoDotCom) GetInfo() *model.ExchangeInfo

func (*CryptoDotCom) GetMarkets

func (self *CryptoDotCom) GetMarkets(cached, sandbox bool, blacklist []string) ([]model.Market, error)

func (*CryptoDotCom) GetMaxSize

func (self *CryptoDotCom) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*CryptoDotCom) GetOpened

func (self *CryptoDotCom) GetOpened(client interface{}, market string) (model.Orders, error)

func (*CryptoDotCom) GetPricePrec

func (self *CryptoDotCom) GetPricePrec(client interface{}, market string) (int, error)

func (*CryptoDotCom) GetSizePrec

func (self *CryptoDotCom) GetSizePrec(client interface{}, market string) (int, error)

func (*CryptoDotCom) GetTicker

func (self *CryptoDotCom) GetTicker(client interface{}, market string) (float64, error)

func (*CryptoDotCom) HasAlgoOrder

func (self *CryptoDotCom) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*CryptoDotCom) IsLeveragedToken

func (self *CryptoDotCom) IsLeveragedToken(name string) bool

func (*CryptoDotCom) OCO

func (self *CryptoDotCom) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*CryptoDotCom) Order

func (self *CryptoDotCom) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*CryptoDotCom) Sell

func (self *CryptoDotCom) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*CryptoDotCom) StopLoss

func (self *CryptoDotCom) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type CryptoDotComSessionInfo

type CryptoDotComSessionInfo struct {
	Cooldown bool `json:"cooldown"`
}

type Exchanges

type Exchanges []model.Exchange

func New

func New() *Exchanges

type Gdax

type Gdax struct {
	*model.ExchangeInfo
	// contains filtered or unexported fields
}

func (*Gdax) Aggregate

func (self *Gdax) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*Gdax) Buy

func (self *Gdax) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*Gdax) Cancel

func (self *Gdax) Cancel(client interface{}, market string, side model.OrderSide) error

func (*Gdax) Coalesce added in v0.0.202

func (self *Gdax) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*Gdax) FormatMarket

func (self *Gdax) FormatMarket(base, quote string) string

func (*Gdax) Get24h

func (self *Gdax) Get24h(client interface{}, market string) (*model.Stats, error)

func (*Gdax) GetBook

func (self *Gdax) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*Gdax) GetClient

func (self *Gdax) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*Gdax) GetClosed

func (self *Gdax) GetClosed(client interface{}, market string) (model.Orders, error)

func (*Gdax) GetInfo

func (self *Gdax) GetInfo() *model.ExchangeInfo

func (*Gdax) GetMarkets

func (self *Gdax) GetMarkets(cached, sandbox bool, blacklist []string) ([]model.Market, error)

func (*Gdax) GetMaxSize

func (self *Gdax) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*Gdax) GetOpened

func (self *Gdax) GetOpened(client interface{}, market string) (model.Orders, error)

func (*Gdax) GetPricePrec

func (self *Gdax) GetPricePrec(client interface{}, market string) (int, error)

func (*Gdax) GetSizePrec

func (self *Gdax) GetSizePrec(client interface{}, market string) (int, error)

func (*Gdax) GetTicker

func (self *Gdax) GetTicker(client interface{}, market string) (float64, error)

func (*Gdax) HasAlgoOrder

func (self *Gdax) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*Gdax) IsLeveragedToken

func (self *Gdax) IsLeveragedToken(name string) bool

func (*Gdax) OCO

func (self *Gdax) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*Gdax) Order

func (self *Gdax) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*Gdax) Sell

func (self *Gdax) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*Gdax) StopLoss

func (self *Gdax) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type HitBTC

type HitBTC struct {
	*model.ExchangeInfo
	// contains filtered or unexported fields
}

func (*HitBTC) Aggregate

func (self *HitBTC) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*HitBTC) Buy

func (self *HitBTC) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*HitBTC) Cancel

func (self *HitBTC) Cancel(client interface{}, market string, side model.OrderSide) error

func (*HitBTC) Coalesce added in v0.0.202

func (self *HitBTC) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*HitBTC) FormatMarket

func (self *HitBTC) FormatMarket(base, quote string) string

func (*HitBTC) Get24h

func (self *HitBTC) Get24h(client interface{}, market string) (*model.Stats, error)

func (*HitBTC) GetBook

func (self *HitBTC) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*HitBTC) GetClient

func (self *HitBTC) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*HitBTC) GetClosed

func (self *HitBTC) GetClosed(client interface{}, market string) (model.Orders, error)

func (*HitBTC) GetInfo

func (self *HitBTC) GetInfo() *model.ExchangeInfo

func (*HitBTC) GetMarkets

func (self *HitBTC) GetMarkets(cached, sandbox bool, ignore []string) ([]model.Market, error)

func (*HitBTC) GetMaxSize

func (self *HitBTC) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*HitBTC) GetOpened

func (self *HitBTC) GetOpened(client interface{}, market string) (model.Orders, error)

func (*HitBTC) GetPricePrec

func (self *HitBTC) GetPricePrec(client interface{}, market string) (int, error)

func (*HitBTC) GetSizePrec

func (self *HitBTC) GetSizePrec(client interface{}, market string) (int, error)

func (*HitBTC) GetTicker

func (self *HitBTC) GetTicker(client interface{}, market string) (float64, error)

func (*HitBTC) HasAlgoOrder

func (self *HitBTC) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*HitBTC) IsLeveragedToken

func (self *HitBTC) IsLeveragedToken(name string) bool

func (*HitBTC) OCO

func (self *HitBTC) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*HitBTC) Order

func (self *HitBTC) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*HitBTC) Sell

func (self *HitBTC) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*HitBTC) StopLoss

func (self *HitBTC) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type Huobi added in v0.0.186

type Huobi struct {
	*model.ExchangeInfo
	// contains filtered or unexported fields
}

func (*Huobi) Aggregate added in v0.0.186

func (self *Huobi) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*Huobi) Buy added in v0.0.186

func (self *Huobi) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*Huobi) Cancel added in v0.0.186

func (self *Huobi) Cancel(client interface{}, market string, side model.OrderSide) error

func (*Huobi) Coalesce added in v0.0.202

func (self *Huobi) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*Huobi) FormatMarket added in v0.0.186

func (self *Huobi) FormatMarket(base, quote string) string

func (*Huobi) Get24h added in v0.0.186

func (self *Huobi) Get24h(client interface{}, market string) (*model.Stats, error)

func (*Huobi) GetBook added in v0.0.186

func (self *Huobi) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*Huobi) GetClient added in v0.0.186

func (self *Huobi) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*Huobi) GetClosed added in v0.0.186

func (self *Huobi) GetClosed(client interface{}, market string) (model.Orders, error)

func (*Huobi) GetInfo added in v0.0.186

func (self *Huobi) GetInfo() *model.ExchangeInfo

func (*Huobi) GetMarkets added in v0.0.186

func (self *Huobi) GetMarkets(cached, sandbox bool, blacklist []string) ([]model.Market, error)

func (*Huobi) GetMaxSize added in v0.0.186

func (self *Huobi) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*Huobi) GetOpened added in v0.0.186

func (self *Huobi) GetOpened(client interface{}, market string) (model.Orders, error)

func (*Huobi) GetPricePrec added in v0.0.186

func (self *Huobi) GetPricePrec(client interface{}, market string) (int, error)

func (*Huobi) GetSizePrec added in v0.0.186

func (self *Huobi) GetSizePrec(client interface{}, market string) (int, error)

func (*Huobi) GetTicker added in v0.0.186

func (self *Huobi) GetTicker(client interface{}, market string) (float64, error)

func (*Huobi) HasAlgoOrder added in v0.0.186

func (self *Huobi) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*Huobi) IsLeveragedToken added in v0.0.186

func (self *Huobi) IsLeveragedToken(name string) bool

func (*Huobi) OCO added in v0.0.186

func (self *Huobi) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*Huobi) Order added in v0.0.186

func (self *Huobi) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*Huobi) Sell added in v0.0.186

func (self *Huobi) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*Huobi) StopLoss added in v0.0.186

func (self *Huobi) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type Kucoin

type Kucoin struct {
	*model.ExchangeInfo
	// contains filtered or unexported fields
}

func (*Kucoin) Aggregate

func (self *Kucoin) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*Kucoin) Buy

func (self *Kucoin) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*Kucoin) Cancel

func (self *Kucoin) Cancel(client interface{}, market string, side model.OrderSide) error

func (*Kucoin) Coalesce added in v0.0.202

func (self *Kucoin) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*Kucoin) FormatMarket

func (self *Kucoin) FormatMarket(base, quote string) string

func (*Kucoin) Get24h

func (self *Kucoin) Get24h(client interface{}, market string) (*model.Stats, error)

func (*Kucoin) GetBook

func (self *Kucoin) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*Kucoin) GetClient

func (self *Kucoin) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*Kucoin) GetClosed

func (self *Kucoin) GetClosed(client interface{}, market string) (model.Orders, error)

func (*Kucoin) GetInfo

func (self *Kucoin) GetInfo() *model.ExchangeInfo

func (*Kucoin) GetMarkets

func (self *Kucoin) GetMarkets(cached, sandbox bool, blacklist []string) ([]model.Market, error)

func (*Kucoin) GetMaxSize

func (self *Kucoin) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*Kucoin) GetOpened

func (self *Kucoin) GetOpened(client interface{}, market string) (model.Orders, error)

func (*Kucoin) GetPricePrec

func (self *Kucoin) GetPricePrec(client interface{}, market string) (int, error)

func (*Kucoin) GetSizePrec

func (self *Kucoin) GetSizePrec(client interface{}, market string) (int, error)

func (*Kucoin) GetTicker

func (self *Kucoin) GetTicker(client interface{}, market string) (float64, error)

func (*Kucoin) HasAlgoOrder

func (self *Kucoin) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*Kucoin) IsLeveragedToken

func (self *Kucoin) IsLeveragedToken(name string) bool

func (*Kucoin) OCO

func (self *Kucoin) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*Kucoin) Order

func (self *Kucoin) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*Kucoin) Sell

func (self *Kucoin) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*Kucoin) StopLoss

func (self *Kucoin) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

type Woo

type Woo struct {
	*model.ExchangeInfo
	// contains filtered or unexported fields
}

func (*Woo) Aggregate

func (self *Woo) Aggregate(client, book interface{}, market string, agg float64) (model.Book, error)

func (*Woo) Buy

func (self *Woo) Buy(client interface{}, cancel bool, market string, calls model.Calls, deviation float64, kind model.OrderType) error

func (*Woo) Cancel

func (self *Woo) Cancel(client interface{}, market string, side model.OrderSide) error

func (*Woo) Coalesce added in v0.0.202

func (self *Woo) Coalesce(client interface{}, market string, side model.OrderSide) error

func (*Woo) FormatMarket

func (self *Woo) FormatMarket(base, quote string) string

func (*Woo) Get24h

func (self *Woo) Get24h(client interface{}, market string) (*model.Stats, error)

func (*Woo) GetBook

func (self *Woo) GetBook(client interface{}, market string, side model.BookSide) (interface{}, error)

func (*Woo) GetClient

func (self *Woo) GetClient(permission model.Permission, sandbox bool) (interface{}, error)

func (*Woo) GetClosed

func (self *Woo) GetClosed(client interface{}, market string) (model.Orders, error)

func (*Woo) GetInfo

func (self *Woo) GetInfo() *model.ExchangeInfo

func (*Woo) GetMarkets

func (self *Woo) GetMarkets(cached, sandbox bool, blacklist []string) ([]model.Market, error)

func (*Woo) GetMaxSize

func (self *Woo) GetMaxSize(client interface{}, base, quote string, hold, earn bool, def float64, mult multiplier.Mult) float64

func (*Woo) GetOpened

func (self *Woo) GetOpened(client interface{}, market string) (model.Orders, error)

func (*Woo) GetPricePrec

func (self *Woo) GetPricePrec(client interface{}, market string) (int, error)

func (*Woo) GetSizePrec

func (self *Woo) GetSizePrec(client interface{}, market string) (int, error)

func (*Woo) GetTicker

func (self *Woo) GetTicker(client interface{}, market string) (float64, error)

func (*Woo) HasAlgoOrder

func (self *Woo) HasAlgoOrder(client interface{}, market string) (bool, error)

func (*Woo) IsLeveragedToken

func (self *Woo) IsLeveragedToken(name string) bool

func (*Woo) OCO

func (self *Woo) OCO(client interface{}, market string, size float64, price, stop float64, metadata string) ([]byte, error)

func (*Woo) Order

func (self *Woo) Order(
	client interface{},
	side model.OrderSide,
	market string,
	size float64,
	price float64,
	kind model.OrderType,
	metadata string,
) (oid []byte, raw []byte, err error)

func (*Woo) Sell

func (self *Woo) Sell(
	strategy model.Strategy,
	hold, earn model.Markets,
	sandbox, tweet, debug bool,
	success model.OnSuccess,
) error

func (*Woo) StopLoss

func (self *Woo) StopLoss(client interface{}, market string, size float64, price float64, kind model.OrderType, metadata string) ([]byte, error)

Jump to

Keyboard shortcuts

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