diff --git a/tomox/tomox.go b/tomox/tomox.go index b4f8674b753e..bb8ccf5c20c5 100644 --- a/tomox/tomox.go +++ b/tomox/tomox.go @@ -83,7 +83,6 @@ type TomoX struct { statsMu sync.Mutex // guard stats settings syncmap.Map // holds configuration settings that can be dynamically changed - } func New(cfg *Config) *TomoX { @@ -637,3 +636,19 @@ func (tomox *TomoX) CancelOrder(order *OrderItem) error { return err } + +func (tomox *TomoX) GetBidsTree(pairName string) (*OrderTree, error) { + ob, err := tomox.GetOrderBook(pairName) + if err != nil { + return nil, err + } + return ob.Bids, nil +} + +func (tomox *TomoX) GetAsksTree(pairName string) (*OrderTree, error) { + ob, err := tomox.GetOrderBook(pairName) + if err != nil { + return nil, err + } + return ob.Asks, nil +}