2021-02-27 04:19:56 +07:00
|
|
|
<div class="container-xl">
|
|
|
|
|
2021-03-13 18:24:50 +07:00
|
|
|
<ng-container *ngIf="hlocData$ | async as hlocData; else loadingSpinner">
|
2021-02-27 04:19:56 +07:00
|
|
|
|
2021-03-13 18:24:50 +07:00
|
|
|
<ng-container *ngIf="currency$ | async as currency; else loadingSpinner">
|
2021-03-16 01:17:40 +07:00
|
|
|
<h1>{{ currency.market.rtype === 'crypto' ? currency.market.lname : currency.market.rname }} - {{ currency.pair }}</h1>
|
2021-02-27 04:19:56 +07:00
|
|
|
<div class="float-left">
|
2021-03-05 02:02:21 +07:00
|
|
|
<span class="priceheader">
|
2021-03-10 23:02:55 +07:00
|
|
|
<ng-container *ngIf="currency.market.rtype === 'fiat'; else headerPriceCrypto"><span class="green-color">{{ hlocData.hloc[hlocData.hloc.length - 1].close | currency: currency.market.rsymbol }}</span></ng-container>
|
|
|
|
<ng-template #headerPriceCrypto>{{ hlocData.hloc[hlocData.hloc.length - 1].close | number: '1.' + currency.market.rprecision + '-' + currency.market.rprecision }} {{ currency.market.rsymbol }}</ng-template>
|
2021-03-05 02:02:21 +07:00
|
|
|
</span>
|
2021-02-27 04:19:56 +07:00
|
|
|
</div>
|
|
|
|
|
2021-03-05 02:02:21 +07:00
|
|
|
<form [formGroup]="radioGroupForm" class="mb-3 float-right">
|
|
|
|
<div class="btn-group btn-group-toggle" ngbRadioGroup name="radioBasic" formControlName="interval">
|
|
|
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
2021-04-21 22:12:35 +04:00
|
|
|
<input ngbButton type="radio" [value]="'half_hour'" (click)="setFragment('half_hour')"> 30M
|
2021-03-05 02:02:21 +07:00
|
|
|
</label>
|
|
|
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
2021-04-21 22:12:35 +04:00
|
|
|
<input ngbButton type="radio" [value]="'hour'" (click)="setFragment('hour')"> 1H
|
2021-03-05 02:02:21 +07:00
|
|
|
</label>
|
|
|
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
2021-04-21 22:12:35 +04:00
|
|
|
<input ngbButton type="radio" [value]="'half_day'" (click)="setFragment('half_day')"> 12H
|
2021-03-05 02:02:21 +07:00
|
|
|
</label>
|
|
|
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
2021-04-21 22:12:35 +04:00
|
|
|
<input ngbButton type="radio" [value]="'day'" (click)="setFragment('day')"> 1D
|
2021-03-05 02:02:21 +07:00
|
|
|
</label>
|
|
|
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
2021-04-21 22:12:35 +04:00
|
|
|
<input ngbButton type="radio" [value]="'week'" (click)="setFragment('week')"> 1W
|
2021-03-05 02:02:21 +07:00
|
|
|
</label>
|
|
|
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
2021-04-21 22:12:35 +04:00
|
|
|
<input ngbButton type="radio" [value]="'month'" (click)="setFragment('month')"> 1M
|
2021-03-05 02:02:21 +07:00
|
|
|
</label>
|
|
|
|
<label ngbButtonLabel class="btn-primary btn-sm">
|
2021-04-21 22:12:35 +04:00
|
|
|
<input ngbButton type="radio" [value]="'year'" (click)="setFragment('year')"> 1Y
|
2021-03-05 02:02:21 +07:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</form>
|
2021-02-27 04:19:56 +07:00
|
|
|
|
2021-04-21 20:22:34 +04:00
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
|
|
<div id="graphHolder">
|
|
|
|
<div class="text-center loadingChart" [hidden]="!isLoadingGraph">
|
|
|
|
<div class="spinner-border text-light"></div>
|
|
|
|
</div>
|
|
|
|
<app-lightweight-charts [data]="hlocData.hloc" [volumeData]="hlocData.volume" [precision]="currency.market.rtype === 'crypto' ? currency.market.lprecision : currency.market.rprecision"></app-lightweight-charts>
|
|
|
|
</div>
|
|
|
|
|
2021-03-05 02:02:21 +07:00
|
|
|
<br>
|
|
|
|
|
2021-03-13 18:24:50 +07:00
|
|
|
<ng-container *ngIf="offers$ | async as offers; else loadingSpinner">
|
2021-03-05 02:02:21 +07:00
|
|
|
<div class="row row-cols-1 row-cols-md-2">
|
|
|
|
<ng-container *ngTemplateOutlet="offersList; context: { offers: offers.buys, direction: 'BUY', market: currency.market }"></ng-container>
|
|
|
|
<ng-container *ngTemplateOutlet="offersList; context: { offers: offers.sells, direction: 'SELL', market: currency.market }"></ng-container>
|
|
|
|
</div>
|
|
|
|
</ng-container>
|
2021-03-13 18:24:50 +07:00
|
|
|
|
2021-04-25 02:07:29 +04:00
|
|
|
<br><br>
|
2021-03-13 18:24:50 +07:00
|
|
|
|
|
|
|
<ng-container *ngIf="trades$ | async as trades; else loadingSpinner">
|
2021-04-25 22:52:11 +04:00
|
|
|
<h2 i18n="Latest trades header">Latest trades</h2>
|
2021-03-13 18:24:50 +07:00
|
|
|
|
2021-04-25 19:02:26 +04:00
|
|
|
<app-bisq-trades [trades$]="trades$" [market]="currency.market"></app-bisq-trades>
|
2021-03-13 18:24:50 +07:00
|
|
|
</ng-container>
|
|
|
|
|
2021-03-05 02:02:21 +07:00
|
|
|
</ng-container>
|
2021-02-27 04:19:56 +07:00
|
|
|
</ng-container>
|
2021-03-05 02:02:21 +07:00
|
|
|
|
2021-02-27 04:19:56 +07:00
|
|
|
</div>
|
2021-03-05 02:02:21 +07:00
|
|
|
|
|
|
|
|
|
|
|
<ng-template #offersList let-offers="offers" let-direction="direction", let-market="market">
|
|
|
|
<div class="col">
|
|
|
|
<h2>
|
2021-04-25 22:52:11 +04:00
|
|
|
<ng-template [ngIf]="direction === 'BUY'" [ngIfElse]="sellOffers" i18n="Bisq buy offers">Buy offers</ng-template>
|
|
|
|
<ng-template #sellOffers i18n="Bisq sell offers">Sell offers</ng-template>
|
2021-03-05 02:02:21 +07:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<table class="table table-borderless table-striped">
|
|
|
|
<thead>
|
2021-04-25 22:52:11 +04:00
|
|
|
<th i18n>Price</th>
|
|
|
|
<th><ng-container *ngTemplateOutlet="amount; context: {$implicit: market.lsymbol }"></ng-container></th>
|
|
|
|
<th><ng-container *ngTemplateOutlet="amount; context: {$implicit: market.rsymbol }"></ng-container></th>
|
2021-03-05 02:02:21 +07:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let offer of offers">
|
|
|
|
<td>
|
|
|
|
<ng-container *ngIf="market.rtype === 'fiat'; else priceCrypto"><span class="green-color">{{ offer.price | currency: market.rsymbol }}</span></ng-container>
|
|
|
|
<ng-template #priceCrypto>{{ offer.price | number: '1.2-' + market.rprecision }} {{ market.rsymbol }}</ng-template>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<ng-container *ngIf="market.ltype === 'fiat'; else amountCrypto"><span class="green-color">{{ offer.amount | currency: market.rsymbol }}</span></ng-container>
|
|
|
|
<ng-template #amountCrypto>{{ offer.amount | number: '1.2-' + market.lprecision }} {{ market.lsymbol }}</ng-template>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<ng-container *ngIf="market.rtype === 'fiat'; else volumeCrypto"><span class="green-color">{{ offer.volume | currency: market.rsymbol }}</span></ng-container>
|
|
|
|
<ng-template #volumeCrypto>{{ offer.volume | number: '1.2-' + market.rprecision }} {{ market.rsymbol }}</ng-template>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-03-13 18:24:50 +07:00
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template #loadingSpinner>
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
<div class="text-center">
|
|
|
|
<div class="spinner-border text-light"></div>
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
2021-04-25 22:52:11 +04:00
|
|
|
|
|
|
|
<ng-template #amount let-i i18n="Trade amount (Symbol)">Amount ({{ i }})</ng-template>
|