Feature/increase fear and greed index to 90 days (#652)
* Increase fear and greed index to 90 days * Update changelog
This commit is contained in:
@@ -20,6 +20,7 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
|
||||
public hasPermissionToAccessFearAndGreedIndex: boolean;
|
||||
public historicalData: HistoricalDataItem[];
|
||||
public isLoading = true;
|
||||
public readonly numberOfDays = 90;
|
||||
public user: User;
|
||||
|
||||
private unsubscribeSubject = new Subject<void>();
|
||||
@@ -49,7 +50,7 @@ export class HomeMarketComponent implements OnDestroy, OnInit {
|
||||
this.dataService
|
||||
.fetchSymbolItem({
|
||||
dataSource: DataSource.RAKUTEN,
|
||||
includeHistoricalData: true,
|
||||
includeHistoricalData: this.numberOfDays,
|
||||
symbol: ghostfolioFearAndGreedIndexSymbol
|
||||
})
|
||||
.pipe(takeUntil(this.unsubscribeSubject))
|
||||
|
@@ -1,18 +1,10 @@
|
||||
<div
|
||||
class="
|
||||
align-items-center
|
||||
container
|
||||
d-flex
|
||||
flex-grow-1
|
||||
h-100
|
||||
justify-content-center
|
||||
w-100
|
||||
"
|
||||
class="align-items-center container d-flex flex-grow-1 h-100 justify-content-center w-100"
|
||||
>
|
||||
<div class="no-gutters row w-100">
|
||||
<div class="col-xs-12 col-md-8 offset-md-2">
|
||||
<div class="mb-2 text-center text-muted">
|
||||
<small i18n>Last 30 Days</small>
|
||||
<small i18n>Last {{ numberOfDays }} Days</small>
|
||||
</div>
|
||||
<gf-line-chart
|
||||
class="mb-5"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CreateAccessDto } from '@ghostfolio/api/app/access/create-access.dto';
|
||||
import { CreateAccountDto } from '@ghostfolio/api/app/account/create-account.dto';
|
||||
@@ -138,15 +138,21 @@ export class DataService {
|
||||
|
||||
public fetchSymbolItem({
|
||||
dataSource,
|
||||
includeHistoricalData = false,
|
||||
includeHistoricalData,
|
||||
symbol
|
||||
}: {
|
||||
dataSource: DataSource;
|
||||
includeHistoricalData?: boolean;
|
||||
includeHistoricalData?: number;
|
||||
symbol: string;
|
||||
}) {
|
||||
let params = new HttpParams();
|
||||
|
||||
if (includeHistoricalData) {
|
||||
params = params.append('includeHistoricalData', includeHistoricalData);
|
||||
}
|
||||
|
||||
return this.http.get<SymbolItem>(`/api/symbol/${dataSource}/${symbol}`, {
|
||||
params: { includeHistoricalData }
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user