
上QQ阅读APP看书,第一时间看更新
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()
}