Bisq markets dashboard: 24H Volume. WIP.
This commit is contained in:
@@ -19,18 +19,23 @@ export class BisqDashboardComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
this.tickers$ = combineLatest([
|
||||
this.bisqApiService.getMarketsTicker$(),
|
||||
this.bisqApiService.getMarkets$()
|
||||
this.bisqApiService.getMarkets$(),
|
||||
this.bisqApiService.getMarket24hVolumes$(),
|
||||
])
|
||||
.pipe(
|
||||
map(([tickers, markets]) => {
|
||||
map(([tickers, markets, volumes]) => {
|
||||
const newTickers = [];
|
||||
for (const t in tickers) {
|
||||
tickers[t].pair_url = t;
|
||||
tickers[t].pair = t.replace('_', '/').toUpperCase();
|
||||
tickers[t].market = markets[t];
|
||||
tickers[t].volume = volumes[t];
|
||||
newTickers.push(tickers[t]);
|
||||
}
|
||||
console.log(newTickers);
|
||||
|
||||
newTickers.sort((a, b) => (b.volume && b.volume.volume || 0) - (a.volume && a.volume.volume || 0));
|
||||
|
||||
return newTickers;
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user