Closed TzuHanLiang closed 1 year ago
title TideBit DeFi (02-select-market)
participant MarketSection participant Notification #F1F7B5 participant Market #F1F7B5 participant Assistant #F1F7B5 participant Worker #A8D1D1 participant APIWorker #F3CCFF participant WsWorker #F3CCFF
MarketSection->Market:getTicker(tickerId) activate MarketSection activate Market Market->Market:getTickerSnapshot(tickerId) MarketSection<--Market:ticker deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTicker(tickerId) activate MarketSection WsWorker-->Notification:data(ticker) activate Notification Notification-#red>Market:data(ticker) activate Market Market->>Market:updateData(ticker) deactivate Market MarketSection<--Notification:data(ticker) deactivate MarketSection deactivate Notification
MarketSection-->Market:getCandlestickChartData(tickerId) activate MarketSection activate Market Market->Worker:getCandlestickChartData(tickerId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Market<<--Worker:candlestickChartData deactivate APIWorker deactivate Worker MarketSection<<--Market:candlestickChartData deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeCandlestickChartData(tickerId) activate MarketSection activate Notification Notification->Market:subscribeCandlestickChartData(tickerId) activate Market Market->Worker:subscribe({channel:'candlestick-data', id: tickerId}) deactivate Notification deactivate Market activate Worker activate WsWorker note over Worker, WsWorker#fcae1e: 10-ws-process deactivate Worker WsWorker-->Notification:data(candlestickChartData) activate Notification deactivate WsWorker MarketSection<--Notification:data(candlestickChartData) deactivate Notification deactivate MarketSection
MarketSection->Market:getTickerDetails(tickerId) activate MarketSection activate Market Market->Worker:getTickerDetails(tickerId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Market<<--Worker:tickerDetails deactivate APIWorker deactivate Worker MarketSection<--Market:tickerDetails deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTickerDetails(tickerId) activate MarketSection activate Notification Notification->Market:subscribeTickerDetails(tickerId) activate Market Market->Worker:subscribe({channel:'ticker-details', id: tickerId}) deactivate Notification deactivate Market activate Worker activate WsWorker note over Worker, WsWorker#fcae1e: 10-ws-process deactivate Worker WsWorker-->Notification:data(tickerDetails) activate Notification deactivate WsWorker MarketSection<--Notification:data(tickerDetails) deactivate Notification deactivate MarketSection
MarketSection->Market:getCryptocurrencyDetails(cryptoCurrencyId) activate MarketSection activate Market Market->Worker:getCryptocurrencyDetails(cryptoCurrencyId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Market<<--Worker:cryptocurrencyDetails deactivate APIWorker deactivate Worker MarketSection<--Market:cryptocurrencyDetails deactivate Market deactivate MarketSection
MarketSection->Assistant:getNews(tickerId) activate MarketSection activate Assistant Assistant->Worker:getNews(tickerId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Assistant<<--Worker:news deactivate APIWorker deactivate Worker MarketSection<--Assistant:news deactivate Assistant deactivate MarketSection
note right of MarketSection#salmon: getTickers(): 拿交易對清單的資料 MarketSection->Market:getTickers() activate MarketSection activate Market Market->Market:getTickersSnapshot() MarketSection<--Market:tickers deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTickers() activate MarketSection WsWorker-->Notification:data(tickers) activate Notification Notification-#red>Market:data(tickers) activate Market Market->>Market:updateData(tickers) deactivate Market MarketSection<--Notification:data(tickers) deactivate MarketSection deactivate Notification
note right of MarketSection#salmon: getTradingChartData(): 拿交易對的價格走勢資料 MarketSection->Market:getTradingChartData(tickerId) activate MarketSection activate Market Market->Market:getTradingChartDataSnapshot(tickerId) MarketSection<--Market:tradingChartData deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTradingChartData() activate MarketSection WsWorker-->Notification:data(trades) activate Notification Notification-#red>Market:data(trades) activate Market Market->>Market:updateData(tradingChartData) deactivate Market MarketSection<--Notification:data(tradingChartData) deactivate MarketSection deactivate Notification
02-select-market
participant MarketSection participant Notification #F1F7B5 participant Market #F1F7B5 participant Assistant #F1F7B5 participant Worker #A8D1D1 participant APIWorker #F3CCFF participant WsWorker #F3CCFF
MarketSection->Market:getTicker(tickerId) activate MarketSection activate Market Market->Market:getTickerSnapshot(tickerId) MarketSection<--Market:ticker deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTicker(tickerId) activate MarketSection WsWorker-->Notification:data(ticker) activate Notification Notification-#red>Market:data(ticker) activate Market Market->>Market:updateData(ticker) deactivate Market MarketSection<--Notification:data(ticker) deactivate MarketSection deactivate Notification
MarketSection-->Market:getCandlestickChartData(tickerId) activate MarketSection activate Market Market->Worker:getCandlestickChartData(tickerId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Market<<--Worker:candlestickChartData deactivate APIWorker deactivate Worker MarketSection<<--Market:candlestickChartData deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeCandlestickChartData(tickerId) activate MarketSection activate Notification Notification->Market:subscribeCandlestickChartData(tickerId) activate Market Market->Worker:subscribe({channel:'candlestick-data', id: tickerId}) deactivate Notification deactivate Market activate Worker activate WsWorker note over Worker, WsWorker#fcae1e: 10-ws-process deactivate Worker WsWorker-->Notification:data(candlestickChartData) activate Notification deactivate WsWorker MarketSection<--Notification:data(candlestickChartData) deactivate Notification deactivate MarketSection
MarketSection->Market:getTickerDetails(tickerId) activate MarketSection activate Market Market->Worker:getTickerDetails(tickerId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Market<<--Worker:tickerDetails deactivate APIWorker deactivate Worker MarketSection<--Market:tickerDetails deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTickerDetails(tickerId) activate MarketSection activate Notification Notification->Market:subscribeTickerDetails(tickerId) activate Market Market->Worker:subscribe({channel:'ticker-details', id: tickerId}) deactivate Notification deactivate Market activate Worker activate WsWorker note over Worker, WsWorker#fcae1e: 10-ws-process deactivate Worker WsWorker-->Notification:data(tickerDetails) activate Notification deactivate WsWorker MarketSection<--Notification:data(tickerDetails) deactivate Notification deactivate MarketSection
MarketSection->Market:getCryptocurrencyDetails(cryptoCurrencyId) activate MarketSection activate Market Market->Worker:getCryptocurrencyDetails(cryptoCurrencyId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Market<<--Worker:cryptocurrencyDetails deactivate APIWorker deactivate Worker MarketSection<--Market:cryptocurrencyDetails deactivate Market deactivate MarketSection
MarketSection->Assistant:getNews(tickerId) activate MarketSection activate Assistant Assistant->Worker:getNews(tickerId) activate Worker activate APIWorker note over Worker, APIWorker#f3eaaf: 09-api-process Assistant<<--Worker:news deactivate APIWorker deactivate Worker MarketSection<--Assistant:news deactivate Assistant deactivate MarketSection
note right of MarketSection#salmon: getTickers(): 拿交易對清單的資料 MarketSection->Market:getTickers() activate MarketSection activate Market Market->Market:getTickersSnapshot() MarketSection<--Market:tickers deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTickers() activate MarketSection WsWorker-->Notification:data(tickers) activate Notification Notification-#red>Market:data(tickers) activate Market Market->>Market:updateData(tickers) deactivate Market MarketSection<--Notification:data(tickers) deactivate MarketSection deactivate Notification
note right of MarketSection#salmon: getTradingChartData(): 拿交易對的價格走勢資料 MarketSection->Market:getTradingChartData(tickerId) activate MarketSection activate Market Market->Market:getTradingChartDataSnapshot(tickerId) MarketSection<--Market:tradingChartData deactivate Market deactivate MarketSection
MarketSection->Notification:subscribeTradingChartData() activate MarketSection WsWorker-->Notification:data(trades) activate Notification Notification-#red>Market:data(trades) activate Market Market->>Market:updateData(tradingChartData) deactivate Market MarketSection<--Notification:data(tradingChartData) deactivate MarketSection deactivate Notification