Documentation ¶
Index ¶
- func SyncHistory(server *Server, ex exchange.Exchange, pair *currency.Pair, keepSyncing bool) error
- type Iterator
- type Server
- func (server *Server) Close() (err error)
- func (server *Server) Compact(ex exchange.Exchange, pair *currency.Pair) (err error)
- func (server *Server) NewIterator(ex exchange.Exchange, pair *currency.Pair) (_ *Iterator, err error)
- func (server *Server) Read(req *orderbook.ReadRequest, res orderbook.OrderBook_ReadServer) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server - Orderbook service server.
func New ¶
New - Constructs new orderbook service server. Opens on-disk LevelDB database and syncs in-memory databases.
func (*Server) NewIterator ¶
func (server *Server) NewIterator(ex exchange.Exchange, pair *currency.Pair) (_ *Iterator, err error)
NewIterator - Creates a new iterator for given currency pair on exchange.
func (*Server) Read ¶
func (server *Server) Read(req *orderbook.ReadRequest, res orderbook.OrderBook_ReadServer) (err error)
Read - Starts streaming real-time updates of an order book, and all trades happening in real-time. Batches are sent in `MaxBatchSize` when reading from history, or in received size in real-time when live streaming.
Click to show internal directories.
Click to hide internal directories.