Versions in this module Expand all Collapse all v0 v0.4.0 Apr 25, 2019 Changes in this version + type AccountDao struct + func (_m *AccountDao) Create(account *types.Account) error + func (_m *AccountDao) Drop() + func (_m *AccountDao) GetAll() ([]types.Account, error) + func (_m *AccountDao) GetByAddress(owner common.Address) (*types.Account, error) + func (_m *AccountDao) GetByID(id bson.ObjectId) (*types.Account, error) + func (_m *AccountDao) GetTokenBalance(owner common.Address, token common.Address) (*types.TokenBalance, error) + func (_m *AccountDao) GetTokenBalances(owner common.Address) (map[common.Address]*types.TokenBalance, error) + func (_m *AccountDao) UpdateBalance(owner common.Address, token common.Address, balance *big.Int) error + func (_m *AccountDao) UpdateTokenBalance(owner common.Address, token common.Address, tokenBalance *types.TokenBalance) error + type AccountService struct + func (_m *AccountService) Create(account *types.Account) error + func (_m *AccountService) GetAll() ([]types.Account, error) + func (_m *AccountService) GetByAddress(a common.Address) (*types.Account, error) + func (_m *AccountService) GetByID(id bson.ObjectId) (*types.Account, error) + func (_m *AccountService) GetTokenBalance(owner common.Address, token common.Address) (*types.TokenBalance, error) + func (_m *AccountService) GetTokenBalances(owner common.Address) (map[common.Address]*types.TokenBalance, error) + type Engine struct + func (_m *Engine) HandleOrders(msg *rabbitmq.Message) error + type Ethereum struct + func (_m *Ethereum) Allowance(owner common.Address, spender common.Address, token common.Address) (*big.Int, error) + func (_m *Ethereum) BalanceOf(owner common.Address, token common.Address) (*big.Int, error) + func (_m *Ethereum) ExchangeAllowance(owner common.Address, token common.Address) (*big.Int, error) + func (_m *Ethereum) GetBalanceAt(a common.Address) (*big.Int, error) + func (_m *Ethereum) GetPendingNonceAt(a common.Address) (uint64, error) + func (_m *Ethereum) WaitMined(tx *types.Transaction) (*types.Receipt, error) + type EthereumClient struct + func (_m *EthereumClient) BalanceAt(ctx context.Context, contract common.Address, blockNumber *big.Int) (*big.Int, error) + func (_m *EthereumClient) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) + func (_m *EthereumClient) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error) + func (_m *EthereumClient) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error) + func (_m *EthereumClient) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error) + func (_m *EthereumClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) + func (_m *EthereumClient) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) + func (_m *EthereumClient) SendTransaction(ctx context.Context, tx *types.Transaction) error + func (_m *EthereumClient) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) + func (_m *EthereumClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) + func (_m *EthereumClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) + type EthereumProvider struct + func (_m *EthereumProvider) Allowance(owner common.Address, spender common.Address, token common.Address) (*big.Int, error) + func (_m *EthereumProvider) BalanceOf(owner common.Address, token common.Address) (*big.Int, error) + func (_m *EthereumProvider) ExchangeAllowance(owner common.Address, token common.Address) (*big.Int, error) + func (_m *EthereumProvider) GetBalanceAt(a common.Address) (*big.Int, error) + func (_m *EthereumProvider) GetPendingNonceAt(a common.Address) (uint64, error) + func (_m *EthereumProvider) WaitMined(hash common.Hash) (*types.Receipt, error) + type EthereumService struct + func (_m *EthereumService) GetBalanceAt(a common.Address) (*big.Int, error) + func (_m *EthereumService) GetPendingNonceAt(a common.Address) (uint64, error) + func (_m *EthereumService) WaitMined(tx *types.Transaction) (*types.Receipt, error) + type Exchange struct + func (_m *Exchange) CallTrade(o *types.Order, t *types.Trade, call *ethereum.CallMsg) (uint64, error) + func (_m *Exchange) FeeAccount() (common.Address, error) + func (_m *Exchange) GetAddress() common.Address + func (_m *Exchange) GetErrorEvents(logs chan *contractsinterfaces.ExchangeLogError) error + func (_m *Exchange) GetTrades(logs chan *contractsinterfaces.ExchangeLogTrade) error + func (_m *Exchange) GetTxCallOptions() *bind.CallOpts + func (_m *Exchange) ListenToErrors() (chan *contractsinterfaces.ExchangeLogError, error) + func (_m *Exchange) ListenToTrades() (chan *contractsinterfaces.ExchangeLogTrade, error) + func (_m *Exchange) Operator(a common.Address) (bool, error) + func (_m *Exchange) PrintErrors() error + func (_m *Exchange) PrintTrades() error + func (_m *Exchange) SetFeeAccount(a common.Address, txOpts *bind.TransactOpts) (*coretypes.Transaction, error) + func (_m *Exchange) SetOperator(a common.Address, isOperator bool, txOpts *bind.TransactOpts) (*coretypes.Transaction, error) + func (_m *Exchange) Trade(o *types.Order, t *types.Trade, txOpts *bind.TransactOpts) (*coretypes.Transaction, error) + type OHLCVService struct + func (_m *OHLCVService) GetOHLCV(p []types.PairAddresses, duration int64, unit string, timeInterval ...int64) ([]*types.Tick, error) + func (_m *OHLCVService) Subscribe(conn *ws.Client, bt common.Address, qt common.Address, p *types.Params) + func (_m *OHLCVService) Unsubscribe(conn *ws.Client, bt common.Address, qt common.Address, p *types.Params) + type OrderBookService struct + func (_m *OrderBookService) GetOrderBook(bt common.Address, qt common.Address) (map[string]interface{}, error) + func (_m *OrderBookService) Subscribe(conn *ws.Client, bt common.Address, qt common.Address) + func (_m *OrderBookService) Unsubscribe(conn *ws.Client, bt common.Address, qt common.Address) + type OrderDao struct + func (_m *OrderDao) Create(o *types.Order) error + func (_m *OrderDao) Drop() error + func (_m *OrderDao) GetByHash(hash common.Hash) (*types.Order, error) + func (_m *OrderDao) GetByHashes(hashes []common.Hash) ([]*types.Order, error) + func (_m *OrderDao) GetByID(id bson.ObjectId) (*types.Order, error) + func (_m *OrderDao) GetByUserAddress(addr common.Address) ([]*types.Order, error) + func (_m *OrderDao) GetCurrentByUserAddress(addr common.Address) ([]*types.Order, error) + func (_m *OrderDao) GetHistoryByUserAddress(addr common.Address) ([]*types.Order, error) + func (_m *OrderDao) GetUserLockedBalance(account common.Address, token common.Address) (*big.Int, error) + func (_m *OrderDao) Update(id bson.ObjectId, o *types.Order) error + func (_m *OrderDao) UpdateAllByHash(hash common.Hash, o *types.Order) error + func (_m *OrderDao) UpdateByHash(hash common.Hash, o *types.Order) error + func (_m *OrderDao) UpdateOrderFilledAmount(hash common.Hash, value *big.Int) error + func (_m *OrderDao) UpdateOrderStatus(hash common.Hash, status string) error + type OrderService struct + func (_m *OrderService) CancelOrder(oc *types.OrderCancel) error + func (_m *OrderService) CancelTrades(trades []*types.Trade) error + func (_m *OrderService) GetByHash(hash common.Hash) (*types.Order, error) + func (_m *OrderService) GetByID(id bson.ObjectId) (*types.Order, error) + func (_m *OrderService) GetByUserAddress(addr common.Address) ([]*types.Order, error) + func (_m *OrderService) GetCurrentByUserAddress(addr common.Address) ([]*types.Order, error) + func (_m *OrderService) GetHistoryByUserAddress(addr common.Address) ([]*types.Order, error) + func (_m *OrderService) HandleEngineResponse(res *types.EngineResponse) error + func (_m *OrderService) NewOrder(o *types.Order) error + func (_m *OrderService) RelayOrderUpdate(res *types.EngineResponse) + func (_m *OrderService) RelayTradeUpdate(res *types.EngineResponse) + func (_m *OrderService) RelayUpdateOverSocket(res *types.EngineResponse) + func (_m *OrderService) Rollback(res *types.EngineResponse) *types.EngineResponse + func (_m *OrderService) RollbackOrder(o *types.Order) error + func (_m *OrderService) RollbackTrade(o *types.Order, t *types.Trade) error + type PairDao struct + func (_m *PairDao) Create(o *types.Pair) error + func (_m *PairDao) GetActivePairs() ([]*types.Pair, error) + func (_m *PairDao) GetAll() ([]types.Pair, error) + func (_m *PairDao) GetByID(id bson.ObjectId) (*types.Pair, error) + func (_m *PairDao) GetByName(name string) (*types.Pair, error) + func (_m *PairDao) GetByTokenAddress(baseToken common.Address, quoteToken common.Address) (*types.Pair, error) + func (_m *PairDao) GetByTokenSymbols(baseTokenSymbol string, quoteTokenSymbol string) (*types.Pair, error) + type PairService struct + func (_m *PairService) Create(pair *types.Pair) error + func (_m *PairService) GetAll() ([]*types.Pair, error) + func (_m *PairService) GetAllTokenPairData() ([]*types.Tick, error) + func (_m *PairService) GetByID(id bson.ObjectId) (*types.Pair, error) + func (_m *PairService) GetByTokenAddress(bt common.Address, qt common.Address) (*types.Pair, error) + func (_m *PairService) GetTokenPairData(bt, qt common.Address) ([]*types.Tick, error) + type TokenDao struct + func (_m *TokenDao) Create(token *types.Token) error + func (_m *TokenDao) Drop() error + func (_m *TokenDao) GetAll() ([]types.Token, error) + func (_m *TokenDao) GetBaseTokens() ([]types.Token, error) + func (_m *TokenDao) GetByAddress(owner common.Address) (*types.Token, error) + func (_m *TokenDao) GetByID(id bson.ObjectId) (*types.Token, error) + func (_m *TokenDao) GetQuoteTokens() ([]types.Token, error) + type TokenService struct + func (_m *TokenService) Create(token *types.Token) error + func (_m *TokenService) GetAll() ([]types.Token, error) + func (_m *TokenService) GetBaseTokens() ([]types.Token, error) + func (_m *TokenService) GetByAddress(addr common.Address) (*types.Token, error) + func (_m *TokenService) GetByID(id bson.ObjectId) (*types.Token, error) + func (_m *TokenService) GetQuoteTokens() ([]types.Token, error) + type TradeDao struct + func (_m *TradeDao) Aggregate(q []bson.M) ([]*types.Tick, error) + func (_m *TradeDao) Create(o ...*types.Trade) error + func (_m *TradeDao) Drop() + func (_m *TradeDao) GetAll() ([]types.Trade, error) + func (_m *TradeDao) GetAllTradesByPairAddress(bt common.Address, qt common.Address) ([]*types.Trade, error) + func (_m *TradeDao) GetByHash(h common.Hash) (*types.Trade, error) + func (_m *TradeDao) GetByMakerOrderHash(h common.Hash) ([]*types.Trade, error) + func (_m *TradeDao) GetByOrderHashes(hashes []common.Hash) ([]*types.Trade, error) + func (_m *TradeDao) GetByPairName(name string) ([]*types.Trade, error) + func (_m *TradeDao) GetByTakerOrderHash(h common.Hash) ([]*types.Trade, error) + func (_m *TradeDao) GetByUserAddress(a common.Address) ([]*types.Trade, error) + func (_m *TradeDao) GetNTradesByPairAddress(bt common.Address, qt common.Address, n int) ([]*types.Trade, error) + func (_m *TradeDao) GetSortedTrades(bt common.Address, qt common.Address, n int) ([]*types.Trade, error) + func (_m *TradeDao) GetTradesByPairAddress(bt common.Address, qt common.Address, n int) ([]*types.Trade, error) + func (_m *TradeDao) Update(t *types.Trade) error + func (_m *TradeDao) UpdateByHash(h common.Hash, t *types.Trade) error + func (_m *TradeDao) UpdateTradeStatus(h common.Hash, status string) error + func (_m *TradeDao) UpdateTradeStatuses(status string, hashes ...common.Hash) ([]*types.Trade, error) + func (_m *TradeDao) UpdateTradeStatusesByOrderHashes(status string, hashes ...common.Hash) ([]*types.Trade, error) + type TradeService struct + func (_m *TradeService) GetAllTradesByPairAddress(bt, qt common.Address) ([]*types.Trade, error) + func (_m *TradeService) GetByHash(hash common.Hash) (*types.Trade, error) + func (_m *TradeService) GetByMakerOrderHash(h common.Hash) ([]*types.Trade, error) + func (_m *TradeService) GetByOrderHash(hash common.Hash) ([]*types.Trade, error) + func (_m *TradeService) GetByOrderHashes(h []common.Hash) ([]*types.Trade, error) + func (_m *TradeService) GetByPairAddress(bt common.Address, qt common.Address) ([]*types.Trade, error) + func (_m *TradeService) GetByPairName(p string) ([]*types.Trade, error) + func (_m *TradeService) GetByTakerOrderHash(h common.Hash) ([]*types.Trade, error) + func (_m *TradeService) GetByUserAddress(addr common.Address) ([]*types.Trade, error) + func (_m *TradeService) GetSortedTrades(bt, qt common.Address, n int) ([]*types.Trade, error) + func (_m *TradeService) GetSortedTradesByUserAddress(a common.Address, limit ...int) ([]*types.Trade, error) + func (_m *TradeService) Unsubscribe(c *ws.Client) + func (_m *TradeService) UnsubscribeChannel(c *ws.Client, bt, qt common.Address) + func (_m *TradeService) UpdateTradeTxHash(tr *types.Trade, txHash common.Hash) error + type TxService struct + func (_m *TxService) GetCustomTxSendOptions(w *types.Wallet) *bind.TransactOpts + func (_m *TxService) GetTxCallOptions() *bind.CallOpts + func (_m *TxService) GetTxDefaultSendOptions() (*bind.TransactOpts, error) + func (_m *TxService) GetTxSendOptions() (*bind.TransactOpts, error) + func (_m *TxService) SetTxSender(w *types.Wallet) + type WalletDao struct + func (_m *WalletDao) Create(wallet *types.Wallet) error + func (_m *WalletDao) GetAll() ([]types.Wallet, error) + func (_m *WalletDao) GetByAddress(addr common.Address) (*types.Wallet, error) + func (_m *WalletDao) GetByID(id bson.ObjectId) (*types.Wallet, error) + func (_m *WalletDao) GetDefaultAdminWallet() (*types.Wallet, error) + func (_m *WalletDao) GetOperatorWallets() ([]*types.Wallet, error) + type WalletService struct + func (_m *WalletService) CreateAdminWallet(a common.Address) (*types.Wallet, error) + func (_m *WalletService) GetAll() ([]types.Wallet, error) + func (_m *WalletService) GetByAddress(a common.Address) (*types.Wallet, error) + func (_m *WalletService) GetDefaultAdminWallet() (*types.Wallet, error) + func (_m *WalletService) GetOperatorWallets() ([]*types.Wallet, error)