Documentation ¶
Index ¶
- type AccountDao
- func (_m *AccountDao) Create(account *types.Account) error
- func (_m *AccountDao) Drop()
- func (_m *AccountDao) FindOrCreate(addr string) (*types.Account, error)
- func (_m *AccountDao) GetAll() ([]types.Account, error)
- func (_m *AccountDao) GetByAddress(owner string) (*types.Account, error)
- func (_m *AccountDao) GetByID(id bson.ObjectId) (*types.Account, error)
- func (_m *AccountDao) GetTokenBalance(owner string, token string) (*types.TokenBalance, error)
- func (_m *AccountDao) GetTokenBalances(owner string) (map[string]*types.TokenBalance, error)
- func (_m *AccountDao) UpdateBalance(owner string, token string, balance int64) error
- func (_m *AccountDao) UpdateTokenBalance(owner string, token string, tokenBalance *types.TokenBalance) error
- type AccountService
- func (_m *AccountService) Create(account *types.Account) error
- func (_m *AccountService) FindOrCreate(address string) (*types.Account, error)
- func (_m *AccountService) GetAll() ([]types.Account, error)
- func (_m *AccountService) GetByAddress(address string) (*types.Account, error)
- func (_m *AccountService) GetByID(id bson.ObjectId) (*types.Account, error)
- func (_m *AccountService) GetTokenBalance(owner string, token string) (*types.TokenBalance, error)
- func (_m *AccountService) GetTokenBalances(owner string) (map[string]*types.TokenBalance, error)
- type Engine
- type InfoService
- type OHLCVService
- func (_m *OHLCVService) GetOHLCV(p []types.PairAssets, duration int64, unit string, timeInterval ...int64) ([]*types.Tick, error)
- func (_m *OHLCVService) Subscribe(c *ws.Client, p *types.SubscriptionPayload)
- func (_m *OHLCVService) Unsubscribe(c *ws.Client)
- func (_m *OHLCVService) UnsubscribeChannel(c *ws.Client, p *types.SubscriptionPayload)
- type ObyteProvider
- func (_m *ObyteProvider) AddOrder(signedOrder *interface{}) (string, error)
- func (_m *ObyteProvider) Asset(symbol string) (string, error)
- func (_m *ObyteProvider) BalanceOf(owner string, token string) (int64, error)
- func (_m *ObyteProvider) CancelOrder(signedCancel *interface{}) error
- func (_m *ObyteProvider) Decimals(token string) (uint8, error)
- func (_m *ObyteProvider) ExecuteTrade(m *types.Matches) ([]string, error)
- func (_m *ObyteProvider) GetAuthorizedAddresses(address string) ([]string, error)
- func (_m *ObyteProvider) GetBalances(owner string) map[string]int64
- func (_m *ObyteProvider) GetFees() (float64, float64)
- func (_m *ObyteProvider) GetOperatorAddress() string
- func (_m *ObyteProvider) ListenToEvents() (chan map[string]interface{}, error)
- func (_m *ObyteProvider) Symbol(token string) (string, error)
- type OrderBookService
- func (_m *OrderBookService) GetOrderBook(bt string, qt string) (map[string]interface{}, error)
- func (_m *OrderBookService) GetRawOrderBook(bt string, qt string) (*types.RawOrderBook, error)
- func (_m *OrderBookService) SubscribeOrderBook(c *ws.Client, bt string, qt string)
- func (_m *OrderBookService) SubscribeRawOrderBook(c *ws.Client, bt string, qt string)
- func (_m *OrderBookService) UnsubscribeOrderBook(c *ws.Client)
- func (_m *OrderBookService) UnsubscribeOrderBookChannel(c *ws.Client, bt string, qt string)
- func (_m *OrderBookService) UnsubscribeRawOrderBook(c *ws.Client)
- func (_m *OrderBookService) UnsubscribeRawOrderBookChannel(c *ws.Client, bt string, qt string)
- type OrderDao
- func (_m *OrderDao) Aggregate(q []bson.M) ([]*types.OrderData, error)
- func (_m *OrderDao) Create(o *types.Order) error
- func (_m *OrderDao) Delete(orders ...*types.Order) error
- func (_m *OrderDao) DeleteByHashes(hashes ...string) error
- func (_m *OrderDao) Drop() error
- func (_m *OrderDao) FindAndModify(h string, o *types.Order) (*types.Order, error)
- func (_m *OrderDao) GetByHash(h string) (*types.Order, error)
- func (_m *OrderDao) GetByHashes(hashes []string) ([]*types.Order, error)
- func (_m *OrderDao) GetByID(id bson.ObjectId) (*types.Order, error)
- func (_m *OrderDao) GetByUserAddress(addr string, limit ...int) ([]*types.Order, error)
- func (_m *OrderDao) GetCurrentByUserAddress(a string, limit ...int) ([]*types.Order, error)
- func (_m *OrderDao) GetCurrentByUserAddressAndSignerAddress(address string, signer string) ([]*types.Order, error)
- func (_m *OrderDao) GetExpiredOrders() ([]*types.Order, error)
- func (_m *OrderDao) GetHistoryByUserAddress(a string, limit ...int) ([]*types.Order, error)
- func (_m *OrderDao) GetMatchingBuyOrders(o *types.Order) ([]*types.Order, error)
- func (_m *OrderDao) GetMatchingSellOrders(o *types.Order) ([]*types.Order, error)
- func (_m *OrderDao) GetOrderBook(_a0 *types.Pair) ([]map[string]interface{}, []map[string]interface{}, error)
- func (_m *OrderDao) GetOrderBookPrice(p *types.Pair, pp float64, side string) (int64, string, error)
- func (_m *OrderDao) GetRawOrderBook(_a0 *types.Pair) ([]*types.Order, error)
- func (_m *OrderDao) GetUserLockedBalance(account string, token string) (int64, []*types.Order, error)
- func (_m *OrderDao) Update(id bson.ObjectId, o *types.Order) error
- func (_m *OrderDao) UpdateAllByHash(h string, o *types.Order) error
- func (_m *OrderDao) UpdateByHash(h string, o *types.Order) error
- func (_m *OrderDao) UpdateOrderFilledAmount(h string, value int64) error
- func (_m *OrderDao) UpdateOrderFilledAmounts(h []string, values []int64) ([]*types.Order, error)
- func (_m *OrderDao) UpdateOrderStatus(h string, status string) error
- func (_m *OrderDao) UpdateOrderStatusesByHashes(status string, hashes ...string) ([]*types.Order, error)
- func (_m *OrderDao) Upsert(id bson.ObjectId, o *types.Order) error
- func (_m *OrderDao) UpsertByHash(h string, o *types.Order) error
- type OrderService
- func (_m *OrderService) AdjustBalancesForUncommittedTrades(address string, balances map[string]int64) map[string]int64
- func (_m *OrderService) CancelExpiredOrders()
- func (_m *OrderService) CancelOrder(oc *types.OrderCancel) error
- func (_m *OrderService) CancelOrdersSignedByRevokedSigner(address string, signer string)
- func (_m *OrderService) CheckIfBalancesAreSufficientAndCancel(address string, balances map[string]int64)
- func (_m *OrderService) FixOrderStatus(o *types.Order)
- func (_m *OrderService) GetByHash(h string) (*types.Order, error)
- func (_m *OrderService) GetByHashes(hashes []string) ([]*types.Order, error)
- func (_m *OrderService) GetByID(id bson.ObjectId) (*types.Order, error)
- func (_m *OrderService) GetByUserAddress(a string, limit ...int) ([]*types.Order, error)
- func (_m *OrderService) GetCurrentByUserAddress(a string, limit ...int) ([]*types.Order, error)
- func (_m *OrderService) GetHistoryByUserAddress(a string, limit ...int) ([]*types.Order, error)
- func (_m *OrderService) GetSenderAddresses(oc *types.OrderCancel) (string, string, error)
- func (_m *OrderService) HandleEngineResponse(res *types.EngineResponse) error
- func (_m *OrderService) NewOrder(o *types.Order) error
- type PairDao
- 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) GetByAsset(baseToken string, quoteToken string) (*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) GetByTokenSymbols(baseTokenSymbol string, quoteTokenSymbol string) (*types.Pair, error)
- func (_m *PairDao) GetDefaultPairs() ([]types.Pair, error)
- func (_m *PairDao) GetListedPairs() ([]types.Pair, error)
- func (_m *PairDao) GetUnlistedPairs() ([]types.Pair, error)
- type PairService
- func (_m *PairService) Create(pair *types.Pair) error
- func (_m *PairService) CreatePairs(token string) ([]*types.Pair, error)
- func (_m *PairService) GetAll() ([]types.Pair, error)
- func (_m *PairService) GetAllExactTokenPairData() ([]*types.PairData, error)
- func (_m *PairService) GetAllSimplifiedTokenPairData() ([]*types.SimplifiedPairAPIData, error)
- func (_m *PairService) GetAllTokenPairData() ([]*types.PairAPIData, error)
- func (_m *PairService) GetByAsset(bt string, qt string) (*types.Pair, error)
- func (_m *PairService) GetByID(id bson.ObjectId) (*types.Pair, error)
- func (_m *PairService) GetListedPairs() ([]types.Pair, error)
- func (_m *PairService) GetTokenPairData(bt string, qt string) ([]*types.Tick, error)
- func (_m *PairService) GetUnlistedPairs() ([]types.Pair, error)
- type PriceService
- type TokenDao
- 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) GetByAsset(asset string) (*types.Token, error)
- func (_m *TokenDao) GetByAssetOrSymbol(assetOrSymbol string) (*types.Token, error)
- func (_m *TokenDao) GetByID(id bson.ObjectId) (*types.Token, error)
- func (_m *TokenDao) GetBySymbol(symbol string) (*types.Token, error)
- func (_m *TokenDao) GetListedBaseTokens() ([]types.Token, error)
- func (_m *TokenDao) GetListedTokens() ([]types.Token, error)
- func (_m *TokenDao) GetQuoteTokens() ([]types.Token, error)
- func (_m *TokenDao) GetUnlistedTokens() ([]types.Token, error)
- type TokenService
- func (_m *TokenService) CheckByAssetOrSymbol(a string) (*types.Token, error)
- 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) GetByAsset(a string) (*types.Token, error)
- func (_m *TokenService) GetByAssetOrSymbol(a string) (*types.Token, error)
- func (_m *TokenService) GetByID(id bson.ObjectId) (*types.Token, error)
- func (_m *TokenService) GetBySymbol(s string) (*types.Token, error)
- func (_m *TokenService) GetListedBaseTokens() ([]types.Token, error)
- func (_m *TokenService) GetListedTokens() ([]types.Token, error)
- func (_m *TokenService) GetQuoteTokens() ([]types.Token, error)
- func (_m *TokenService) GetUnlistedTokens() ([]types.Token, error)
- type TradeDao
- 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) FindAndModify(h string, t *types.Trade) (*types.Trade, error)
- func (_m *TradeDao) GetAll() ([]types.Trade, error)
- func (_m *TradeDao) GetAllTradesByPairAssets(bt string, qt string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByHash(h string) (*types.Trade, error)
- func (_m *TradeDao) GetByHashes(hashes []string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByMakerOrderHash(h string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByOrderHashes(hashes []string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByPairName(name string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByTakerOrderHash(h string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByTriggerUnitHash(h string) ([]*types.Trade, error)
- func (_m *TradeDao) GetByUserAddress(a string) ([]*types.Trade, error)
- func (_m *TradeDao) GetErroredTradeCount(start time.Time, end time.Time) (int, error)
- func (_m *TradeDao) GetNTradesByPairAssets(bt string, qt string, n int) ([]*types.Trade, error)
- func (_m *TradeDao) GetSortedTrades(bt string, qt string, n int) ([]*types.Trade, error)
- func (_m *TradeDao) GetSortedTradesByUserAddress(a string, limit ...int) ([]*types.Trade, error)
- func (_m *TradeDao) GetTradesByPairAssets(bt string, qt string, n int) ([]*types.Trade, error)
- func (_m *TradeDao) GetUncommittedTradesByUserAddress(a string) []*types.Trade
- func (_m *TradeDao) Update(t *types.Trade) error
- func (_m *TradeDao) UpdateByHash(h string, t *types.Trade) error
- func (_m *TradeDao) UpdateTradeStatus(h string, status string) error
- func (_m *TradeDao) UpdateTradeStatuses(status string, hashes ...string) ([]*types.Trade, error)
- func (_m *TradeDao) UpdateTradeStatusesByOrderHashes(status string, hashes ...string) ([]*types.Trade, error)
- type TradeService
- func (_m *TradeService) GetAllTradesByPairAssets(bt string, qt string) ([]*types.Trade, error)
- func (_m *TradeService) GetByHash(h string) (*types.Trade, error)
- func (_m *TradeService) GetByHashes(hashes []string) ([]*types.Trade, error)
- func (_m *TradeService) GetByMakerOrderHash(h string) ([]*types.Trade, error)
- func (_m *TradeService) GetByOrderHashes(h []string) ([]*types.Trade, error)
- func (_m *TradeService) GetByPairName(p string) ([]*types.Trade, error)
- func (_m *TradeService) GetByTakerOrderHash(h string) ([]*types.Trade, error)
- func (_m *TradeService) GetByTriggerUnitHash(h string) ([]*types.Trade, error)
- func (_m *TradeService) GetByUserAddress(a string) ([]*types.Trade, error)
- func (_m *TradeService) GetSortedTrades(bt string, qt string, n int) ([]*types.Trade, error)
- func (_m *TradeService) GetSortedTradesByUserAddress(a string, limit ...int) ([]*types.Trade, error)
- func (_m *TradeService) Subscribe(c *ws.Client, bt string, qt string)
- func (_m *TradeService) Unsubscribe(c *ws.Client)
- func (_m *TradeService) UnsubscribeChannel(c *ws.Client, bt string, qt string)
- func (_m *TradeService) UpdatePendingTrade(t *types.Trade, txh string) (*types.Trade, error)
- func (_m *TradeService) UpdateSuccessfulTrade(t *types.Trade) (*types.Trade, error)
- func (_m *TradeService) UpdateTradeStatus(t *types.Trade, status string) (*types.Trade, error)
- func (_m *TradeService) UpdateTradeTxHash(tr *types.Trade, txh string) error
- type ValidatorService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDao ¶
AccountDao is an autogenerated mock type for the AccountDao type
func (*AccountDao) Create ¶
func (_m *AccountDao) Create(account *types.Account) error
Create provides a mock function with given fields: account
func (*AccountDao) Drop ¶
func (_m *AccountDao) Drop()
Drop provides a mock function with given fields:
func (*AccountDao) FindOrCreate ¶
func (_m *AccountDao) FindOrCreate(addr string) (*types.Account, error)
FindOrCreate provides a mock function with given fields: addr
func (*AccountDao) GetAll ¶
func (_m *AccountDao) GetAll() ([]types.Account, error)
GetAll provides a mock function with given fields:
func (*AccountDao) GetByAddress ¶
func (_m *AccountDao) GetByAddress(owner string) (*types.Account, error)
GetByAddress provides a mock function with given fields: owner
func (*AccountDao) GetTokenBalance ¶
func (_m *AccountDao) GetTokenBalance(owner string, token string) (*types.TokenBalance, error)
GetTokenBalance provides a mock function with given fields: owner, token
func (*AccountDao) GetTokenBalances ¶
func (_m *AccountDao) GetTokenBalances(owner string) (map[string]*types.TokenBalance, error)
GetTokenBalances provides a mock function with given fields: owner
func (*AccountDao) UpdateBalance ¶
func (_m *AccountDao) UpdateBalance(owner string, token string, balance int64) error
UpdateBalance provides a mock function with given fields: owner, token, balance
func (*AccountDao) UpdateTokenBalance ¶
func (_m *AccountDao) UpdateTokenBalance(owner string, token string, tokenBalance *types.TokenBalance) error
UpdateTokenBalance provides a mock function with given fields: owner, token, tokenBalance
type AccountService ¶
AccountService is an autogenerated mock type for the AccountService type
func (*AccountService) Create ¶
func (_m *AccountService) Create(account *types.Account) error
Create provides a mock function with given fields: account
func (*AccountService) FindOrCreate ¶
func (_m *AccountService) FindOrCreate(address string) (*types.Account, error)
FindOrCreate provides a mock function with given fields: address
func (*AccountService) GetAll ¶
func (_m *AccountService) GetAll() ([]types.Account, error)
GetAll provides a mock function with given fields:
func (*AccountService) GetByAddress ¶
func (_m *AccountService) GetByAddress(address string) (*types.Account, error)
GetByAddress provides a mock function with given fields: address
func (*AccountService) GetTokenBalance ¶
func (_m *AccountService) GetTokenBalance(owner string, token string) (*types.TokenBalance, error)
GetTokenBalance provides a mock function with given fields: owner, token
func (*AccountService) GetTokenBalances ¶
func (_m *AccountService) GetTokenBalances(owner string) (map[string]*types.TokenBalance, error)
GetTokenBalances provides a mock function with given fields: owner
type InfoService ¶
InfoService is an autogenerated mock type for the InfoService type
func (*InfoService) GetExchangeData ¶
func (_m *InfoService) GetExchangeData() (*types.ExchangeData, error)
GetExchangeData provides a mock function with given fields:
func (*InfoService) GetExchangeStats ¶
func (_m *InfoService) GetExchangeStats() (*types.ExchangeStats, error)
GetExchangeStats provides a mock function with given fields:
func (*InfoService) GetPairStats ¶
func (_m *InfoService) GetPairStats() (*types.PairStats, error)
GetPairStats provides a mock function with given fields:
type OHLCVService ¶
OHLCVService is an autogenerated mock type for the OHLCVService type
func (*OHLCVService) GetOHLCV ¶
func (_m *OHLCVService) GetOHLCV(p []types.PairAssets, duration int64, unit string, timeInterval ...int64) ([]*types.Tick, error)
GetOHLCV provides a mock function with given fields: p, duration, unit, timeInterval
func (*OHLCVService) Subscribe ¶
func (_m *OHLCVService) Subscribe(c *ws.Client, p *types.SubscriptionPayload)
Subscribe provides a mock function with given fields: c, p
func (*OHLCVService) Unsubscribe ¶
func (_m *OHLCVService) Unsubscribe(c *ws.Client)
Unsubscribe provides a mock function with given fields: c
func (*OHLCVService) UnsubscribeChannel ¶
func (_m *OHLCVService) UnsubscribeChannel(c *ws.Client, p *types.SubscriptionPayload)
UnsubscribeChannel provides a mock function with given fields: c, p
type ObyteProvider ¶
ObyteProvider is an autogenerated mock type for the ObyteProvider type
func (*ObyteProvider) AddOrder ¶
func (_m *ObyteProvider) AddOrder(signedOrder *interface{}) (string, error)
AddOrder provides a mock function with given fields: signedOrder
func (*ObyteProvider) Asset ¶
func (_m *ObyteProvider) Asset(symbol string) (string, error)
Asset provides a mock function with given fields: symbol
func (*ObyteProvider) BalanceOf ¶
func (_m *ObyteProvider) BalanceOf(owner string, token string) (int64, error)
BalanceOf provides a mock function with given fields: owner, token
func (*ObyteProvider) CancelOrder ¶
func (_m *ObyteProvider) CancelOrder(signedCancel *interface{}) error
CancelOrder provides a mock function with given fields: signedCancel
func (*ObyteProvider) Decimals ¶
func (_m *ObyteProvider) Decimals(token string) (uint8, error)
Decimals provides a mock function with given fields: token
func (*ObyteProvider) ExecuteTrade ¶
func (_m *ObyteProvider) ExecuteTrade(m *types.Matches) ([]string, error)
ExecuteTrade provides a mock function with given fields: m
func (*ObyteProvider) GetAuthorizedAddresses ¶
func (_m *ObyteProvider) GetAuthorizedAddresses(address string) ([]string, error)
GetAuthorizedAddresses provides a mock function with given fields: address
func (*ObyteProvider) GetBalances ¶
func (_m *ObyteProvider) GetBalances(owner string) map[string]int64
GetBalances provides a mock function with given fields: owner
func (*ObyteProvider) GetFees ¶
func (_m *ObyteProvider) GetFees() (float64, float64)
GetFees provides a mock function with given fields:
func (*ObyteProvider) GetOperatorAddress ¶
func (_m *ObyteProvider) GetOperatorAddress() string
GetOperatorAddress provides a mock function with given fields:
func (*ObyteProvider) ListenToEvents ¶
func (_m *ObyteProvider) ListenToEvents() (chan map[string]interface{}, error)
ListenToEvents provides a mock function with given fields:
type OrderBookService ¶
OrderBookService is an autogenerated mock type for the OrderBookService type
func (*OrderBookService) GetOrderBook ¶
func (_m *OrderBookService) GetOrderBook(bt string, qt string) (map[string]interface{}, error)
GetOrderBook provides a mock function with given fields: bt, qt
func (*OrderBookService) GetRawOrderBook ¶
func (_m *OrderBookService) GetRawOrderBook(bt string, qt string) (*types.RawOrderBook, error)
GetRawOrderBook provides a mock function with given fields: bt, qt
func (*OrderBookService) SubscribeOrderBook ¶
func (_m *OrderBookService) SubscribeOrderBook(c *ws.Client, bt string, qt string)
SubscribeOrderBook provides a mock function with given fields: c, bt, qt
func (*OrderBookService) SubscribeRawOrderBook ¶
func (_m *OrderBookService) SubscribeRawOrderBook(c *ws.Client, bt string, qt string)
SubscribeRawOrderBook provides a mock function with given fields: c, bt, qt
func (*OrderBookService) UnsubscribeOrderBook ¶
func (_m *OrderBookService) UnsubscribeOrderBook(c *ws.Client)
UnsubscribeOrderBook provides a mock function with given fields: c
func (*OrderBookService) UnsubscribeOrderBookChannel ¶
func (_m *OrderBookService) UnsubscribeOrderBookChannel(c *ws.Client, bt string, qt string)
UnsubscribeOrderBookChannel provides a mock function with given fields: c, bt, qt
func (*OrderBookService) UnsubscribeRawOrderBook ¶
func (_m *OrderBookService) UnsubscribeRawOrderBook(c *ws.Client)
UnsubscribeRawOrderBook provides a mock function with given fields: c
func (*OrderBookService) UnsubscribeRawOrderBookChannel ¶
func (_m *OrderBookService) UnsubscribeRawOrderBookChannel(c *ws.Client, bt string, qt string)
UnsubscribeRawOrderBookChannel provides a mock function with given fields: c, bt, qt
type OrderDao ¶
OrderDao is an autogenerated mock type for the OrderDao type
func (*OrderDao) DeleteByHashes ¶
DeleteByHashes provides a mock function with given fields: hashes
func (*OrderDao) FindAndModify ¶
FindAndModify provides a mock function with given fields: h, o
func (*OrderDao) GetByHashes ¶
GetByHashes provides a mock function with given fields: hashes
func (*OrderDao) GetByUserAddress ¶
GetByUserAddress provides a mock function with given fields: addr, limit
func (*OrderDao) GetCurrentByUserAddress ¶
GetCurrentByUserAddress provides a mock function with given fields: a, limit
func (*OrderDao) GetCurrentByUserAddressAndSignerAddress ¶
func (_m *OrderDao) GetCurrentByUserAddressAndSignerAddress(address string, signer string) ([]*types.Order, error)
GetCurrentByUserAddressAndSignerAddress provides a mock function with given fields: address, signer
func (*OrderDao) GetExpiredOrders ¶
GetExpiredOrders provides a mock function with given fields:
func (*OrderDao) GetHistoryByUserAddress ¶
GetHistoryByUserAddress provides a mock function with given fields: a, limit
func (*OrderDao) GetMatchingBuyOrders ¶
GetMatchingBuyOrders provides a mock function with given fields: o
func (*OrderDao) GetMatchingSellOrders ¶
GetMatchingSellOrders provides a mock function with given fields: o
func (*OrderDao) GetOrderBook ¶
func (_m *OrderDao) GetOrderBook(_a0 *types.Pair) ([]map[string]interface{}, []map[string]interface{}, error)
GetOrderBook provides a mock function with given fields: _a0
func (*OrderDao) GetOrderBookPrice ¶
func (_m *OrderDao) GetOrderBookPrice(p *types.Pair, pp float64, side string) (int64, string, error)
GetOrderBookPrice provides a mock function with given fields: p, pp, side
func (*OrderDao) GetRawOrderBook ¶
GetRawOrderBook provides a mock function with given fields: _a0
func (*OrderDao) GetUserLockedBalance ¶
func (_m *OrderDao) GetUserLockedBalance(account string, token string) (int64, []*types.Order, error)
GetUserLockedBalance provides a mock function with given fields: account, token
func (*OrderDao) UpdateAllByHash ¶
UpdateAllByHash provides a mock function with given fields: h, o
func (*OrderDao) UpdateByHash ¶
UpdateByHash provides a mock function with given fields: h, o
func (*OrderDao) UpdateOrderFilledAmount ¶
UpdateOrderFilledAmount provides a mock function with given fields: h, value
func (*OrderDao) UpdateOrderFilledAmounts ¶
UpdateOrderFilledAmounts provides a mock function with given fields: h, values
func (*OrderDao) UpdateOrderStatus ¶
UpdateOrderStatus provides a mock function with given fields: h, status
func (*OrderDao) UpdateOrderStatusesByHashes ¶
func (_m *OrderDao) UpdateOrderStatusesByHashes(status string, hashes ...string) ([]*types.Order, error)
UpdateOrderStatusesByHashes provides a mock function with given fields: status, hashes
type OrderService ¶
OrderService is an autogenerated mock type for the OrderService type
func (*OrderService) AdjustBalancesForUncommittedTrades ¶
func (_m *OrderService) AdjustBalancesForUncommittedTrades(address string, balances map[string]int64) map[string]int64
AdjustBalancesForUncommittedTrades provides a mock function with given fields: address, balances
func (*OrderService) CancelExpiredOrders ¶
func (_m *OrderService) CancelExpiredOrders()
CancelExpiredOrders provides a mock function with given fields:
func (*OrderService) CancelOrder ¶
func (_m *OrderService) CancelOrder(oc *types.OrderCancel) error
CancelOrder provides a mock function with given fields: oc
func (*OrderService) CancelOrdersSignedByRevokedSigner ¶
func (_m *OrderService) CancelOrdersSignedByRevokedSigner(address string, signer string)
CancelOrdersSignedByRevokedSigner provides a mock function with given fields: address, signer
func (*OrderService) CheckIfBalancesAreSufficientAndCancel ¶
func (_m *OrderService) CheckIfBalancesAreSufficientAndCancel(address string, balances map[string]int64)
CheckIfBalancesAreSufficientAndCancel provides a mock function with given fields: address, balances
func (*OrderService) FixOrderStatus ¶
func (_m *OrderService) FixOrderStatus(o *types.Order)
FixOrderStatus provides a mock function with given fields: o
func (*OrderService) GetByHash ¶
func (_m *OrderService) GetByHash(h string) (*types.Order, error)
GetByHash provides a mock function with given fields: h
func (*OrderService) GetByHashes ¶
func (_m *OrderService) GetByHashes(hashes []string) ([]*types.Order, error)
GetByHashes provides a mock function with given fields: hashes
func (*OrderService) GetByUserAddress ¶
GetByUserAddress provides a mock function with given fields: a, limit
func (*OrderService) GetCurrentByUserAddress ¶
GetCurrentByUserAddress provides a mock function with given fields: a, limit
func (*OrderService) GetHistoryByUserAddress ¶
GetHistoryByUserAddress provides a mock function with given fields: a, limit
func (*OrderService) GetSenderAddresses ¶
func (_m *OrderService) GetSenderAddresses(oc *types.OrderCancel) (string, string, error)
GetSenderAddresses provides a mock function with given fields: oc
func (*OrderService) HandleEngineResponse ¶
func (_m *OrderService) HandleEngineResponse(res *types.EngineResponse) error
HandleEngineResponse provides a mock function with given fields: res
type PairDao ¶
PairDao is an autogenerated mock type for the PairDao type
func (*PairDao) GetActivePairs ¶
GetActivePairs provides a mock function with given fields:
func (*PairDao) GetByAsset ¶
GetByAsset provides a mock function with given fields: baseToken, quoteToken
func (*PairDao) GetByTokenSymbols ¶
func (_m *PairDao) GetByTokenSymbols(baseTokenSymbol string, quoteTokenSymbol string) (*types.Pair, error)
GetByTokenSymbols provides a mock function with given fields: baseTokenSymbol, quoteTokenSymbol
func (*PairDao) GetDefaultPairs ¶
GetDefaultPairs provides a mock function with given fields:
func (*PairDao) GetListedPairs ¶
GetListedPairs provides a mock function with given fields:
type PairService ¶
PairService is an autogenerated mock type for the PairService type
func (*PairService) Create ¶
func (_m *PairService) Create(pair *types.Pair) error
Create provides a mock function with given fields: pair
func (*PairService) CreatePairs ¶
func (_m *PairService) CreatePairs(token string) ([]*types.Pair, error)
CreatePairs provides a mock function with given fields: token
func (*PairService) GetAll ¶
func (_m *PairService) GetAll() ([]types.Pair, error)
GetAll provides a mock function with given fields:
func (*PairService) GetAllExactTokenPairData ¶
func (_m *PairService) GetAllExactTokenPairData() ([]*types.PairData, error)
GetAllExactTokenPairData provides a mock function with given fields:
func (*PairService) GetAllSimplifiedTokenPairData ¶
func (_m *PairService) GetAllSimplifiedTokenPairData() ([]*types.SimplifiedPairAPIData, error)
GetAllSimplifiedTokenPairData provides a mock function with given fields:
func (*PairService) GetAllTokenPairData ¶
func (_m *PairService) GetAllTokenPairData() ([]*types.PairAPIData, error)
GetAllTokenPairData provides a mock function with given fields:
func (*PairService) GetByAsset ¶
GetByAsset provides a mock function with given fields: bt, qt
func (*PairService) GetListedPairs ¶
func (_m *PairService) GetListedPairs() ([]types.Pair, error)
GetListedPairs provides a mock function with given fields:
func (*PairService) GetTokenPairData ¶
GetTokenPairData provides a mock function with given fields: bt, qt
func (*PairService) GetUnlistedPairs ¶
func (_m *PairService) GetUnlistedPairs() ([]types.Pair, error)
GetUnlistedPairs provides a mock function with given fields:
type PriceService ¶
PriceService is an autogenerated mock type for the PriceService type
func (*PriceService) GetDollarMarketPrices ¶
func (_m *PriceService) GetDollarMarketPrices(baseCurrencies []string) (map[string]float64, error)
GetDollarMarketPrices provides a mock function with given fields: baseCurrencies
func (*PriceService) GetMultipleMarketPrices ¶
func (_m *PriceService) GetMultipleMarketPrices(baseCurrencies []string, quoteCurrencies []string) (map[string]map[string]float64, error)
GetMultipleMarketPrices provides a mock function with given fields: baseCurrencies, quoteCurrencies
type TokenDao ¶
TokenDao is an autogenerated mock type for the TokenDao type
func (*TokenDao) GetBaseTokens ¶
GetBaseTokens provides a mock function with given fields:
func (*TokenDao) GetByAsset ¶
GetByAsset provides a mock function with given fields: asset
func (*TokenDao) GetByAssetOrSymbol ¶
GetByAssetOrSymbol provides a mock function with given fields: assetOrSymbol
func (*TokenDao) GetBySymbol ¶
GetBySymbol provides a mock function with given fields: symbol
func (*TokenDao) GetListedBaseTokens ¶
GetListedBaseTokens provides a mock function with given fields:
func (*TokenDao) GetListedTokens ¶
GetListedTokens provides a mock function with given fields:
func (*TokenDao) GetQuoteTokens ¶
GetQuoteTokens provides a mock function with given fields:
type TokenService ¶
TokenService is an autogenerated mock type for the TokenService type
func (*TokenService) CheckByAssetOrSymbol ¶
func (_m *TokenService) CheckByAssetOrSymbol(a string) (*types.Token, error)
CheckByAssetOrSymbol provides a mock function with given fields: a
func (*TokenService) Create ¶
func (_m *TokenService) Create(token *types.Token) error
Create provides a mock function with given fields: token
func (*TokenService) GetAll ¶
func (_m *TokenService) GetAll() ([]types.Token, error)
GetAll provides a mock function with given fields:
func (*TokenService) GetBaseTokens ¶
func (_m *TokenService) GetBaseTokens() ([]types.Token, error)
GetBaseTokens provides a mock function with given fields:
func (*TokenService) GetByAsset ¶
func (_m *TokenService) GetByAsset(a string) (*types.Token, error)
GetByAsset provides a mock function with given fields: a
func (*TokenService) GetByAssetOrSymbol ¶
func (_m *TokenService) GetByAssetOrSymbol(a string) (*types.Token, error)
GetByAssetOrSymbol provides a mock function with given fields: a
func (*TokenService) GetBySymbol ¶
func (_m *TokenService) GetBySymbol(s string) (*types.Token, error)
GetBySymbol provides a mock function with given fields: s
func (*TokenService) GetListedBaseTokens ¶
func (_m *TokenService) GetListedBaseTokens() ([]types.Token, error)
GetListedBaseTokens provides a mock function with given fields:
func (*TokenService) GetListedTokens ¶
func (_m *TokenService) GetListedTokens() ([]types.Token, error)
GetListedTokens provides a mock function with given fields:
func (*TokenService) GetQuoteTokens ¶
func (_m *TokenService) GetQuoteTokens() ([]types.Token, error)
GetQuoteTokens provides a mock function with given fields:
func (*TokenService) GetUnlistedTokens ¶
func (_m *TokenService) GetUnlistedTokens() ([]types.Token, error)
GetUnlistedTokens provides a mock function with given fields:
type TradeDao ¶
TradeDao is an autogenerated mock type for the TradeDao type
func (*TradeDao) FindAndModify ¶
FindAndModify provides a mock function with given fields: h, t
func (*TradeDao) GetAllTradesByPairAssets ¶
GetAllTradesByPairAssets provides a mock function with given fields: bt, qt
func (*TradeDao) GetByHashes ¶
GetByHashes provides a mock function with given fields: hashes
func (*TradeDao) GetByMakerOrderHash ¶
GetByMakerOrderHash provides a mock function with given fields: h
func (*TradeDao) GetByOrderHashes ¶
GetByOrderHashes provides a mock function with given fields: hashes
func (*TradeDao) GetByPairName ¶
GetByPairName provides a mock function with given fields: name
func (*TradeDao) GetByTakerOrderHash ¶
GetByTakerOrderHash provides a mock function with given fields: h
func (*TradeDao) GetByTriggerUnitHash ¶
GetByTriggerUnitHash provides a mock function with given fields: h
func (*TradeDao) GetByUserAddress ¶
GetByUserAddress provides a mock function with given fields: a
func (*TradeDao) GetErroredTradeCount ¶
GetErroredTradeCount provides a mock function with given fields: start, end
func (*TradeDao) GetNTradesByPairAssets ¶
GetNTradesByPairAssets provides a mock function with given fields: bt, qt, n
func (*TradeDao) GetSortedTrades ¶
GetSortedTrades provides a mock function with given fields: bt, qt, n
func (*TradeDao) GetSortedTradesByUserAddress ¶
GetSortedTradesByUserAddress provides a mock function with given fields: a, limit
func (*TradeDao) GetTradesByPairAssets ¶
GetTradesByPairAssets provides a mock function with given fields: bt, qt, n
func (*TradeDao) GetUncommittedTradesByUserAddress ¶
GetUncommittedTradesByUserAddress provides a mock function with given fields: a
func (*TradeDao) UpdateByHash ¶
UpdateByHash provides a mock function with given fields: h, t
func (*TradeDao) UpdateTradeStatus ¶
UpdateTradeStatus provides a mock function with given fields: h, status
func (*TradeDao) UpdateTradeStatuses ¶
UpdateTradeStatuses provides a mock function with given fields: status, hashes
type TradeService ¶
TradeService is an autogenerated mock type for the TradeService type
func (*TradeService) GetAllTradesByPairAssets ¶
GetAllTradesByPairAssets provides a mock function with given fields: bt, qt
func (*TradeService) GetByHash ¶
func (_m *TradeService) GetByHash(h string) (*types.Trade, error)
GetByHash provides a mock function with given fields: h
func (*TradeService) GetByHashes ¶
func (_m *TradeService) GetByHashes(hashes []string) ([]*types.Trade, error)
GetByHashes provides a mock function with given fields: hashes
func (*TradeService) GetByMakerOrderHash ¶
func (_m *TradeService) GetByMakerOrderHash(h string) ([]*types.Trade, error)
GetByMakerOrderHash provides a mock function with given fields: h
func (*TradeService) GetByOrderHashes ¶
func (_m *TradeService) GetByOrderHashes(h []string) ([]*types.Trade, error)
GetByOrderHashes provides a mock function with given fields: h
func (*TradeService) GetByPairName ¶
func (_m *TradeService) GetByPairName(p string) ([]*types.Trade, error)
GetByPairName provides a mock function with given fields: p
func (*TradeService) GetByTakerOrderHash ¶
func (_m *TradeService) GetByTakerOrderHash(h string) ([]*types.Trade, error)
GetByTakerOrderHash provides a mock function with given fields: h
func (*TradeService) GetByTriggerUnitHash ¶
func (_m *TradeService) GetByTriggerUnitHash(h string) ([]*types.Trade, error)
GetByTriggerUnitHash provides a mock function with given fields: h
func (*TradeService) GetByUserAddress ¶
func (_m *TradeService) GetByUserAddress(a string) ([]*types.Trade, error)
GetByUserAddress provides a mock function with given fields: a
func (*TradeService) GetSortedTrades ¶
GetSortedTrades provides a mock function with given fields: bt, qt, n
func (*TradeService) GetSortedTradesByUserAddress ¶
func (_m *TradeService) GetSortedTradesByUserAddress(a string, limit ...int) ([]*types.Trade, error)
GetSortedTradesByUserAddress provides a mock function with given fields: a, limit
func (*TradeService) Subscribe ¶
func (_m *TradeService) Subscribe(c *ws.Client, bt string, qt string)
Subscribe provides a mock function with given fields: c, bt, qt
func (*TradeService) Unsubscribe ¶
func (_m *TradeService) Unsubscribe(c *ws.Client)
Unsubscribe provides a mock function with given fields: c
func (*TradeService) UnsubscribeChannel ¶
func (_m *TradeService) UnsubscribeChannel(c *ws.Client, bt string, qt string)
UnsubscribeChannel provides a mock function with given fields: c, bt, qt
func (*TradeService) UpdatePendingTrade ¶
UpdatePendingTrade provides a mock function with given fields: t, txh
func (*TradeService) UpdateSuccessfulTrade ¶
UpdateSuccessfulTrade provides a mock function with given fields: t
func (*TradeService) UpdateTradeStatus ¶
UpdateTradeStatus provides a mock function with given fields: t, status
func (*TradeService) UpdateTradeTxHash ¶
func (_m *TradeService) UpdateTradeTxHash(tr *types.Trade, txh string) error
UpdateTradeTxHash provides a mock function with given fields: tr, txh
type ValidatorService ¶
ValidatorService is an autogenerated mock type for the ValidatorService type
func (*ValidatorService) ValidateAvailableBalance ¶
func (_m *ValidatorService) ValidateAvailableBalance(o *types.Order, uncommittedDeltas map[string]int64, balanceLockedInMemoryOrders int64) error
ValidateAvailableBalance provides a mock function with given fields: o, uncommittedDeltas, balanceLockedInMemoryOrders
func (*ValidatorService) ValidateBalance ¶
func (_m *ValidatorService) ValidateBalance(o *types.Order) error
ValidateBalance provides a mock function with given fields: o
func (*ValidatorService) ValidateOperatorAddress ¶
func (_m *ValidatorService) ValidateOperatorAddress(o *types.Order) error
ValidateOperatorAddress provides a mock function with given fields: o