TraderActor

TraderActor receives the prediction and, based on the label, writes a log message. It can trigger an HTTP request to the specified endpoint:

override def receive: Receive = {    case data: CurrentDataWithShortTermPrediction =>        Logger.debug("received short-term prediction" + data)        data.prediction match {            case "0" => notifySellShortTerm()            case "1" => notifyHoldShortTerm()    }

Get Scala Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.