Versions in this module Expand all Collapse all v0 v0.0.1 Oct 14, 2020 Changes in this version + type API interface + CancelOrder func(orderId string, currency common.TradingPair) (bool, error) + GetAccount func() (*common.Account, error) + GetDepth func(size int, currency common.TradingPair) (*common.Depth, error) + GetExchangeName func() string + GetKlineRecords func(currency common.TradingPair, period, size, since int) ([]common.Kline, error) + GetOneOrder func(orderId string, currency common.TradingPair) (*common.Order, error) + GetOrderHistorys func(currency common.TradingPair, currentPage, pageSize int) ([]common.Order, error) + GetTicker func(currency common.TradingPair) (*common.Ticker, error) + GetTrades func(currencyPair common.TradingPair, since int64) ([]common.Trade, error) + GetUnfinishOrders func(currency common.TradingPair) ([]common.Order, error) + LimitBuy func(amount, price string, currency common.TradingPair, ...) (*common.Order, error) + LimitSell func(amount, price string, currency common.TradingPair, ...) (*common.Order, error) + MarketBuy func(amount, price string, currency common.TradingPair) (*common.Order, error) + MarketSell func(amount, price string, currency common.TradingPair) (*common.Order, error) + type FutureRestAPI interface + FutureCancelOrder func(currencyPair common.TradingPair, contractType, orderId string) (bool, error) + GetContractValue func(currencyPair common.TradingPair) (float64, error) + GetDeliveryTime func() (int, int, int, int) + GetExchangeName func() string + GetFee func() (float64, error) + GetFutureDepth func(currencyPair common.TradingPair, contractType string, size int) (*common.Depth, error) + GetFutureEstimatedPrice func(currencyPair common.TradingPair) (float64, error) + GetFutureIndex func(currencyPair common.TradingPair) (float64, error) + GetFutureOrder func(orderId string, currencyPair common.TradingPair, contractType string) (*common.FutureOrder, error) + GetFutureOrders func(orderIds []string, currencyPair common.TradingPair, contractType string) ([]common.FutureOrder, error) + GetFuturePosition func(currencyPair common.TradingPair, contractType string) ([]common.FuturePosition, error) + GetFutureTicker func(currencyPair common.TradingPair, contractType string) (*common.Ticker, error) + GetFutureUserinfo func(currencyPair ...common.TradingPair) (*common.FutureAccount, error) + GetKlineRecords func(contractType string, currency common.TradingPair, period, size, since int) ([]common.FutureKline, error) + GetTrades func(contractType string, currencyPair common.TradingPair, since int64) ([]common.Trade, error) + GetUnfinishFutureOrders func(currencyPair common.TradingPair, contractType string) ([]common.FutureOrder, error) + LimitFuturesOrder func(currencyPair common.TradingPair, contractType, price, amount string, ...) (*common.FutureOrder, error) + MarketFuturesOrder func(currencyPair common.TradingPair, contractType, amount string, openType int) (*common.FutureOrder, error) + PlaceFutureOrder func(currencyPair common.TradingPair, contractType, price, amount string, ...) (string, error) + type FuturesWsApi interface + DepthCallback func(func(depth *common.Depth)) + SubscribeDepth func(pair common.TradingPair, contractType string) error + SubscribeTicker func(pair common.TradingPair, contractType string) error + SubscribeTrade func(pair common.TradingPair, contractType string) error + TickerCallback func(func(ticker *common.FutureTicker)) + TradeCallback func(func(trade *common.Trade, contract string)) + type SpotWsApi interface + DepthCallback func(func(depth *common.Depth)) + SubscribeDepth func(pair common.TradingPair) error + SubscribeTicker func(pair common.TradingPair) error + SubscribeTrade func(pair common.TradingPair) error + TickerCallback func(func(ticker *common.Ticker)) + TradeCallback func(func(trade *common.Trade)) + type WalletAPI interface + GetAccount func() (*common.Account, error) + GetDepositHistory func(currency *common.Currency) ([]common.DepositWithdrawHistory, error) + GetWithDrawHistory func(currency *common.Currency) ([]common.DepositWithdrawHistory, error) + Transfer func(param common.TransferParameter) error + Withdrawal func(param common.WithdrawParameter) (withdrawId string, err error)