Versions in this module Expand all Collapse all v0 v0.1.2 Jan 9, 2020 Changes in this version type HuobiDepositAddress + Code int + Data []struct{ ... } + Message string v0.1.1 Sep 3, 2019 Changes in this version + const BtcID + type BinaAccountTradeHistory []struct + type BinaServerTime struct + ServerTime uint64 type Binacancel + ClientOrderID string + OrderID uint64 + OrigClientOrderID string type Binance + func (bn *Binance) FetchOnePairData(wg *sync.WaitGroup, baseID, quoteID string, data *sync.Map, timepoint uint64) + func (bn *Binance) FetchOnePairTradeHistory(wait *sync.WaitGroup, data *sync.Map, pair common.TokenPair) + func (bn *Binance) FetchTradeHistory() + func (bn *Binance) GetExchangeInfo(pair common.TokenPairID) (common.ExchangePrecisionLimit, error) + func (bn *Binance) GetFee() (common.ExchangeFees, error) + func (bn *Binance) GetInfo() (common.ExchangeInfo, error) + func (bn *Binance) GetLiveExchangeInfos(tokenPairIDs []common.TokenPairID) (common.ExchangeInfo, error) + func (bn *Binance) GetMinDeposit() (common.ExchangesMinDeposit, error) + func (bn *Binance) GetTradeHistory(fromTime, toTime uint64) (common.ExchangeTradeHistory, error) + func (bn *Binance) OpenOrdersForOnePair(wg *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64) + func (bn *Binance) QueryOrder(symbol string, id uint64) (done float64, remaining float64, finished bool, err error) + func (bn *Binance) TokenAddresses() (map[string]ethereum.Address, error) + func (bn *Binance) UpdatePairsPrecision() error + type BinanceExchangeInfo struct + Symbols []BinanceSymbol type BinanceInterface + GetAccountTradeHistory func(base, quote common.Token, fromID string) (BinaAccountTradeHistory, error) + GetDepositAddress func(tokenID string) (Binadepositaddress, error) + GetDepthOnePair func(baseID, quoteID string) (Binaresp, error) + GetExchangeInfo func() (BinanceExchangeInfo, error) + type BinanceStorage interface + GetLastIDTradeHistory func(pair string) (string, error) + GetTradeHistory func(fromTime, toTime uint64) (common.ExchangeTradeHistory, error) + StoreTradeHistory func(data common.ExchangeTradeHistory) error + type BinanceSymbol struct + BaseAssetPrecision int + Filters []FilterLimit + QuotePrecision int + Symbol string + type BinanceTradeHistory []struct type Binaorder + ClientOrderID string + Msg string + OrderID uint64 + type Binaprice struct + Quantity string + Rate string + func (bp *Binaprice) UnmarshalJSON(text []byte) error type Binaresp + LastUpdatedID int64 type Binawithdraw + Msg string + type FilterLimit struct + FilterType string + MaxPrice string + MaxQuantity string + MinNotional string + MinPrice string + MinQuantity string + StepSize string + TickSize string + type Huobi struct + func NewHuobi(interf HuobiInterface, blockchain *blockchain.BaseBlockchain, ...) (*Huobi, error) + func (h *Huobi) Address(token common.Token) (ethereum.Address, bool) + func (h *Huobi) CancelOrder(id, base, quote string) error + func (h *Huobi) DepositStatus(id common.ActivityID, tx1Hash, currency string, sentAmount float64, ...) (string, error) + func (h *Huobi) FetchEBalanceData(timepoint uint64) (common.EBalanceEntry, error) + func (h *Huobi) FetchOnePairData(wg *sync.WaitGroup, baseID, quoteID string, data *sync.Map, timepoint uint64) + func (h *Huobi) FetchOnePairTradeHistory(wait *sync.WaitGroup, data *sync.Map, pair common.TokenPair) + func (h *Huobi) FetchOrderData(timepoint uint64) (common.OrderEntry, error) + func (h *Huobi) FetchPriceData(timepoint uint64, fetchPriceData bool) (map[common.TokenPairID]common.ExchangePrice, error) + func (h *Huobi) FetchTradeHistory() + func (h *Huobi) FindTx2(id common.ActivityID) (tx2 common.TXEntry, found bool) + func (h *Huobi) FindTx2InPending(id common.ActivityID) (common.TXEntry, bool) + func (h *Huobi) GetExchangeInfo(pair common.TokenPairID) (common.ExchangePrecisionLimit, error) + func (h *Huobi) GetFee() (common.ExchangeFees, error) + func (h *Huobi) GetInfo() (common.ExchangeInfo, error) + func (h *Huobi) GetLiveExchangeInfos(tokenPairIDs []common.TokenPairID) (common.ExchangeInfo, error) + func (h *Huobi) GetMinDeposit() (common.ExchangesMinDeposit, error) + func (h *Huobi) GetTradeHistory(fromTime, toTime uint64) (common.ExchangeTradeHistory, error) + func (h *Huobi) ID() common.ExchangeID + func (h *Huobi) MarshalText() (text []byte, err error) + func (h *Huobi) Name() string + func (h *Huobi) OpenOrdersForOnePair(wg *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64) + func (h *Huobi) OrderStatus(id string, base, quote string) (string, error) + func (h *Huobi) PendingIntermediateTxs() (map[common.ActivityID]common.TXEntry, error) + func (h *Huobi) QueryOrder(symbol string, id uint64) (done float64, remaining float64, finished bool, err error) + func (h *Huobi) RealDepositAddress(tokenID string) (ethereum.Address, error) + func (h *Huobi) Send2ndTransaction(amount float64, token common.Token, exchangeAddress ethereum.Address) (*types.Transaction, error) + func (h *Huobi) TokenAddresses() (map[string]ethereum.Address, error) + func (h *Huobi) TokenPairs() ([]common.TokenPair, error) + func (h *Huobi) Trade(tradeType string, base common.Token, quote common.Token, rate float64, ...) (id string, done float64, remaining float64, finished bool, err error) + func (h *Huobi) UpdateDepositAddress(token common.Token, address string) error + func (h *Huobi) UpdatePairsPrecision() error + func (h *Huobi) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, ...) (string, error) + func (h *Huobi) WithdrawStatus(id, currency string, amount float64, timepoint uint64) (string, string, error) + type HuobiAccounts struct + Data []struct{ ... } + Reason string + Status string + type HuobiBlockchain interface + GetIntermediatorAddr func() ethereum.Address + SendETHFromAccountToExchange func(amount *big.Int, exchangeAddress ethereum.Address) (*types.Transaction, error) + SendTokenFromAccountToExchange func(amount *big.Int, exchangeAddress ethereum.Address, ...) (*types.Transaction, error) + TxStatus func(hash ethereum.Hash) (string, uint64, error) + type HuobiCancel struct + OrderID string + Reason string + Status string + type HuobiDeposit struct + Address string + Amount float64 + Currency string + ID uint64 + State string + TxHash string + TxID uint64 + type HuobiDepositAddress struct + Address string + AddressTag string + Asset string + Msg string + Reason string + Success bool + type HuobiDeposits struct + Data []HuobiDeposit + Reason string + Status string + type HuobiDepth struct + Reason string + Status string + Tick struct{ ... } + Timestamp uint64 + type HuobiExchangeInfo struct + Data []struct{ ... } + Reason string + Status string + type HuobiInfo struct + Data struct{ ... } + Reason string + Status string + type HuobiInterface interface + CancelOrder func(symbol string, id uint64) (HuobiCancel, error) + DepositHistory func(tokens []common.Token) (HuobiDeposits, error) + GetAccountTradeHistory func(base, quote common.Token) (HuobiTradeHistory, error) + GetDepositAddress func(token string) (HuobiDepositAddress, error) + GetDepthOnePair func(baseID, quoteID string) (HuobiDepth, error) + GetExchangeInfo func() (HuobiExchangeInfo, error) + GetInfo func() (HuobiInfo, error) + OrderStatus func(symbol string, id uint64) (HuobiOrder, error) + Trade func(tradeType string, base, quote common.Token, rate, amount float64, ...) (HuobiTrade, error) + Withdraw func(token common.Token, amount *big.Int, address ethereum.Address) (string, error) + WithdrawHistory func(token []common.Token) (HuobiWithdraws, error) + type HuobiOrder struct + Data struct{ ... } + Reason string + Status string + type HuobiStorage interface + GetIntermedatorTx func(id common.ActivityID) (common.TXEntry, error) + GetPendingIntermediateTXs func() (map[common.ActivityID]common.TXEntry, error) + GetTradeHistory func(fromTime, toTime uint64) (common.ExchangeTradeHistory, error) + StoreIntermediateTx func(id common.ActivityID, data common.TXEntry) error + StorePendingIntermediateTx func(id common.ActivityID, data common.TXEntry) error + StoreTradeHistory func(data common.ExchangeTradeHistory) error + type HuobiTrade struct + OrderID string + Reason string + Status string + type HuobiTradeHistory struct + Data []struct{ ... } + Status string + type HuobiWithdraw struct + ErrCode string + ID uint64 + Reason string + Status string + type HuobiWithdrawHistory struct + Address string + Amount float64 + Currency string + ID uint64 + State string + TxHash string + TxID uint64 + type HuobiWithdraws struct + Data []HuobiWithdrawHistory + Reason string + Status string + type Setting interface + ETHToken func() common.Token + GetAllTokens func() ([]common.Token, error) + GetDepositAddresses func(ex settings.ExchangeName) (common.ExchangeAddresses, error) + GetExchangeInfo func(ex settings.ExchangeName) (common.ExchangeInfo, error) + GetFee func(ex settings.ExchangeName) (common.ExchangeFees, error) + GetInternalTokenByID func(tokenID string) (common.Token, error) + GetMinDeposit func(ex settings.ExchangeName) (common.ExchangesMinDeposit, error) + GetTokenByID func(tokenID string) (common.Token, error) + UpdateDepositAddress func(name settings.ExchangeName, addrs common.ExchangeAddresses, timestamp uint64) error + UpdateExchangeInfo func(ex settings.ExchangeName, exInfo common.ExchangeInfo, timestamp uint64) error + type StableEx struct + func NewStableEx(setting Setting) (*StableEx, error) + func (se *StableEx) Address(token common.Token) (ethereum.Address, bool) + func (se *StableEx) CancelOrder(id, base, quote string) error + func (se *StableEx) DepositStatus(id common.ActivityID, txHash, currency string, amount float64, ...) (string, error) + func (se *StableEx) FetchEBalanceData(timepoint uint64) (common.EBalanceEntry, error) + func (se *StableEx) FetchPriceData(timepoint uint64, fetchBTCPrice bool) (map[common.TokenPairID]common.ExchangePrice, error) + func (se *StableEx) FetchTradeHistory(timepoint uint64) (map[common.TokenPairID][]common.TradeHistory, error) + func (se *StableEx) GetExchangeInfo(pair common.TokenPairID) (common.ExchangePrecisionLimit, error) + func (se *StableEx) GetFee() (common.ExchangeFees, error) + func (se *StableEx) GetInfo() (common.ExchangeInfo, error) + func (se *StableEx) GetLiveExchangeInfos(tokenPairIDs []common.TokenPairID) (common.ExchangeInfo, error) + func (se *StableEx) GetMinDeposit() (common.ExchangesMinDeposit, error) + func (se *StableEx) GetTradeHistory(fromTime, toTime uint64) (common.ExchangeTradeHistory, error) + func (se *StableEx) ID() common.ExchangeID + func (se *StableEx) MarshalText() (text []byte, err error) + func (se *StableEx) Name() string + func (se *StableEx) OrderStatus(id string, base, quote string) (string, error) + func (se *StableEx) QueryOrder(symbol string, id uint64) (done float64, remaining float64, finished bool, err error) + func (se *StableEx) TokenAddresses() (map[string]ethereum.Address, error) + func (se *StableEx) TokenPairs() ([]common.TokenPair, error) + func (se *StableEx) Trade(tradeType string, base common.Token, quote common.Token, rate float64, ...) (id string, done float64, remaining float64, finished bool, err error) + func (se *StableEx) UpdateDepositAddress(token common.Token, address string) error + func (se *StableEx) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, ...) (string, error) + func (se *StableEx) WithdrawStatus(id, currency string, amount float64, timepoint uint64) (string, string, error) v0.1.0 Dec 6, 2017 Changes in this version + const DEPOSIT_WAITING_TIME + const WITHDRAW_WAITING_TIME + type Binacancel struct + ClientOrderId string + Code int + Msg string + OrderId uint64 + OrigClientOrderId string + Symbol string + type Binadeposit struct + Address string + Amount float64 + Asset string + InsertTime uint64 + Status int + TxID string + type Binadepositaddress struct + Address string + AddressTag string + Asset string + Msg string + Success bool + type Binadeposits struct + Deposits []Binadeposit + Msg string + Success bool + type Binainfo struct + Balances []struct{ ... } + BuyerCommission int64 + CanDeposit bool + CanTrade bool + CanWithdraw bool + Code int + MakerCommission int64 + Msg string + SellerCommission int64 + TakerCommission int64 + type Binance struct + func NewBinance(interf BinanceInterface) *Binance + func (self *Binance) Address(token common.Token) (ethereum.Address, bool) + func (self *Binance) CancelOrder(id common.ActivityID) error + func (self *Binance) DepositStatus(id common.ActivityID, timepoint uint64) (string, error) + func (self *Binance) FetchEBalanceData(timepoint uint64) (common.EBalanceEntry, error) + func (self *Binance) FetchOrderData(timepoint uint64) (common.OrderEntry, error) + func (self *Binance) ID() common.ExchangeID + func (self *Binance) MarshalText() (text []byte, err error) + func (self *Binance) Name() string + func (self *Binance) OrderStatus(id common.ActivityID, timepoint uint64) (string, error) + func (self *Binance) TokenPairs() []common.TokenPair + func (self *Binance) Trade(tradeType string, base common.Token, quote common.Token, rate float64, ...) (id string, done float64, remaining float64, finished bool, err error) + func (self *Binance) UpdateAllDepositAddresses(address string) + func (self *Binance) UpdateDepositAddress(token common.Token, address string) + func (self *Binance) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, ...) (string, error) + func (self *Binance) WithdrawStatus(id common.ActivityID, timepoint uint64) (string, error) + func (self Binance) FetchPriceData(timepoint uint64) (map[common.TokenPairID]common.ExchangePrice, error) + type BinanceInterface interface + CancelOrder func(symbol string, id uint64) (Binacancel, error) + DepositHistory func(startTime, endTime uint64) (Binadeposits, error) + FetchOnePairData func(wg *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64) + GetInfo func(timepoint uint64) (Binainfo, error) + OpenOrdersForOnePair func(wg *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64) + OrderStatus func(symbol string, id uint64, timepoint uint64) (Binaorder, error) + Trade func(tradeType string, base, quote common.Token, rate, amount float64, ...) (id string, done float64, remaining float64, finished bool, err error) + Withdraw func(token common.Token, amount *big.Int, address ethereum.Address, ...) (string, error) + WithdrawHistory func(startTime, endTime uint64) (Binawithdrawals, error) + type Binaorder struct + ClientOrderId string + Code int + ExecutedQty string + IcebergQty string + Message string + OrderId uint64 + OrigQty string + Price string + Side string + Status string + StopPrice string + Symbol string + Time uint64 + TimeInForce string + Type string + type Binaorders []Binaorder + type Binaresp struct + Asks [][]string + Bids [][]string + Code int + LastUpdatedId int64 + Msg string + type Binatrade struct + ClientOrderID string + OrderID uint64 + Symbol string + TransactTime uint64 + type Binawithdraw struct + ID string + Message string + Success bool + type Binawithdrawal struct + Address string + Amount float64 + ApplyTime uint64 + Asset string + ID string + Status int + TxID string + type Binawithdrawals struct + Msg string + Success bool + Withdrawals []Binawithdrawal + type Bitfinex struct + func NewBitfinex(interf BitfinexInterface) *Bitfinex + func (self *Bitfinex) Address(token common.Token) (ethereum.Address, bool) + func (self *Bitfinex) FetchEBalanceData(timepoint uint64) (common.EBalanceEntry, error) + func (self *Bitfinex) FetchPriceData(timepoint uint64) (map[common.TokenPairID]common.ExchangePrice, error) + func (self *Bitfinex) ID() common.ExchangeID + func (self *Bitfinex) MarshalText() (text []byte, err error) + func (self *Bitfinex) Name() string + func (self *Bitfinex) TokenPairs() []common.TokenPair + func (self *Bitfinex) Trade(tradeType string, base common.Token, quote common.Token, rate float64, ...) (done float64, remaining float64, finished bool, err error) + func (self *Bitfinex) UpdateAllDepositAddresses(address string) + func (self *Bitfinex) UpdateDepositAddress(token common.Token, address string) + func (self *Bitfinex) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, ...) error + type BitfinexInterface interface + FetchOnePairData func(wg *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64) + GetInfo func(timepoint uint64) (Bitfinfo, error) + Trade func(tradeType string, base, quote common.Token, rate, amount float64, ...) (done float64, remaining float64, finished bool, err error) + Withdraw func(token common.Token, amount *big.Int, address ethereum.Address, ...) error + type Bitfinfo struct + Error string + Return map[string]map[string]float64 + Success int + type Bitfresp struct + Asks []map[string]string + Bids []map[string]string + type Bitftrade struct + Error string + Return struct{ ... } + Success int + type Bitfwithdraw struct + Error string + Return map[string]interface{} + Success int + type Bittinfo struct + Error string + Result struct{ ... } + Success int + type Bittresp struct + Msg string + Result map[string][]map[string]float64 + Success bool + type Bittrex struct + func NewBittrex(interf BittrexInterface) *Bittrex + func (self *Bittrex) Address(token common.Token) (ethereum.Address, bool) + func (self *Bittrex) FetchEBalanceData(timepoint uint64) (common.EBalanceEntry, error) + func (self *Bittrex) FetchPriceData(timepoint uint64) (map[common.TokenPairID]common.ExchangePrice, error) + func (self *Bittrex) ID() common.ExchangeID + func (self *Bittrex) MarshalText() (text []byte, err error) + func (self *Bittrex) Name() string + func (self *Bittrex) TokenPairs() []common.TokenPair + func (self *Bittrex) Trade(tradeType string, base common.Token, quote common.Token, rate float64, ...) (done float64, remaining float64, finished bool, err error) + func (self *Bittrex) UpdateAllDepositAddresses(address string) + func (self *Bittrex) UpdateDepositAddress(token common.Token, address string) + func (self *Bittrex) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, ...) error + type BittrexInterface interface + FetchOnePairData func(wq *sync.WaitGroup, pair common.TokenPair, data *sync.Map, timepoint uint64) + GetInfo func(timepoint uint64) (Bittinfo, error) + Trade func(tradeType string, base, quote common.Token, rate, amount float64, ...) (done float64, remaining float64, finished bool, err error) + Withdraw func(token common.Token, amount *big.Int, address ethereum.Address, ...) error + type Bitttrade struct + Error string + Return Bitttraderesult + Success int + type Bitttraderesult struct + Done float64 + OrderID int64 + Remaining float64 + type Bittwithdraw struct + Error string + Return map[string]interface{} + Success int + type Liqcancel struct + Error string + Return struct{ ... } + Success int + type Liqinfo struct + Error string + Return map[string]map[string]float64 + Success int + type Liqorderinfo struct + Error string + Return map[string]struct{ ... } + Success int + type Liqorders struct + Error string + Return map[string]struct{ ... } + Success int + type Liqresp map[string]map[string][][]float64 + type Liqtrade struct + Error string + Return struct{ ... } + Success int + type Liqui struct + func NewLiqui(interf LiquiInterface) *Liqui + func (self *Liqui) Address(token common.Token) (ethereum.Address, bool) + func (self *Liqui) CancelOrder(id common.ActivityID) error + func (self *Liqui) DepositStatus(id common.ActivityID, timepoint uint64) (string, error) + func (self *Liqui) FetchEBalanceData(timepoint uint64) (common.EBalanceEntry, error) + func (self *Liqui) FetchOrderData(timepoint uint64) (common.OrderEntry, error) + func (self *Liqui) FetchPriceData(timepoint uint64) (map[common.TokenPairID]common.ExchangePrice, error) + func (self *Liqui) ID() common.ExchangeID + func (self *Liqui) MarshalText() (text []byte, err error) + func (self *Liqui) Name() string + func (self *Liqui) OrderStatus(id common.ActivityID, timepoint uint64) (string, error) + func (self *Liqui) TokenPairs() []common.TokenPair + func (self *Liqui) Trade(tradeType string, base common.Token, quote common.Token, rate float64, ...) (id string, done float64, remaining float64, finished bool, err error) + func (self *Liqui) UpdateAllDepositAddresses(address string) + func (self *Liqui) UpdateDepositAddress(token common.Token, address string) + func (self *Liqui) Withdraw(token common.Token, amount *big.Int, address ethereum.Address, ...) (string, error) + func (self *Liqui) WithdrawStatus(id common.ActivityID, timepoint uint64) (string, error) + type LiquiInterface interface + ActiveOrders func(timepoint uint64) (Liqorders, error) + CancelOrder func(id string) (Liqcancel, error) + Depth func(tokens string, timepoint uint64) (Liqresp, error) + GetInfo func(timepoint uint64) (Liqinfo, error) + OrderInfo func(orderID string, timepoint uint64) (Liqorderinfo, error) + Trade func(tradeType string, base, quote common.Token, rate, amount float64, ...) (id string, done float64, remaining float64, finished bool, err error) + Withdraw func(token common.Token, amount *big.Int, address ethereum.Address, ...) error + type Liqwithdraw struct + Error string + Return map[string]interface{} + Success int