Documentation ¶
Index ¶
Constants ¶
View Source
const ( Long = 1 Short = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseExchanger ¶
type Config ¶
type Config struct { Exchanges map[string]ConfigItem Proxy string }
func LoadConfigFile ¶
func LoadConfigs ¶
type ConfigItem ¶
type FuturesBaseExchanger ¶
type FuturesBaseExchanger interface { BaseExchanger OpenLong(price float64, amount float64) (*Order, error) CloseLong(price float64, amount float64) (*Order, error) OpenShort(price float64, amount float64) (*Order, error) CloseShort(price float64, amount float64) (*Order, error) OpenLongMarket(amount float64) (*Order, error) CloseLongMarket(amount float64) (*Order, error) OpenShortMarket(amount float64) (*Order, error) CloseShortMarket(amount float64) (*Order, error) }
type FuturesExchanger ¶
type FuturesExchanger interface { FuturesBaseExchanger Contracts() ([]Contract, error) Positions() ([]Position, error) ContractBalances() (map[Contract]Balance, error) Depth(int) (Orderbook, error) Ticker() (Ticker, error) SetSymbol(symbol string) error SetContract(contract string) error SetLever(lever float64) error KlineRecent(count int32, binSize string) (klines []*Candle, err error) Kline(start, end time.Time, nLimit int, binSize string) (klines []*Candle, err error) KlineChan(start, end time.Time, bSize string) (klines chan []interface{}, err error) }
Click to show internal directories.
Click to hide internal directories.