Documentation ¶
Index ¶
- Constants
- type DepthResult
- type MongoOrderBook
- func (ob *MongoOrderBook) Asks(token types.Address, limit int) []types.Order
- func (ob *MongoOrderBook) Bids(token types.Address, limit int) []types.Order
- func (ob *MongoOrderBook) GetDepths(tokens []types.Address) (map[types.Address]types.Int, error)
- func (ob *MongoOrderBook) GetHighestBids(tokens []types.Address) (types.Prices, error)
- func (ob *MongoOrderBook) GetLowestAsks(tokens []types.Address) (types.Prices, error)
- func (ob *MongoOrderBook) GetOrderByHash(hash types.Hash) *types.Order
- func (ob *MongoOrderBook) GetOrders(token types.Address, user *types.Address, limit int) []types.Order
- func (ob *MongoOrderBook) HasOrders(token types.Address, user types.Address) (bool, error)
- func (ob *MongoOrderBook) InsertOrder(order types.Order) error
- func (ob *MongoOrderBook) RemoveOrder(hash types.Hash) bool
- func (ob *MongoOrderBook) SetOrderStatuses(token types.Address, user types.Address, status types.OrderStatus) error
- func (ob *MongoOrderBook) UpdateOrderFilledAmount(hash types.Hash, amount types.Int) error
- type OrderBook
Constants ¶
View Source
const ( DBName = "dexy" FileName = "orders" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepthResult ¶ added in v1.1.0
type MongoOrderBook ¶
type MongoOrderBook struct {
// contains filtered or unexported fields
}
func NewMongoOrderBook ¶
func NewMongoOrderBook(connection string) (*MongoOrderBook, error)
func (*MongoOrderBook) GetHighestBids ¶
func (*MongoOrderBook) GetLowestAsks ¶
func (*MongoOrderBook) GetOrderByHash ¶
func (ob *MongoOrderBook) GetOrderByHash(hash types.Hash) *types.Order
func (*MongoOrderBook) InsertOrder ¶
func (ob *MongoOrderBook) InsertOrder(order types.Order) error
func (*MongoOrderBook) RemoveOrder ¶
func (ob *MongoOrderBook) RemoveOrder(hash types.Hash) bool
func (*MongoOrderBook) SetOrderStatuses ¶ added in v1.0.2
func (ob *MongoOrderBook) SetOrderStatuses(token types.Address, user types.Address, status types.OrderStatus) error
func (*MongoOrderBook) UpdateOrderFilledAmount ¶
type OrderBook ¶
type OrderBook interface { InsertOrder(order types.Order) error RemoveOrder(hash types.Hash) bool Bids(token types.Address, limit int) []types.Order Asks(token types.Address, limit int) []types.Order UpdateOrderFilledAmount(hash types.Hash, amount types.Int) error GetOrderByHash(hash types.Hash) *types.Order GetOrders(token types.Address, user *types.Address, limit int) []types.Order GetDepths(tokens []types.Address) (map[types.Address]types.Int, error) HasOrders(token types.Address, user types.Address) (bool, error) SetOrderStatuses(token types.Address, user types.Address, status types.OrderStatus) error }
Click to show internal directories.
Click to hide internal directories.